Sonoff Pow R2 persistent total over unexpected shutdown #13781
-
Hey, I am using a Sonoff Pow R2 behind another power switch which I often turn off. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Hi @mikhail5555 This being said, command
Or if you want to save at specific time of the day, you can use a Timer to trigger at a certain time of the day a rule such as:
Here, assuming Timer 1 as been set up to run a rule at your time of day choice. A last option which may not be easy would be if you can trigger a button/switch just 2 seconds before the power is cut, you could also handle that in a rule. Cheers |
Beta Was this translation helpful? Give feedback.
-
Very good idea 👍 |
Beta Was this translation helpful? Give feedback.
-
Hmmm i guess i have to mark this as not solved, after some more experiments it still seems as its not being saved to flash. |
Beta Was this translation helpful? Give feedback.
Hi @mikhail5555
The point is not to write to often to the flash in order to avoid wearing it too early.
Also I would say that willingly shutting down an IOT device is not really what is intended. Don't forget that in some circumstances that could trigger Tasmota recovery procedure, erasing all settings.
This being said, command
SaveData
without any parameter will force saving of values in the flash.You can then use either a rule based on Time or on a Timer to execute the command.
A rule like below will regurlarly save every XX minutes (here, every 60 minutes...):
Or if you want to save at specific time of the day, you can use a Timer to trigger at a c…