The pulse counter does not retain its value after a reboot (both manual and timer).
Tested on different boards with different inputs.
I don't think anything retains it's value after a reboot. Values are not retained so as to limit the write cycles to the flash chip. Apparently this chips fail pretty fast if writing to them constantly.
The RTC memory could be perhaps used to keep some data even after reboot (but not power cycle).
https://www.youtube.com/watch?v=r-hEOL007nw
As I understand this RTC maintains the value while in deepsleep not after a reboot. Perhaps could survive a soft reboot but (most likely) not a power cycle. Probably not worth the resources ?
Indeed, it should store the last values in the RTC memory and this memory should survive a reboot as long as the chip is powered.
It will erase the RTC part if 1 bytes of data are not correct, which may be due to data corruption, or something else has changed these bytes. (change in core libs?)
I'm confused now, to my knowledge the pulse counter did /does never keep the total value after a reboot. As mentioned in the device screen; "Total value is not Persistent!" I've never seen this value retained, the total counter is always reset to 0 after a reboot. Currently running ESP_Easy_mega-20190110_test_core_250_beta_ESP8266_4096.bin on a wemos D1 mini pro. Should it be retained (due to code to use the RTC memory)?
I must have a look at the code, but as far as I know there is a part in the code which should store the plugin values to the RTC memory.
But like I said, that's only to survive a hot reboot, not a power down.
That would be great already (survive a hot reboot) as sometimes the unit reboots spontaneously.
@TD-er was this one solved? How we are making sure that our counters do retain data after hot reboot or power outages?
Thank you so much!
The output values of plugins will be restored after a (hot) boot.
So that should work.
If you have an example of a plugin not behaving well, please let me know.
Otherwise this issue can be closed.
It is not working here.
I am on mega-20200310.
I have a "Generic - Pulse counter" device, the values are not kept during reboot, even not during a sleep cycle.
I do confirm that using an self build from 13th of March source code, running espeasy on esp32dev it is not keeping data on reboot.
I do confirm that using an self build from 13th of March source code, running espeasy on esp32dev it is not keeping data on reboot.
ESP32 is not using RTC memory at all (yet), so the ESP32 will not keep any values at reboot.
Could you try ESPEasy_mega-20200310-74-PR_2952.zip to test if the pulse counter may retain its values after a reboot?
Hi TD-er, Ik can confirm with this version pulse counter does retain it's values now after a reboot! Thanks!
Now it becomes also more necessary to be able to reset the values with a command which is not working if you have more than one pulse counter on a module. see https://github.com/letscontrolit/ESPEasy/issues/2710
Hi TD-er, Ik can confirm with this version pulse counter does retain it's values now after a reboot! Thanks!
Now it becomes also more necessary to be able to reset the values with a command which is not working if you have more than one pulse counter on a module. see #2710
Did you test it on esp32?
Hi TD-er, Ik can confirm with this version pulse counter does retain it's values now after a reboot! Thanks!
Now it becomes also more necessary to be able to reset the values with a command which is not working if you have more than one pulse counter on a module. see #2710Did you test it on esp32?
I can guarantee you that will not (yet) work, as our ESP32 build has not yet support for RTC memory.
Could you try ESPEasy_mega-20200310-74-PR_2952.zip to test if the pulse counter may retain its values after a reboot?
I did test it on a Wemos Pro mini, and it works. Thanks!
Hi TD-er, Ik can confirm with this version pulse counter does retain it's values now after a reboot! Thanks!
Now it becomes also more necessary to be able to reset the values with a command which is not working if you have more than one pulse counter on a module. see #2710Did you test it on esp32?
I can guarantee you that will not (yet) work, as our ESP32 build has not yet support for RTC memory.
I did test on a Wemos Pro mini as well.