Open djtef opened 1 year ago
Try https://esphome.io/components/button/factory_reset.html, it might fix that preferences error.
Try https://esphome.io/components/button/factory_reset.html, it might fix that preferences error.
The factory reset seems to resolve the preferences error. Thanks @ssieb
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem
I report this issue following the thread created on Home Assistant forum here
Summary : I made a board with 12 MCP23017 to add theoretically 12x16=192 gpio on the 2 I2C buses to my esp32. But the esp32 is stuck in a boot loop when I add 50 outputs (switch) and 52 inputs (binary_sensor) so 102 additional gpio (and 12 covers). It seems the watchdog timer limit is reached :
I tried to increase the i2c frequency from 100 to 200KHz but nothing changed. I tried to unplung the i2c plug from my board to have a standalone esp32 : same problem. I can declare more gpio without reaching this limit by shrinking the id length.
After some discussion on the ESPHome Discord server @ssieb found a workaround by disabling the restore_mode of the output gpios. Indeed, I don't have the problem anymore if I add this line on all outputs :
restore_mode: ALWAYS_OFF
@ssieb thinks that the the flash saving is taking too long. Probably because there’s so much data to save
However, I can have sometimes this error even with the workaround:
[18:15:58][E][esp32.preferences:145]: Error saving 1 preferences to flash. Last error=ESP_ERR_NVS_NOT_ENOUGH_SPACE for key=233825507
Which version of ESPHome has the issue?
2022.12.3
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
No response
What platform are you using?
ESP32
Board
az-delivery-devkit-v4 and poe
Component causing the issue
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response