EnigmaIOT
0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
|
This is the equivalent of EnigmaIOT node example but shows how to use JSON and MsgPack to encode data before transmission. It sends a message with mocked values, in addition to input voltage value on ESP8266 and ESP32, and sleeps during 10 seconds.
If you use an ESP8266 you have to connect GPIO16 and RST pins or it will never wake from sleep. You can reset your ESP8266 board manually to force a wake.
In order to adapt it to your needs you only have to modify this code to readout sensor values.
When receiving this message, MQTT Gateway produces this output:
This nodes allows receiving downlink messages sending MQTT messages to gateway as
If user data is given in JSON format, EnigmaIOT gateway will convert it to MsgPack format automatically.
Node will dump its content on serial port.