Home Assistant appears to go to sleep and only reawakens when the UI is accessed.
My (non-smart) wireless thermostat has recently stopped working on my boiler so I took the opportunity to use Home Assistant to replace the functionality. Using a Sonoff Basic R3 and the temperature sensor in a Blink camera that is installed near where the original wireless thermostat lived. However, I’ve noticed that HA doesn’t always turn the boiler on or off when the temperature limits are met.
Examining this led to the discovery that HA appears to go to sleep until the web UI is accessed. When I look in the logbook there is a gap in the activity, for several hours, that only resumes at the time I check the UI. During this time HA doesn’t seem to notice anything and no automations run. Normally, HA is quite verbose in the logbook recording several things a minute.
I’m running HA as a virtual machine in Hyper-V on a very stable Windows Server 2019 server, which is also running a couple of other VMs without issue.
Can anyone give me some advice as to where to start looking for a cause for this behaviour?
I will do that but I’ve just noticed an odd behaviour.
Because I’ve been doing more with HA, I have left the Overview page open on my main PC. When that PC goes to sleep HA stops working. The thing that gave it away was, when I used my phone to check the website (not the app) it wouldn’t load and would eventually timeout. However, as soon as I woke up my PC everything comes back to live.
To be completely clear. This is NOT the computer running the VM. The server running the VM is in the garage and serves other websites absolutely fine. This is linked to my client PC in the study.
I guess there’s a lot of Ajax running on the front-end. Is it possible there’s a thread lock somewhere? I’m going to test this further by closing the browser on the client and seeing what happens.
I’ll investigate the other logs you mentioned too to see if there are any clues there.
The frontend has nothing to do with the core of HA, they’ve been separated for a long long time now.
Heck, there’s weeks that go by without my using the frontend. If this was a common problem lots of people would have seen it. Personally, I’d be looking at your VM host.
Although I do have HA running on the server, it’s because I migrated from my desktop PC. However, I didn’t shut down the version running there. When the PC goes to sleep…HA goes to sleep.