Giter Club home page Giter Club logo

Comments (5)

OttoWinter avatar OttoWinter commented on August 21, 2024 1

Exactly. ESPHome doesn't use the EEPROM functionality because of a few reasons:

  • Limited number of write cycles, if some component writes a lot of updates you will wear out the flash over time.
  • Slow. Writing to flash on the ESP8266 is slow, when erasing a page for writing you can get delays of up to a couple hundred milliseconds if I remember correctly.
  • Buggy. The ESP8266 EEPROM implementation is known to be unstable when using the hw timer at the same time (for example for PWM)
    I'm closing this because it's a won't fix - and there are other issues like this one in the issue tracker already.

from esphome-core.

brandond avatar brandond commented on August 21, 2024

ESP8266s do not have any persistent NVRAM. They can remember states across reboots, but not power loss - so this might be only partially achieveable.

from esphome-core.

pavolholes avatar pavolholes commented on August 21, 2024

ESP8266 have EEPROM builtin, do you think this might be used? I used it in past in some simple sketches.

#include <EEPROM.h>

https://arduino-esp8266.readthedocs.io/en/latest/libraries.html
Examples: https://github.com/esp8266/Arduino/tree/master/libraries/EEPROM

from esphome-core.

brandond avatar brandond commented on August 21, 2024

On ESP8266 it is faked with flash memory, which has a limited number of write cycles.

EEPROM library uses one sector of flash located just after the SPIFFS

from esphome-core.

markcarline avatar markcarline commented on August 21, 2024

I see this issue too - but wonder if either via the HA API or MQTT if esphome devices can read HA in some way and restore the "on" and "colour" value back to the before power lost state ?

from esphome-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.