Code for non-blocking tasks and shaky WiFi
Posted: Mon Oct 02, 2017 1:29 am
Hello
I do home automation with ESP8266 devices, some bought from sonoff, some homebuilt stuff based on ESP-201. I use MQTT as the communication relay between the node-red based backend and the devices.
For some applications I have the requirement that the device should always do its main tasks independently if WiFi or even MQTT are up and running. For this I wrote some code as a framework to be reused in the various devices I have. I'd like to share this code. It might be useful for someone else, but hopefully I get some feedback to improve it.
Kind regards,
Urs.
I do home automation with ESP8266 devices, some bought from sonoff, some homebuilt stuff based on ESP-201. I use MQTT as the communication relay between the node-red based backend and the devices.
For some applications I have the requirement that the device should always do its main tasks independently if WiFi or even MQTT are up and running. For this I wrote some code as a framework to be reused in the various devices I have. I'd like to share this code. It might be useful for someone else, but hopefully I get some feedback to improve it.
Kind regards,
Urs.