save value on memory also if esp is rebooted

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

save value on memory also if esp is rebooted

#1 Post by megamarco83 » 10 Dec 2018, 14:19

hi, i have a pulse counter to record my gas consumption
i use the task: generic - pulse counter
and i record the "total"
is it possible to save this value to persist when the espeasyy if rebooted ?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: save value on memory also if esp is rebooted

#2 Post by grovkillen » 10 Dec 2018, 15:22

No, the only way of getting it persistent is to have it fed back into the unit by a controller or a broker.

It is possible to have a external EEPROM for saving stuff like this but we have not (yet) implemented that.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

Re: save value on memory also if esp is rebooted

#3 Post by megamarco83 » 16 Dec 2018, 21:03

I have a pulse sensor to monitoring gas value and i'm looking for total value.
Every time that i reboot or power off sonoff with espeasy i lost the total and the total become zero
How i can prevent that?
Any idea or workaround?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: save value on memory also if esp is rebooted

#4 Post by grovkillen » 16 Dec 2018, 21:11

If you use MQTT you could have the total reported to the broker and if it's set to be retained you could have it fetched upon boot.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 63 guests