Save GPIO state on flash/eeprom

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
hsic
Normal user
Posts: 2
Joined: 15 Sep 2019, 23:10

Save GPIO state on flash/eeprom

#1 Post by hsic » 15 Sep 2019, 23:16

Hello!
I use EspEasy mega-20180130, i would save the gpio state, ex. every minute, in an .txt file, when esp boot (if occur a power outage or reboot) must read this .txt file and set the GPIO variable according to the last save.

How i can do that?
thanks

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

Re: Save GPIO state on flash/eeprom

#2 Post by grovkillen » 16 Sep 2019, 06:01

Currently no but it's planned to have external EEPROM support.
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:

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

Re: Save GPIO state on flash/eeprom

#3 Post by grovkillen » 16 Sep 2019, 06:03

What is the intended use case?
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:

Domosapiens
Normal user
Posts: 286
Joined: 06 Nov 2016, 13:45

Re: Save GPIO state on flash/eeprom

#4 Post by Domosapiens » 16 Sep 2019, 10:06

What is the intended use case?
For me .... to let relay's controlling pumps survive their activity despite all watchdog reboots

I store GPIO states controlling a relay, in a dummy task.
With a Rule:
"On System#Boot do"
I restore the last known GPIO state

This works for a hot-boot, NOT a power outage.
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

hsic
Normal user
Posts: 2
Joined: 15 Sep 2019, 23:10

Re: Save GPIO state on flash/eeprom

#5 Post by hsic » 18 Sep 2019, 22:46

grovkillen wrote:
16 Sep 2019, 06:01
Currently no but it's planned to have external EEPROM support.
For now i've solved with an UPS to avoid any power outage...
hope that this features (persistant relay mode in case of power outage) will be arrive soon as possible.

Thanks

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 12 guests