Arduino-HomeKit-ESP8266 icon indicating copy to clipboard operation
Arduino-HomeKit-ESP8266 copied to clipboard

Switch always reboot as OFF

Open SgtFoose opened this issue 3 years ago • 3 comments
trafficstars

Sorry I'm not a code expert but by looking at the code, shouldnt it return to its last known state after a power loss?

If not, how to modify the code to make it reboot as SWITCH ON after a reboot?

PS using default code as is posted with just my SSID and PW.

SgtFoose avatar Feb 21 '22 12:02 SgtFoose

When your device restarts it will always go back to the off state, you can store the values over the internet (I use MQTT) or in SPIFFS (Internal file system) so that your device takes the stored value and not the default off value when it restarts.

hitenlulla avatar Mar 07 '22 14:03 hitenlulla

When your device restarts it will always go back to the off state, you can store the values over the internet (I use MQTT) or in SPIFFS (Internal file system) so that your device takes the stored value and not the default off value when it restarts. It would be great if this feature could be integrated in the master. For now, do you know how I can hard-code it to start as ON?

SgtFoose avatar Mar 09 '22 19:03 SgtFoose

https://youtu.be/pfJROpQg-Is This should be a good start point to get used to SPIFFS and Arduino JSON. Try it out and still if you don't find a solution, connect with me at https://www.linkedin.com/in/hiten-lulla-a434201aa

hitenlulla avatar Mar 09 '22 19:03 hitenlulla