Easier way to update firmware?

I’ve noticed there have been a few rapid updates to ESPHome lately, and as I have gotten more devices (up to 25 now) the “update all” doesn’t actually make it thru all of them before it gets stuck and/or times out. I also have 1 that goes to deep-sleep and requires manual intervention.

Is there some way I can use automations to schedule updates when they are available? Or at least some way I can make it get thru all of them with the “update all” button instead of hanging every few?

3 Likes

If you are running the current versions of both ESPHome and HA you are supposed to be able to upgrade OTA using an automation, which I assume you can trigger when the device comes online.

It’s covered here:

Oh nifty! That’s actually the version I’m in the process of trying to update all my devices to at the moment.

Hopefully I’ll be able to find some documentation on what service call is required to push firmware updates/changes.

Yeah sorry - doesn’t help much doing that does it… :smiley:

I don’t see any docs yet on what a service-call will look like to trigger such an update but hopefully that documentation will materialize soon.

Once you get things updated, have a look at the existing update.install service, you will now see it supports ESPHome entities. I haven’t tried it yet.

EDIT: And it errors out with some log messages about “Unable to find referenced entities”. Guess I will wait for the doco too.

1 Like

Ah, now that I know its under “update.install” not “esphome.something” I was able to try it but apparently it can’t cope with being asked to update to the same version (reinstall). That’s a bit unfortunate.

service: update.install
data: {}
target:
  entity_id:
    - update.s31_matt_bedroom_filter_firmware

But it does sound like maybe I could just make an automation or script that has ALL my things in it and trigger that more easily to bulk update potentially.

I may not swear. But F#, 5th time in a week all my devices where “out-of-date”. 42 in total. Before I asked (in a WTH) if I could opt-out devices in the esphome interface not to update.

But now updates are even more prominent in my home assistant interface.

42 updates available.

And I feel there’s no good or bad here. I believe being up to data is always better than lacking behind, especially in the IoT world. But 5x42 updates in 6 days? Skipping updates or disabling notifications is not a valid way. Updating all 42 with a 1-2 day interval evenly not.

What is the proper way to manage this HomeAsstant (and ESPhome) team?

4 Likes

Maybe we need more refined update categories and changelogs.

At work commercial OS stuff like Windows or RedHat put out updates in categories so stuff like “security updates” are required and automatically applied checking multiple times a week but “feature upgrades” are only manually applied after careful evaluation of whether its needed and the risks of regression or impact to production.

Right now all updates are just updates - so you get an “there’s an update” whether its a major security flaw or just they added some new widget that you don’t care about.

If they had update categories then you could pick and choose if you care about alerts for security related updates available or any updates available.

In my case, especially for esphome, I usually don’t care about updates to the devices themselves. I have them in a separate VLAN where nothing else can get at them and they don’t have internet access there’s not a lot that can go wrong between the esphome boards and HA on that separate isolated network even if they are out of date. But I care a LOT about whether HA itself is up to date if there are any security related patches especially.

1 Like

Why is that? Guess you skipped updates before as you are only now aware of the regular update interval of esphome?

You can just disable the update sensor on your esphome devices OR don’t update the esphome dashboard to don’t get notified.

I’m very much with you here.

:100:

Maybe they will ship the “security updates” with repairs in the future? Who knows…

You pick out a single sentence? Guessed wrong, I always was aware, but the frequency and notifications have gone up very high last weeks.

How is that different from January (actually in total more updates than in February :wink:):

or December with even two releases on the same day?

It’s very normal that after the monthly release bug fix releases coming in :man_shrugging:

Keep on rolling :game_die:

You’re picking your response again on a part of the sentence :slight_smile: .

I never had any issues with updates, just managed them alone in the esphome addon. Now they’re also popping in HA it’s more “present”.

When I quote your whole post the @system will just auto magically remove the quote completely :wink:

I posted already how to “opt-out” on update notifications for particular esphome nodes or how to do it for all - the rest is up to you :wink:

PS.: I now circumvented actions from @system by quoting your whole post in two parts :muscle:

I suspect a lot of folks that don’t like the recent changes to ESPHome devices would have less of a problem if there were accompanying changes that made it easier to opt out of the bulk update process.

That’s very obvious with the amount of users “complaining” on various channels - including this forum :point_down:

I actually expect that based on the user echo we will sooner or later find a option to fine grain update notifications for esphome in HA (like for all update, for security updates only or even disable it completely). In the past @frenck or @jesserockz always took valid feedback into account and everything turned out to be even better in the end :trophy:

Agreed. Those guys rock. :wink:

Or if there was an easy way TO bulk update? I’ve had very poor results trying to update my 20 or so esphome nodes often requiring me to make 5-10 attempts to get thru the update-all, and one of them can only be updated when it “phones home” due to solar/battery deep sleep. Seems like it times out and then doesn’t finish the job in bulk.

But yeah regardless it’d be nice if it was less nagging. I don’t care that its got a big number but when it hides any OTHER relevant updates due to the number of ESPHome updates that’s an issue. I want to know about them but probably only care about certain ones.

I have 20+ ESPHome devices in my house and I’ve spent quite a bit of time thinking about this too trying to decide how to handle it. I think @sender said it well with this line:

For now, I’ve been turning off “Enable” for the Firmware value on almost all my ESPHome devices so I can reduce the number of notifications. I don’t really want a notification for every device to show up on HA because most of them aren’t going to be impacted by a FW flash from the new ESPHome release. I do want a single notification that ESPHome devices are out of date. I would like it if any ESPHome devices were out of date, it would bundle them up into a single notification on HA saying “An ESPHome device is on old FW”.

The best long-term approach I can think of is to figure out dependencies from the ESPHome YAML file on each ESPHome update and decide then the criticality of each update to an ESPHome device deployment. I envision any update that has a change which is touched by the implementation should be flagged as a node needing the firmware flashed. You could even go so far as to decide on the importance of the FW update based on the changelog if the developers published a grading scale of some kind.

Anyway, that’s my pie-in-the-sky wish list that probably is unattainable. :stuck_out_tongue:

I think the solution is even simpler.

If you device is working then don’t update.