How does RM get back the last data that was stored in the cloud, after a powerfail or reset, I thought maybe it was built in but my code currently does not do this.
Richard.
In case of power fail
-
- Posts: 309
- Joined: Wed Feb 20, 2019 7:02 am
Re: In case of power fail
The firmware does not really get the last data stored in the cloud. Rather, the cloud always has the last data reported by the device. For parameters like "Name", the PROP_FLAG_PERSIST flag is provided while creating the parameter as you can see here. This ensures that the value is stored in persistent memory and is retrieved on a reboot. Your registered device write callback gets invoked automatically when you add such a param to the device and a value for that is found in persistent memory.
Alternatively, if you want to be able to send some commands to the device even when it is offline and expect it to receive them when it comes online, you can use the command response framework.
Alternatively, if you want to be able to send some commands to the device even when it is offline and expect it to receive them when it comes online, you can use the command response framework.
Who is online
Users browsing this forum: No registered users and 28 guests