Hi
I am wondering if I can store a variable persistent in a flash part maybe config sections ?
thanks T
store a variable persistent in config section
Moderators: grovkillen, Stuntteam, TD-er
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: store a variable persistent in config section
Yes and no. Nothing which is set dynamically will survive a boot. BUT you can use a MQTT broker and MQTT import to fetch the value from there (if you have the retained setting checked).
But we're discussing a external flash (EEPROM) which could be used.
But we're discussing a external flash (EEPROM) which could be used.
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: store a variable persistent in config section
I'd like to re-activate this question: for quite a few of my ESP's I programmed myself, I had the necessity to store values that would survive even long periods of no power.
Either because I do not want to enable WiFi or simply because I can't.
Yes, I know, memory cells are wearing out, like all hardware and us human beings, too.
But a change from time to time shouldn't really harm the devices.
Maybe there's a chance to get this feature - or is it already available - and I have browsed only those messages were it wasn't?
As ESP Easy already uses persistent storage, it shouldn't be a big effort ... credentials, drivers, rules, all seem to be pretty persistent. Maybe a small change in the device's section or a few new system variables would do?
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: store a variable persistent in config section
We're discussing implementing external EEPROM as well as a command to store to flash.
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: store a variable persistent in config section
I was just looking at the same thing as I need to be able to save threshold values from time to time that need to survive a cold re-boot. At the moment I am trying an instance of regulator (PO21) where I can use the setlevel and getlevel commands. I couldn't find any reference to any other method. Prior to this I was using the MQTT method but this needs to be stand alone with no MQTT broker within reach.
Re: store a variable persistent in config section
Currently, using P021, the Level plugin, is the easiest way of storing and retrieving a value that'll survive a cold boot/power down. Just be aware that storing the value (too) often will wear out the flash storage.
/Ton (PayPal.me)
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 3 guests