Downloads

Arduino based MppDevice implementations for the ESP8266, ESP8625 (use the ESP8266), and the ESP32.  See ESP8266 for an overview of what these devices can do and where to get them.

Note all of the necessary bin, zip, and ino files are available in MppPublish.zip below - there's no need to download them individually and only that zip is needed.  The attached bin and txt files are used by AM for version checking and automatic updates.  Use AM ESP8266 to check and install updates automatically.

Join the discussion group for help and ideas.  Please include a short description of why you are joining so that I know your request is legitimate vs spam.  Something simple like "I want to know more about ESP8266 devices" is enough.

More information: 

Configuring Devices


Binary, source files, and the change history are described and available below.


The ESP8266 Devices app in AM can be used to see current versions and update your devices.


Devices can be configured using AM ("Edit Properties" in the main and ESP8266 Management apps), from MppArduino, or from the device's built in web page.

Help is available for properties in AM and in MppArduino.  Check for detailed setup and/or wiring instructions in the .ino file for each device when necessary.


Firmware can be automatically updated from AM or manually updated from MppArduino or the devices web page (you will need to download the .bin files that you need).  Use a manual upload/update to change a device's type with a new binary file.


To update the firmware or change the properties of battery devices, use the MppArduino application or the AM ESP8266 app "Wakeup" action and trigger the device.   Alternatively use use a web browser against the device's web page and refresh immediately after booting.  It may take one or more attempts to reconnect.  You do need to have the correct IP address for the device, check in your router status.  Reboot the device to re-enter battery mode.


To update devices connected to an MppGateway wake the device if necessary, then reconnect it to your primary wifi.  If it's a battery device wake it again to update.  As an alternative you can connect the AM server phone/tablet to the gateway if there are enough slots available.  It may be helpful to change the ServerIp before moving a device to or from a gateway.  To return to battery operation (so the device will return to sleep quickly) reboot it.

Firmware Password Protection


A password may be set on a device in the device properties.  Use the web page, MppArduino, or properties in the AM ESP8266 Manager to set the password.


Once set, the password must be provided to update the firmware OTA or to change the device properties. 


When using the device web page, the browser will request the user login if the password is needed.  Use the userid "admin" along with the passwordl.


With MppArduino the password is needed to update the firmware OTA.  Specify the password in the firmware update menu.  You can clear the password using "remote Password" or "set Password {new_password}" using the USB command line.


In AM Manager, a password can be provided for each device in the ESP8266 Management utility submenu.  Set, change, or remove the password using the device properties page.  If used, a password must be assigned to the device settings to update the firmware.

Firmware Files


The binaries below will be rebuilt on the latest MppLibrary, check the MppArduino version in the device web page.


For the update history see the "Updates.txt" attached below.


Full usage details are available in the source .ino files for the .bin flash files below.


MppPublish.zip - all of the current binary, source, and library files.  Bin files have been build with a 1MB flash, no spiffs, a CPU of 80Mhz and crystal of 26MHz, lwIP "v2 Lower Memory", VTables "Flash".  As of 2/6/2019 bins have been built with DOUT flashing as that seems compatible with most ESP8266 devices.



MppLibrary.zip -  MPP library source needed to build your own sketches for the ESP8266 device.  Implements the AM/MppDevice interface and provides an extensible parts library.


Mpp32Library.zip library - needed to build your own sketches for the ESP32 device.  Currently OTA may occasionally fail, reset the device to try again.

NOTE: Espressif's ESP32 SDK does not appear to be stable enough for proper long term operation.


MppDevice.bin - binary for getting started.  MppDevice.bin has been built for devices with 1MB (8Mbit) flash or larger. 

Binary files for devices:


MppRelay is probably the most useful, common devices and has a variety of built in functions for detecting internet, wifi, and power changes, restarting routers, etc.


MppAnalog.bin - simple sketch to read/report the ADC value from A0 as an analog value to AM.


MppAnalogReporter.bin - battery powered sketch to periodically read/report the ADC value from A0 as an analog value to AM.  As with MppReporter, it needs GPIO16/RST to be connected for the wakeup.  With periodic checkin allowing AM to monitor for delinquency (e.g. a dead battery).


MppBulb.bin - supports RGBC (RGB + W) devices using ESP8266 direct PWM.  Used in AM as a Color/Temperature bulb, the REST API supports SetLevel (brightness), SetTemperature, and SetColor (hue/saturation).  Transitions can be made over time using ms.


MppButtons.bin - use with multigang switches, e.g. Sonoff T0US/TX3US.  Defines button sensors and relay controls, e.g. multiple MppMakers.


MppColor.bin - supports RGB devices using ESP8266 PWM.  Used in AM as a Color/Temperature bulb, the REST API supports SetLevel (brightness), SetTemperature, SetColor (hue/saturation), and SetColor (rgb 0-255).  Transitions can be made over time using ms.


MppContact.bin - reliable battery device for monitoring contact sensor, e.g. wireless/wifi door or window sensor.  Wakes periodically to report battery voltage.  Use with an edge trigger circuit to wake on each state change of a contact sensor.  See Battery Sensors.


MppCSE7766.bin - for the Sonoff POW2, Sonoff S31, and other CSE7766 based devices.  This device reuses the serial chip so can be a little difficult to get working, it will hang if TX/RX are not connected during setup.  Easiest is to flash MppDevice to configure wifi, then flash MppCSE7766 OTA.  Disconnect the USB and boot twice to enable RunMode. Configure as needed.


MppDevice.bin - MppSetup device, enables OTA updates.


MppDoorSensor.bin - works with Tuya battery powered door/contact sensors.


MppDHT.bin - for DHT11 or DHT22 on an ESP8266 (e.g. wemos mini)


MppDS18B20.bin - works with the sonoff DS18B20 single wire temperature sensor.


MppEV1527.bin - works with the standard RF 433Mz arduino receiver https://www.aliexpress.com/popular/arduino+433+receiver.html and EV1527 433MHz battery powered buttons: https://www.aliexpress.com/popular/ev1527.html.   Also works with the Sonoff DW2-RF (and likely other EV1527 based devices).
Note the superheterodyne receivers provide much better range than the slightly lower cost arduino receivers that generally support < 1m range.


MppGateway.bin - a wifi bridge for up to 4 devices to extend wifi range.  When connecting a device (especially an MppSleeper or MppReporter) be sure to set the ServerIp of the bridged device to the gateway IP (typically 192.168.4.1) as well as assigning the gateway SSID and password.  Reboot the gateway when a client is removed.  See MppGateway.ino for instructions on waking and/or modifying (properties, firmware) bridged devices.


Mpp32Gateway.bin - a wifi bridge running on an ESP32 for up to 10 devices to extend wifi range.  Configuration and use is otherwise Identical to the MppGateway.

NOTE: Espressif's ESP32 SDK does not appear to be stable enough for proper long term operation.


MppHLW8012.bin - works HLW8012 power measuring chip (e.g. sonoff power).


MppHub.bin - when using battery devices point their ServerIp to a device running MppHub.  MppHub will cache property updates, and will forward TCP notifications to your AM Server.  This device is useful for sharing battery devices with multiple AM Server instances and provide a way to check the last value reported even when the AM Server restarts.  (Note that only one AM server can be the target of any notifications from the battery devices).


MppIrRC6.bin - use with an IR receiver device, reports RC6 button presses to AM.  Shows how to adapt any IR remote to AM.


MppMaker.bin - sensor + relay, e.g. toggle + automated control, cutoff sensor, etc.


MppPower.bin - hlw8012/Sonoff power device


MppProtocol.bin - sample showing how an ESP8266 could be used to convert a custom device for use with AM.  Also handy as tutorial for customizing MPP devices.


MppPT2262.bin - works with the standard RF 433Mz arduino receiver https://www.aliexpress.com/popular/arduino+433+receiver.html and the PT22xx button transmitter family.  Note the superheterodyne receivers provide much better range than the slightly lower cost arduino receivers that generally support < 1m range.


MppPWM.bin - PWM (variable level) output on any pin.


MppRelay.bin - simple single relay control w/ LED follower. 

  Also supports:

- checking for IP connectivity (internet or local) and toggling the relay if no response

- reporting to AM on wifi recovery (after loss or restart)

- reporting to AM on power recovery (after loss or restart)

- "momentary" mode on the relay for power cycling attached devices


MppRelays.bin - multiple relay control w/ LED follower


MppReporter.bin - reliable battery powered sensor, 17uA when sleeping.  Needs GPIO16/RST connected to wake/checkin, and a trigger on EN to wakeup and report the event.  With periodic checkin for AM to monitor for delinquency.  Will run many months on battery.

See the MppReporter.ino for wiring instructions.


MppSensor.bin - simple single input sensor w/ relay or LED follower


MppSensors.bin - multiple input sensors w/ relay or LED follower


MppSi7021.bin - temperature/humidity sensor using I2C.  Works with newer sonoffs. 


MppSoiler.bin - analog soil/moisture sensor (an MppAnalog) with an optional digital input (MppSensor) for a sensor trigger and relay control (MppMomentary) for watering.   The sensor can be optionally powered by the device with a settle time to preserve resistive probes from electrolytic destruction.


MppSleeper.bin - low (battery) power switch sensor, 17uA when sleeping, 1-2year battery life.  Use devices without a USB port or power LED (e.g. ESP01S).

See MppSleeper.ino for wiring instructions.


MppSonoffB1.bin - for the Sonoff B1 bulb


MppSonoffDual.bin - for the Sonoff Dual (v1)


MppSonoffTH.bin - for older AM2301/DHT21 sensors on the SonoffTH


MppStepper.bin - stepper motor controller.  UseLast=true to have the device return to it's last level on restart, or use Initial=true for MaxLevel, or InitialLevel=value for a constant startup location.  Recalibration > 0 will tell the device to recalibrate when the recalibration count is reached (each requested change increases the count).


MppToggle.bin - A simple switch that actives it's "on" pin for ON, and it's "off" pin for off.  Use for activating remotes or other momentary/toggle two button devices.


MppTracker.bin - A sample implementation using the MppTracker device (used to set analog output values).


MppRelay and MppMaker are useful for the simple relay based Sonoffs.

For ITEAD/Sonoff's using sensors not part of the above you may want to consider using the Espurna or Tasmota binaries.