Device configuration and updates are done using AutomationManager.
To begin you first load the MPP firmware onto the ESP device (see Flashing Firmware) and connect it to your wifi (using a reserved IP address in your router DHCP service is best). Record the device IP address.
This ESP8266 app is also used for base and device specific updates, and to configure the device properties (e.g. pin configuration)
Device Types
See below for details on configuring each device type.
Powered (use an inexpensive USB power block)
Battery (2.6V - 3.3V, use a pair of AA's or AAA's)
Devices with Buttons
Properties and Device Customization
The pins in this table are the values to use in the Properties. They match the pin numbers of the ESP8266 and do not (normally) correspond to the pin outs of the device board connectors. See your particular board for details.
Notes [n]:
Pins on the ESP8266 and typical use (not always the same as the board connectors!):
0/GPIO16 - used for deep sleep wakeup
1/GPIO5
2/GPIO4
3/GPIO0 - low at power up enters flash mode
4/GPIO2 - high at power up for flash boot
5/GPIO14
6/GPIO12
7/GPIO13
8/GPIO15 - high at power up for SD card boot
9/GPIO3 - RXD
10/GPIO1 - TXD
11/GPIO9
12/GPIO10
Use the "Properties" menu to customize your firmware as needed.
Use the "Add" button for properties that are not present.
Reserved (internal) properties:
The LedPin will usually follow the relay or sensor state (depending on device type).
MppSensor
A simple sensor that will monitor and report on the state of an input pin. Use to monitor a trigger including external sensors (e.g. a motion detector, toggle or momentary switches).
This device supports Long Press - hold the sensor active for at least 1s to trigger a long press event to the AM Server.
MppSensors
Similar to MppSensor, supporting multiple inputs.
MppAnalog
Is-an MppSensor with the additional of an analog voltage read of the A0 pin. The A0 input can read 0 to 3v3 (max!).
MppLevel
An analog output device. Use "Extension" to add the desired output when a new level is assigned. State can be used to set the state off/on.
MppStepper
An analog output device for managing a stepper motor via a Uln2003.
MppRelay
A standard relay controller providing on/off switching. A short touch of the button will toggle the relay, and the LED will follow the relay state. It can also be used as an indicator since the LED will follow the relay setting. Use a toggle, sync, or follow rule in AutomationManager/WemoServer to link it to other devices.
Note, when using the MomentaryOn/MomentaryOff commands the maximum supported duration is about 1 hour 50 minutes (1:50:00).
MppMaker
A sensor + relay controller similar to a Wemo Maker. A short touch of the button will toggle the relay, and the LED will follow the relay state.
Note, when using the MomentaryOn/MomentaryOff commands the maximum supported duration is about 1 hour 50 minutes (1:50:00).
This device supports Long Press - hold the sensor active for at least 1s to trigger a long press event to the AM Server.
MppRelays
A standard relay controller providing on/off switching for multiple relays.
MppToggle
On/off controller where the actual state is not known and on/off actions are pulses (e.g. a door lock or similar remote)
MppDual
For use with Sonoff Dual only.
Note that the button does not work for wifi configuration (unless you've made the button to GPIO0 modification). 5 clicks of the button within 5s will restart the device, 7 clicks will bring it up into configuration mode to allow you to join and reconfigure the wifi.
MppPower
Appears as multiple grouped devices to AutomationManager: relay+power, current, voltage.
Each UDN will have a common UDN with an appropriate suffix: _P (relay control plus power), _C, _V respectively.
The Led will follow the relay state.
Requires ITEAD Sonoff Power or equivalent.
For calibration Sonoff uses:
Vref = 2.43, Fosc = 26MHz / 8 = 3250000, Rv = 5 * 470 = 2350, Rc = 0.001
MppServerRHT (Sonff only)
Appears as 3 separate devices to AutomationManager: relay, humidity, temperature.
Each UDN will have a common UDN with an appropriate suffix: _R, _H, _T respectively.
The Led will follow the relay state.
Requires ITEAD's Sonoff DHT board.
MppDHT (generic)
Appears as 2 separate devices to AutomationManager: humidity, temperature.
Each UDN will have a common UDN with an appropriate suffix: _H, _T respectively.
wemos d1 DHT shield v1 uses the DHT11 which is limited to 1C degree of precision .
MppSleeper
MppSleeper is a battery powered device that wakes when the input is toggled to send an event and report battery voltage.
Battery usage is very low in deep sleep, < 100uA. Each trigger results in 20s or so of 70mA power use. You can expect a battery life of years on a pair of AAAs, though less if the device reports often.
NOTE: if your board has a USB interface it is not suitable for battery use. ESP-01's are a good choice, but if there is a power LED on the board you must remove it.
See also MppReporter which will actively report low battery conditions. If you have access to GPIO16, RST and EN and need to monitor the device use the MppReporter. The MppSleeper is generally quicker to send a notification than the MppReporter.
The device takes 3-6s or so to wake and report an event. Using a static IP eliminates the DHCP exchange and can be slightly faster.
Use a momentary low signal to trigger.
Typically you would configure a WemoServer rule to toggle a target device when the IpMessage OnEvent was received. Sensor status is sent but note that events can be missed while the device is waking or is restarted while sending.
The battery voltage is checked when MppSleeper wakes and reports. This voltage is reported along with the state and can be checked and acted upon with a value below trigger.
Using the WifiPin, LedPin, or power LED will add battery load. If there is a power LED it is best to remove it.
To update or configure the device, put the WemoManager/ESP8266 Devices app into "configure" mode for the MppSleeper device. Toggle the the sleeper device input, when it wakes WemoManager will find and start it in configuration mode. Remember to return it to "sleeper" mode to save power if it's running on batteries!
If you can't recover it using the ESP8266 Manager app you will need to take the plug-able ESP01 card from it's location and connect it to a computer using the USB adapter. Use the LuaLoader or equivalent to restart it, during the reboot cancel the timers and then enter the command 'restart("run")' to restore it to setup mode. Once the reboot completes AutomationManager can be used to manage the device configuration.
Set the device into switching (sleeper) mode (which reduces battery use) using the AutomationManager ESP8266 management utility. It can then be returned to service.
Connection at power up may be a little faster if StaticIp is used.
NOTE: needs the nodemcu_integer_4mpp.bin that includes ADC support from Nov 2017 or later.
MppReporter
A battery powered device that wakes up when the input is toggled, periodically to report liveliness, and to check battery life. Power consumption is very low and using a longer report period greatly extends battery life.
Battery usage is very low in deep sleep, < 100uA. Each trigger results in 20s or so of 70mA power use. You can expect a battery life of years on a pair of AAAs, though less if the device reports often (a typical use would be daily reports).
NOTE: if your board has a USB interface it is not suitable for battery use. Bare ESP-12's are a good choice, but if there is a power LED on the board you must remove it.
Hardware requirements:
GPIO16 tied to RST
Low going Edge trigger on sensor change to EN (open/high otherwise)
For edge triggering see: 3 Way Switches.
The device takes 3-10s or so to wake and report an input event. Using a static IP eliminates the DHCP exchange and can be slightly faster. If faster reporting is needed and battery monitoring is not required use the MppSleeper.
Typically you would configure a AM Server rule to take action (e.g. toggle a target device) when the IpMessage OnEvent was received. Sensor status is sent but note that events can be missed while the device is waking or is restarted while sending.
When the IpBattery OnEvent was received you might send an email to yourself (test by temporarily using the properties to cause a low battery condition).
The battery voltage is checked when MppReporter wakes on its own or is triggered. This voltage is reported along with the state and can be checked and acted upon with a value below trigger. It will also be reported in the case of an IpBattery event.
Using the WifiPin, LedPin, or power LED will add battery load. If there is a power LED it is best to remove it.
To update or configure the device, put the WemoManager/ESP8266 Devices app into "configure" mode for the MppReporter device. Toggle the the device input, when it wakes WemoManager will find and start it in configuration mode. Remember to return it to "sleeper" mode to save power if it's running on batteries!
If you can't recover it using the ESP8266 Manager app you will need connect it to a computer using the USB adapter. Use the MppController or LuaLoader or equivalent to restart it. During the reboot use pause or otherwise cancel the timers and then enter the command 'restart("run")' to restore it to setup mode. Once the reboot completes AutomationManager can be used to manage the device configuration.
Set the device into switching (sleeper) mode (which reduces battery use) using the AutomationManager ESP8266 management utility. It can then be returned to service.
At the command line LightsOn() can be used to exit sleeper mode.
Connection at power up may be a little faster if StaticIp is used.
NOTE: needs the nodemcu_integer_4mpp.bin that includes ADC support from Nov 2017 or later.
MppAlert
A battery powered device that wakes when the input is activated to send an event. It will catch and report every input level change, and (unlike the MppReporter and MppSleeper) does not need an edge triggering circuit. Use this device when you can power it with rechargeable high capacity batteries.
When in light sleep the power consumption is typically < 1mA (I measured 0.75 to 0.9mA). When awake/reporting the consumption jumps to an average of about 70mA. A pair of AA's has about 5000-6000mAhrs capacity (wikipedia) which should provide 6-8 months of power.
NOTE: if your board has a USB interface it is not suitable for battery use. ESP-01's are a good choice, but if there is a power LED on the board you must remove it.
The device takes 3-6s or so to report an input event. Using a static IP eliminates the DHCP exchange and can be slightly faster.
MppAlert puts the device into light sleep mode (0.5ma-1.2ma).
When a sensor state change is received you might take an action, e.g. use it as a door/alarm sensor. Or use it as a trigger for a remote light switch or controller.
Using the WifiPin, LedPin, or power LED will add battery load. If there is a power LED it is best to remove it.
The device will check in with the server once every CheckIn period (hours).
Use periodic alerts set up a restartable notification trigger - if a state message is not received within the restart/notification period alert that the device is offline.
The battery voltage is reported in the value propery each time the MppAlert sensor is triggered as well as periodically. It's a good idea to set a rule with a threshold, 2.75V is probably the lowest it should be allowed to get. Use the ValueBelow rule trigger to take action on a low battery. For example send an email to yourself.
To return the device to setup mode, press the device button (if configured) while it is starting after a sensor change, or use the AutomationManager ESP8266 management utility (activate the sensor while it is searching). To return to low power mode restart it using the AutomationManager ESP8266 management utility.
NOTE: needs nodemcu_integer_4mpp.bin v4.0.1 or later.
MppGateway
A ESP NOW gateway that will bridge ESP NOW sensors to the AM Server. Peers are monitored for delinquency, any peer that does not report within a 5 minute period is reported as offline (error state).
NOTE: needs nodemcu_integer_4mpp.bin v4.2.0 or later.
MppContact
A ESP NOW binary (switch) sensor that will report sensor state changes and battery voltage to an MppGateway.
This device supports Long Press - hold the sensor active for at least 1s to trigger a long press event to the AM Server.
NOTE: needs nodemcu_integer_4mpp.bin v4.2.0 or later.
MppCustom
Loads the file "Custom.LUA" during startup that can contain whatever you need (copy/paste from the other types as examples). You define the discovery information for each device being supported using "setupDiscovery(udn)", then add those resources as keyed (for GET responses) into Resources and into Discovery. Replace (re-assign) CustomHttp for command handling (e.g. setting a relay on).
NOTE: use nodemcu_integer_4mpp.bin v4.2.0 with Base 7.0.0 for lower RAM consumption.