Almost done with HA - how to automate core updates?

Hi All,

Trying to reach out again. I have been paying for HA for years now and it is patchy at best. I am using GHome for 5 years and although it has many problems and last few months is getting worse, at least it works when I need to use it.
Home Assistant is not really… I have an integration running for my Unifi camera’s which trigger sockets for lights around my house. They work pretty well, albeit with a little delay of 3-5 seconds normally. The problem I have had since the beginning, is all of the sudden - everything stops working. I have since found what is causing the issue and it is whenever there is an HA Core update, it somehow breaks everything and renders it useless. Once I have done the core update, everything works fine again. I find myself checking the updates panel in HA often and update whenever I see a core update. But it also happens often that I want to throw something away in the trashcan and the light doesn’t turn on, although I can see my unifi camera seeing me.

For me, there is no point in the correlation of a core update being present and breaking the automation. To me, it should work and work reliably for ‘ever’, or I cannot rely on this and have to find another way of doing this.
I am tired of having to manually update all that stuff all the time.

I did find some topics about having the Core updates being done automatically, but there is not clear path on how to exactly do this. The last post is from 2022, so I am sure with all the core updates, things have changed in the meantime.

Looking forward to a response that I can actually move forward with.

Thanks in advance,
DrBobke

It sounds like you may have some integration that is slowly eating up the memory without releasing it. If so, it is not the update fixing it, but the restart. It would be weird that the software would otherwise break without it being changed. To see if I am right, you could make a graph of total memory use of HA. If the graph continuously rises and then drops at each restart (a sawtooth like graph), then some integration is not properly releasing memory.

As a stopgap you could try periodically restart HA at night. But that isn’t a fix. It would help to know what hardware you run HA on, amount of memory, which addons,… If you are running on an RPi3 then you re not meeting the minimum hardwre requirements of HA (2GB memory).

Automatic update scripts are not hard, but I would advise against it because sometimes it is a change to the software breaking things. Those things are in the release notes. You’d want to read those before deciding to do n update.

Ps.a 5 second delay between something happening and the automation responding is not normal, unless it takes the camera a long time to detect what it is detecting. For me camera detections are near instant too. For instance our car entering the garden immediately turns on the porch light.

2 Likes

Just to be clear: Home Assistant is free. You probably mean you have been voluntarily paying for remote access.

1 Like

I think you are fixing the root-cause of your problem basically with a reboot.
Personally I dont think a available update is breaking your integration / automation.

You should check the logs of your home assistant installation to see what is going on and fix the root-cause.

Either way, I am missing details to see how to help you update your core.
For me I run in a docker container, i can make a cronjob or a ha automation and both would work perfect to keep my HA up-to date.

in the early days of HA (2015-2018), I had an automatic restart automation that would just restart HA on a daily or weekly basis depending on what the issue was. These were unavoidable issues that arose from using a raspberry pi. You might just want to do this yourself. I chose 2:00:00 at the time IIRC

Hi Edwin_D,

Thanks a lot for your reply and I do apologize for the delay in getting back to you. 2 Sick kids at home will keep you from doing anything…

So, for hardware point of view. I am running HA as a VM in an Unraid build I have done. I have set it to 6 CPUs, Memory 8192M, 32G Vdisk. Further Hardware : Running Mobo Gigbyte X79-UP4, Intel Core i7-4930k CPU @3.40GHz, Memory 32GiB DDR3. I am only running a Plex Media server in a docker next to HA. Unraid is running 7.1.4 (there is an update avialable, but thought to leave it like this for now, should this impact any other questions you might have).

How/where can I make a graph of the total memory usage of HA?

It seems triggering the light on the side of the house is more ‘instant’, while on the driveway, it takes around 5 seconds I would say. Different camera’s (the “fast” one is a G5 Pro, while the ‘slow’ one is an AI Pro). The light is triggered by the exact same models in all 3 light sources (2 on the driveway - driveway and houselights and the other a flood light on the side of the house).
When someone rings the G4 doorbell pro, it takes at least 5 seconds before the Google Cast : Show dashboard view is started. It will first show the HA logo/… and then load the image from the doorbell (low res stream), driveway (low res stream) and the package camera (normal stream, as low res is not available) and an icon of a gate which is linked via a sonoff controller so I can press it and the front gate opens. I would say that it takes a minimum of 8-10 seconds before I can see the image, by which time the package delivery guys are usually back in their car and driving off. To “combat” this, I altered the automation to call the automation when it detects “voertuig” (vehicle) or “person”. I thought that would buy me at least 3 or so seconds. Very curious to see how you get the automation to be ‘instant’. Should it help : I am running a complete Unifi network with most components wired (all the cameras and doorbell are wired), but some switches are wifi, but all in close proximity of an AP. One of which is within 10cm, the others max of 4/5 meters.

Thanks a lot for your help, I really appreciate it!
DrBobke

Hi @Edwin_D , would be great if you can chime in about my message above.
Thank you in advance!

DrBobke

It is for a cloud-controlled device.

Didn’t most of those posts conclude that this is a bad idea?
I never automatically update anything in Home Assistant. You should always read the release notes just in case one of the changes would break something already on your system.

1 Like

Ho, sorry I did not respond. I did read it, but with 8GB assigned I would not expect it to run out of memory soon, so I was out of ideas.

For graphing memory and CPU the System Monitor integration should provide the info you need. Maybe the entities are hidden by default, I also think what is provided differs per host type.

If you run HAOS in a VM, the supervisor integration also provides entities per add-on. Those are hidden by default, if you enable the. you can graph them too.

For cloud devices it is hard to tell how fast they respond. The worst kind iare motion sensors or button presses. If they rely on polling to report data you are in a really bad place. Lights normlly respond faster. But I would not rely in cloud for something as important as turning on the light. My divorce would be imminent if lights took 5 seconds to respond to my spouse :slight_smile:


If this helps, my VM in unraid is setup so it has a minimum of 8GB (initial memory) and a max of 16GB.

Thank you again, @Edwin_D , I really appreciate your inputs.
I have already installed the System Monitor Integration (in HA => Settings → Devices & Services → Integration → Add Integration), which has worked and it showing up.
However, the sensors are still hidden, I was unsuccessful in installing the Supervisor in the configuration.yaml, but when I was looking more in integrations, I did find it and even enabled CPU and Memory percentage for Home Assistant Core.
I also looked in Home Assistant Host, but couldn’t find relevant sensors there for CPU and Memory usage, nor in Home Assistant Operationg System.

I did enable the sensors in Home Assistant Supervisor too, but the Memory usage in that one, seems a lot lower, as does the CPU percentage.

I am hoping that if I wait a little, the graphs will be filled, but right now, they still appear empty.

I did update my Unraid system to the newest version, so that might also have to do with it. Thought it would be a good thing to have the latest install, so there is nothing weird going on in that aspect.
Is there something else I can do in the meantime?

Also : I totally get that your wife wants to divorce you (I am kind of in the same situation with the delays). Do you know if there is anything I can do to get it faster? I am running Unifi cameras and I actually think over the last few days, it was more like 10-15 seconds delay between seeing the person coming to our gate and it pushing a dashboard view onto our Google Nest hubs (and that is just the “intro screen”, we still have to wait another 5 seconds before the dashboard actually shows up and then it is usually only the camera stream from the driveway (low res feed), the low res feed of the doorbell camera and the ‘normal view’ of the package camera (there is no low res feed for that), remain black for another 10 seconds, if they even come on at all (and then it is the feed of 20/30 seconds before, thus unworkable.
Here a screen of the dashboard view should that help =

Thanks in advance,
I will report back when I see some data come up for CPU and Memory usage. Please let me know if there is another service that I need to add an entry for to have the view you describe.

DrBobke

Completely RUDE to request or even expect a free helper on a forum to reply.

Especially on your exit post. LOL

So, as promised, I have hereby let the graphs compile for a few days and it doesn’t seem to be off from my point of view?




Does this help in narrowing down the issues I am experiencing at all? Or can someone suggest another path to follow please?