Best Practice for Setting Variables Through the Cloud

I am looking at setting variables on particle devices to either on/off or a specific value(e.g. 133).
I understand this can be set through particle functions, but they get reset when the particle loses power or loses internet.
So, what is the best practice for maintaining the set variables?
Is it best to have the particle retrieve those variables from another place where they are stored, or is there a way to set them through functions and have them stay even when the device is reset?

Thank you

Nope, not when internet connection is lost.
Also when using retained variables the values will still be valid even after a reset.

Additionally you can use EEPROM to store values even over a complete power loss.

There are other options (e.g. device notes) but Iā€™d rather go with retained.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.