ESPHome update broke my thermometer

An update yesterday broke one of my ESPHome devices. For some reason it seems to have c hanged the name of my device at random and then refuses to connect to the device. I decided the best thing was to reflash the original Yaml file which I did successfully. The device appeared in the ESPHome addon, but there is now a API mismatch which wont allow me to configure the device.
I have seen this before and the solution was to use the ESPHome web interface to do a deep scrub of the device firmware - but this is a major pain as it requires me to strip out a fiddly box and solder on a header.
Are there any less invasive solutions to this issue.

I have never seen this. Please share the device configuration and the serial logs.

^^ That! And what thermometer are we talking about? :slight_smile:

No logs, no yaml, no versions, no issue.

It happened to me before (not onceā€¦) - after upgrade device was ā€œdeadā€. Sadly, only solution is to reflash via UART. I doubt itā€™s esphomeā€™s fault, i guess that something goes wrong during updating. In any case of API problems delete device from HA and re-add it.

I guess no one even knows what was updated? Esphome? Home assistant?

An update of esphome itself will not brick a device, you need to update the firmware for that to happen.

Why do people update the firmware on devices that are working? An old computing adage: if it ainā€™t broke, donā€™t fix it.

4 Likes

I agree with you on that, but it also has a negative side. Esphome (and also Home Assistant core) sometimes comes with breaking changes. I want to be up to date with those instead of piling them up. In that case, it would be a much larger job with updating the yaml code if it has been ignored for years and I am one day forced to update it for some reason.

But I donā€™t update all of my esp units. Usually I update only one of them and I select the least important one. Only to make sure esphome still works after the update to a new version, which is not always the case. Over the years, I have reported several issues on github.

Also agree, but there can also be a need for security reasons. You may not have known it was broke, but it was. So every once in a while is wise, but certainly not every update ESPHome throws at us.

If you have security issues within your local network then I believe the ESP-device is the least of your issues.
The only time it could potentially be an issue is while your router is rebooting and the ESP becomes an access point.
Sureā€¦ it could happen.

But yet again I repeat myself. Allow us to preserve the version of ESP-Home for devices even when we update they yaml in them.
If we could do this then there are much less breaking changes. Most of the times you update something in a device you are fine with the version it has running, you just want to change a picture or add a sensor.
But that small change compiles the new version and everything is broken.

Just give us a little tick box to ā€œpreserve versionā€ and all this will pretty much never be an issue again.

Its the one thing with opensource which really bugs me, there are constant changes been pushed all the time and I have had many instances when an upgrade breaks things. Its the issue with projects driven by developers rather than companies, companies rarely upgrade their firmware. I worked in infrastructure where they were still running win95 because the cost of breaking changes was people going without water so it was never worth the risk of potentially sending the system down for hours or days.
Rant over.

To be clear what happened is that ESPHome addon asked for an upgrade and as most people will be aware this always cascades into upgrading the firmware on all devices. I suspect there was some minor misconfiguration on my part which borked the upgrade but once the damage is done its done. The issue is that ESPHome retains the API key even through simple upgrades so even though you can do a simple reflash - this often leaves Homeassistant refusing to connect to the device due to API mismatch.
I have taken the device apart again and managed to reflash it again, and the device is on the network - but HomeAssistant still refuses to CONFIGURE the device. I have attempted to reflash using ESPHome Web but so far this has failed to recognise my device so I havenā€™t manged to reflash the legacy API away.

None of my esp devices are accesible from outside, since thereā€™s no need, they connect to HA only. And none of them can run access point, again, since thereā€™s no need - all of them have static ip and ā€œburned inā€ ssid and password, so if it wonā€™t connect then ap wonā€™t help either.
As said above, if security (inside of your local network) is the problem then espā€™s are least of your concerns.
I update my espā€™s only when/if i add/change/remove a function, or if thereā€™s a breaking change and something stops working.
We were discussing already about needless warnings of esphome fw updates in HA elsewhereā€¦

Its not connecting via the UART now so I suspect it took some damage in the tinkering to get it back up and running. I ainā€™t wasting more time trying to recover this since the board seems very temperamental to start with. This board is a ESP8266 and I think I will rebuild the thermometer using a ESP32 based board. Its a pain to lose the functionality but I can get it back by the end of the week with minimal hassle.

I got it connecting to the UART and flashed it in ESPHome web, but it never connects to the network after that even though it knows what IP address to look at. The odd thing is that it flashes over the network fine but then never proceeds to logging and when I try to connect to the ESP Home addon to see whats going on its gone. I am starting to think that ESP did something to the WIFI stack which has reduced sensitivity in operation.

As I said before this is life sucker and no fun so I will replace it with a ESP32 board.

Additional, if you keep skipping updates and then suddenly you need to update for whatever reason, the jump might be to big and youā€™re in bad shape completely with lots of work at your hands.
Itā€™s like ā€˜lets keep java8 running because it worksā€™, but it will shatter you when support runs out on surrouding environment and you need to move forward.
There is definitely a balance to update any update you get and being smart keeping up to date.

Not if you do this:

I only update my devices if I read about a breaking change in the ESPhome release notes that affects my devices.

However this is so rare that I occasionally do a periodic update, like every 6 months or so when I have some spare time and am bored. Iā€™ll do a test update on an easily accessible device first, before updating all the rest.

Iā€™ve never had an issue caused by updating.

1 Like

its worth knowing about this add on repo. GitHub - khenderick/esphome-legacy-addons: ESPHome addons from previous versions. Just in case something isn't working with the new version

3 Likes

I donā€™t think I could roll back and solve this since it was a change of name of the device which seems to have caused the original issue.
I have a ESP32 board coming later today and I am going to remodel the arrangement of the components to allow for easier maintenance in the future.
My needs from home assistant are very basic so ultimately I will probably freeze my install once I have a few more things sorted out.