Read toggle state on-demand or at start up?
by JMJunek on Sun Nov 29, 2020 4:01 pm
I've noticed that upon start up, my device (Huzzah esp8266) doesn't know the initial state of a toggle on AIO. I've been using digital->onMessage(handleMessage); and handleMessage(AdafruitIO_Data *data) but that method obviously only runs when an event on AIO (like a toggle state change) happens. So I have to hit all the toggles after startup to get everything synched, and then it's all working fine from then on. It's there a way to read the state of a toggle on-demand, that I could run at start up?