Closed Mri007 closed 1 year ago
Please provide more details about the issue. It will also help if you provide logs.
Suppose i have one light turned on from mobile app. It remain on till i turn off esp32. After re-powering esp the light remain off.. It doesnt sync with cloud after connecting to wifi i.e. turn the light on again.
@Mri007 , we do not have logic of fetching previous state from cloud because it is not guaranteed that the cloud has the latest state. Instead, there is an option to store it in nvs memory. You just need to add the PROP_FLAG_PERSIST
as shown here. Then, after a reboot, the RainMaker core code will invoke your callbacks with the values from nvs. Note that the write callback should be registered for the device before adding the param, for this to work.
Closing this issue as appropriate solution has been provided.
The esp32 doesnt sync with cloud after powering off and turning back on.