Problem after reset / reconnecting NodeMCU


#1

Hello
It seems to me that Sliders send data only when you change the value on them. This is because the data is sent in a CAYENNE_IN + getValue.asInt function.

The thing is that after resetting my device, i don’t have those values in my variables (Because I didn’t send an Input action) so everything starts working wrongly.
I can imagine for example that if light goes off, all my timers would go crazy, loosing control, unless I slide the slider manually.

So, is there a way to read sliders values without using CAYENNE_IN + getValue.asInt? (That requires an human action)
The other idea i had was to save the last value in memory, then in the setup function (which runs only once after resetting) read those values.

Thank you


#2

this is the only solution you have. look at this for example RFID based attendance monitoring system