EnigmaIOT
0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
|
This example shows how all features of EnigmaIOTjsonController.h may be used to build a complete node.
It controls a relay and gets messages by button presses. Button may be linked so that relay is toggled on every button press.
Three configurable parameters are added:
Relay is controller with this command
If button is pressed, this MQTT message is produced
To change button and relay link status you may use this message
1
makes button and relay to be linked, 0
makes that button does not produce any immediate effect in relay.
Initial relay state after boot may be configured with a MQTT message too.
0
and 1
mean that LED will start in OFF or ON state respectively, and 2
means that status will be saved.
You may ask about these configurations using
Command field may be rly
, link
or bstate
.