Page 1 of 1

Save GPIO state on flash/eeprom

Posted: 15 Sep 2019, 23:16
by hsic
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

Re: Save GPIO state on flash/eeprom

Posted: 16 Sep 2019, 06:01
by grovkillen
Currently no but it's planned to have external EEPROM support.

Re: Save GPIO state on flash/eeprom

Posted: 16 Sep 2019, 06:03
by grovkillen
What is the intended use case?

Re: Save GPIO state on flash/eeprom

Posted: 16 Sep 2019, 10:06
by Domosapiens
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.

Re: Save GPIO state on flash/eeprom

Posted: 18 Sep 2019, 22:46
by hsic
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