Update HA automatically

The little icon saying there’s a HA update bugs me. I detailed how to automate the update process in a post

Basically this script can be setup to run on a cron job.


docker pull homeassistant/raspberrypi3-homeassistant
docker stop hass
docker-compose up hass

# commit the version file
cd ~/ha
git add .HA_VERSION
git commit -m "updated to v$(cat .HA_VERSION)"
git push

I generally think automatically updating HA is a very bad idea.

There are always breaking changes. Most times they don’t affect me. Sometimes they will. It’s like a time bomb waiting to go off. Suddenly My HA install stops working and I have no idea why. Then the headache of the troubleshooting begins…:exploding_head::face_with_head_bandage:

2 Likes

I do auto updates with https://github.com/v2tec/watchtower

1 Like

That is perfect. Will update my script!

That approach works as well.
For me, If it breaks I’ll know immediately and I can either fix it or roll back to previous version. You have to update eventually so might as well fix it along the way

The git command saves timestamp and version information. I can check which version it’s running and compare the change log.
If I don’t have time to fix it right now, I can always roll back to previous version and leave it for a while.

I prefer it automated because then my version and configuration won’t fall behind the latest release and i don’t have to check 5 change logs for a breaking change.
Updating multiple versions at once increases the chance of multiple things breaking as well. That’s when the real troubleshooting nightmare begins when you have 5 change logs and no way to narrow down the scope.

That is not automatic then. It requires testing and manual rollback/fix.

Why not read the breaking changes first?

1 Like

Its automatic 9/10 when there are no breaking changes and that is good enough.

1 Like

what if you are not running it inside of a docker container? I don’t see how the script works then.

It doesn’t. Although you could undoubtedly script that too.