Connect the ESP8266 to Socket IO and receive JSON Strings.
- ArduinoJson by Benoit Blanchon
- SocketIoClient by Vincent Wyszynski
Connect your ESP8266 to your SocketIo-Server an receive JSON-data to toggle the intern LED of the ESP. In this case the ESP listens to the 'switch_change' event. If the event is emitted by the SocketIo Server the ESP will parse the JSON payload which looks like this:
{"name":"switch_1","val":false}
After that it toggles the built-in LED in case of the boolean 'val'.