evgeni / esphome-configs

39 stars 13 forks source link

Saved remotes lost after updating firmware #30

Open Siempo2000 opened 1 year ago

Siempo2000 commented 1 year ago

Hi Thanks for this awesome piece of software. It had me tinkering for a nice few days with a 8 pin CC1101 (blue) I as able to connect the remote with PAIR successfully and it remained working after several ESP32 reboots.

However.. once i updated the firmware via esphome the buttons did not work anymore. Worst part i was not even able to re-pair them. Even tried erasing flash before upgrading the firmware (esptool --chip esp32 erase_flash)

Only after changing the id (0x123456) to something else in somfy_secrets.h i was able to pair my remote again. Anyone knows what am i missing here?

Thanks, Siem

evgeni commented 1 year ago

This sounds like the rolling code was deleted from the flash and thus the shutters didn't accept the remote anymore (but I would have expected newly pairing them would work with the same secret).

This didn't happen to me yet, so just dumping thoughts

Siempo2000 commented 1 year ago

Yes that's what is puzzling me too i was expecting to be able to re-pair the same remote ID from the secret. Do you know if there is a way to backup the rolling code before re-flashing the ESP32?

evgeni commented 1 year ago

You shouldn't have to, but reading https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/nvs_flash.html it's probably easiest to dump the respective partition.

That page also lists the one case where the data could be lost: when the partition layout changes.