How to keep everything automatically up to date?

Hi HA assistant is pretty neat. But one thing I find a pain is always having to manually update everything. Every month or so some element of my home automation will need updating and when I look at home assistant, it’s either home assistant that needs updating, or maybe one of my integrations.

But I would much rather just set it and forget it. Is this possible?

5 Likes

There are often changes to the way things work so not a good idea to auto update ha without reading the notes

6 Likes

Yes, but is there a way regardless? I mean maybe I could get an alert from HA somehow that an update has either been done, or is required, rather than it simply stop working until I update. Right now the updates are too frequent, which is a good thing of course, but it means I am often having to deal with the HA interface. Set and forget would be my preference and if this isn’t possible, then set it and forget it, with notifications when an update is either performed automatically, or is required to be done manually.

2 Likes

You can set addons to update automatically. Supervisor will also update itself. It’s only core that waits for the user to initiate. I’m not sure what stops working if you don’t update? Tbh that’s more likely after an auto update if there was a breaking change.

It just seems every time I get around to looking at it (about once a month, usually when something seems to not be working) that both the core and the OS need updating.

If I could somehow just either do auto-updates, or I could be notified when I need to manually update, I probably would mind so much.

But it seems you guys are saying this can’t be done?

2 Likes

There’s an updater integration that creates a binary_sensor that turns on when an update is available. You can use that to trigger an automation that sends you a notification.

If you’re really adamant about auto-updating (which I think is a terrible idea, btw), you could run HA Container and set up cron jobs to pull the latest stable image daily and recreate the container if need be.

People who understand how to fix their system when this breaks it have done it - with HA Container (native Docker) anyway.

It will result in a non-functioning HA system, or partially functioning one, from time to time. That’s less common than it used to be, but given that breaking changes still happen every release, it will happen to you.

Bluntly, you should only do this if you know how to fully recover a dead HA system from backups, and know how to auto-update. If you need guidance in any of this then it’s not a good idea :wink:

5 Likes

I’m really just looking at my options thanks.

So I haven’t gotten around to making any integrations yet. Maybe this should be my first. If I wanted a text or a notification to be sent to my phone when updates are available, how could I do that?

I also don’t see the distinction between manual update and automatic update? If I find an update is required manually, I will usually just do it, probably because something is already not working as it should. So given I haven’t skipped a manual update yet, the risks of something breaking seem the same. If possible I would only like to update from the most stable branch, so no nightly snapshots or anything like that preferably.

I am also an IFTTT subscriber if that makes things easier? Although I would also be interested to know if there was a way to achieve this goal without IFTTT?

2 Likes

Manual update gives you the opportunity to read release notes paying attention to breaking changes and deprecated elements, and fix them as part of a manual update process.
I don’t automatically update my homeassistant install any more than I would leave Windows Update to automatically install updates on the servers I manage for my employer.

There have been a number of fundamental changes to homeassistant over the past year that have changed the way existing functionality behaved - releases do not just address bugs, they drive the project forward in line with the central architectural vision which naturally evolves over time.

There’s an example notification on the updater integration page:

3 Likes

Can you elaborate? What has stopped working for you until you update?

2 Likes

At the minute, Phillips Hue has stopped working.

I do understand his question, most of the people (included me sometimes) do not read the update notes, sometimes we just simply push the button and see if everything stop working, and if we have a serious trouble we just reload from the last backup, but having to click the update button manually has only 2 options, or you click and wait (preventing you to do whatever u are doing) or you have to remember to click it at nite before going to bed which will also impact in my good nite routine.

I have a similar question, there is an script in HA that can run during the night and do the upgrade without me checking.?

6 Likes

I think Microsoft have been doing automatic updates for a long time now - and they mainly view them as beneficial. I don’t mind my system occasionally borking from time to time, but surely there’s a way of not just auto-updating, but of automatically creating a backup when a new version is created, then installing the latest update? Where is the harm here? Worst case scenario, the user just reverts to the last known good configuration. Again Both Microsof and Apple and many other big players have been doing this for years. Hey I’m lazy. If I wasn’t lazy, I wouldn’t have automated the living poop out of my home, lol. Nobody wants to be troubled by a requirement for frequent manual updates. I get some guys here come at it from previous sys admin experience and auto-updates are against their religion, but a simple user experience should be more straighfoward.

1 Like

ok, I fully align with @jebus2504 and @cfpandrade here. I also look for auto update. I have daily backups to my NAS, so if something happen, I can revert quickly but I don’t want to update HA all the time manually.

4 Likes

Also don’t see a reason to not auto update minor updates or patches…
I get a little annoyed to see every day a new minor update ready to install

3 Likes

Even MS recognized the error in their ways and now don’t do forced automatic updates without at least a warning.

What happens if the auto update/breakage happens in the middle of the night? or if you are away from home? Or you just don’t have time to fiddle with HA right when it breaks?

You don’t have to update to the minor patches if your current major release is working for you. There’s no purpose for that at all.

1 Like

That warning is still non optional. The only way to stop updates since Windows 10 is to continue to manually postpone them indefinitely.

But even here there’s system restore that can take you back to a last known good configuration. In Mac (which I now use most often) there’s Time Machine, which has the same outcome.

I have ran both MS and Mac systems for many, many years. In all that time, I have never once had any issues as a result of automatic updates. Indeed the reverse has been the case, as the philosophy of automatic updates is that they help keep the average user more secure, which in most cases is true. I have seen users with older systems where it was still possible to disable automatic updates and their systems are invariably riddled with viruses, spyware and security flaws. They lack both the knowledge and the motivation to keep their systems up to date themselves. Which is why the whole idea of automatic updates became a thing to begin with.

But MS is a bad example maybe. Linux types don’t like them. I know this. But in this case what is the harm of having a facility to do an automatic back up when updates are available and providing a tiered choice of what updates to install? Critical updates for security type vulnerabilities, feature updates for major feature changes, or all updates to regularly update everything?

I don’t mind if things occasionally break. Chances are that if they break for me, they will break for others with the same affected hardware as me and the devs here will learn about it soon enough and it will be fixed in the next update.

Forced manual updating is simply a laborious and tedious task. I want my home automations just to run. I don’t want to continually need to interact with the system that makes this possible. If I occasionally need to fix something, the so be it.

1 Like

Or until you have time to sit down and do the update at your convenience so that if something breaks you can be there to try to fix it.

That’s my point. MS no longer does a forced update with no warning and no way to postpone it. There was a reason they changed that. People got tired of their stuff breaking in the middle of the night and being forced to deal with it when it’s the least convenient.

That software is not HA. HA has regular intentional breaking changes. Not to mention the unintentional bugs that invariably pop up after an update.

Completely different use case here.

MS is always being attacked and need to update for security vulnerabilities and only occasionally they add features that might cause a bug. MS can do extensive testing prior to a release to minimize the chances of a bug being introduced (tho it does happen).

HA has only ever had one or two critical security patches that I know of.

How many times have you seen MS announce a software update that introduced an intentional breaking change? Not very often (if ever).

How often have you seen that from HA? literally almost every release.

You are one of the few.

I don’t like things to break but at least if I know they will break I can then set aside time to do the update and take care of those breaking things then and there.

And that also misses the possibility that things will break unintentionally and I can’t even know for sure that an update won’t break anything that wasn’t listed as a known breaking change even if I do read the release notes. The way you are suggesting would negate the user even reading the release notes at all to know that a breaking change is coming.

We already have most users who just click the “update” button without reading the release notes even tho it’s recommended all the time and then are outraged when things break. Could you imagine the reaction to an auto update that breaks things “without telling them”?

I would much rather handle those situations at my own convenient time than to have those things forced on me on someone else’s time table by a bad update.

The system isn’t designed to have any distinction between those two aspects. There are no “major feature changes” outside of “everything”.

No one is forcing anyone to update at all.

If you don’t want to do an update then don’t don’t do the update.

So do I. Which is why I never want to auto update anything.

However, all of that said, assuming you run a dockerized version of HA (everything other than HA Core in a venv) then there are ways to automate updating of every aspect of HA.

look at “Watchtower”.

There may be others but I never use any of them.

1 Like

Which is an endless source of amusement when used with Home Assistant.

For others anyway, as people come to the forum/Discord/etc since HA broke and they “did nothing”. Eventually you find out they’re using Watchtower, and were hit by a breaking change so HA is down for them. Often these people have spent hours in frustration trying to work out the problem… yet not checking their logs.

2 Likes

Jesus, that is one long ass response, lol. How about having automatic updates as an option, as I said? If you are so religiously opposed to them, just don’t enable this as a feature. I on the other hand - and a reasonable number of other respondents here would prefer it as an option.

This should be about choice. I have had automatic updates turned on on all of my systems for over 20 years - or at least for as long as this has been possible. I’ve never experienced any of the calamities that you allude to. If anything ever has gone wrong (which I don’t recall it has), it has been relatively minor and easy to fix. (Not least with the ability to roll back to the last known good configuration.)

10 Likes