I have seen a bunch of similar posts in my research trying to figure out what the problem with my HA install is, but so far none have been able to solve this issue for me. The issue is that none of my automations run, or don’t run reliably, ever. Initially, I set up an automation that was supposed to run a scene at sunset. If I manually triggered it, it would run, but never on its own. I messed with my longitude and latitude in the config file, I triple-checked my location/timezone, couldn’t figure it out. So I decided to make an automation that just triggered that scene at 6 pm every night. Even more simple. But it wouldn’t work either. Again, I could manually trigger it, but at that time each day, nada. What’s even weirder is that sometimes that automation would run at the strangest times. More than once I was awoken in the middle of the night by all my lights turning on. Sometimes it would happen at like 10 am, but never two days in a row/every day.
So after talking with some people on Reddit and the HA Discord server I decided that maybe it was my installation that was the problem. You see, until last week I was running HA via a VM on my old MacBook Pro. The thing is from 2009 and was somehow still running on the original HDD, so I figured I would update it a bit and install Linux right on the machine so I wouldn’t have to bother with the VM. I bought a new SSD and memory to upgrade my RAM from 4GB to 8GB (why not?). I read the community guide on Installing Home Assistant Supervised on Debian 10 so I figured that was the distro to use since it would give me a supported installation of Home Assistant Supervised. I made a Debian disk image and installed it on the new SSD. Now the Macbook is only running that OS.
I then followed the guide above to install Home Assistant and restored my system from a snapshot I had taken. Everything works beautifully, it’s faster than it was before and I really thought my issue might be solved. I made an automation that would turn off my desk light at 10 am and sat here at my desk working away, waiting for 10 am to come. Well… it’s come and gone and the light never turned off. I want to move on to more complex parts of Home Assistant like turning lights off in rooms that haven’t been occupied for x minutes/hours or checking temp from a sensor in one room and sending an MQTT message to my Sonoff RF bridge to turn on the in-window air conditioner. I just don’t think I will have success if I can’t get the most basic automations to run. Can anyone think of something I can try to get things rolling?
As I’m pretty new myself in the HA business I’ve been to some try & error by myself. I don’t have any clue what little thing could be wrong but I have to ideas for you:
Just post your code for one of those simple automations and we can check if we find something unusal.
You said that you restored you’re maybe faulty configuration fram a snapshot. Have you tried to put up a fresh installation with maybe just a few integrations to check if that helps in the first part?
I created this automation on the front end (Configuration > Automations > Add Automation) and built it with the visual editor. I did not reload the automation file, but I will try that. Gonna change it to noon to see if it runs. File Editor won’t let me save the file without the ’ ’ around the time.
The only thing there is when I manually triggered the automation. I have updated it to run at 12 pm so I will post back afterward with the log so you can see.
Here is a copy of my log with every entry since I initiallized HA yesterday night -
2021-05-10 22:42:22 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
2021-05-10 22:42:22 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=10 from 2021-05-06 16:16:39.180510)
2021-05-10 22:42:24 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from supervisor (172.30.32.2). (Python/3.8 aiohttp/3.7.4.post0)
2021-05-10 22:42:28 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from a_arredondo.lan (192.168.86.39). (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36)
2021-05-10 22:42:28 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from a_arredondo.lan (192.168.86.39). (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36)
2021-05-10 22:42:30 ERROR (MainThread) [homeassistant.components.mqtt] Failed to connect to MQTT server due to exception: [Errno 113] Host is unreachable
2021-05-10 22:42:39 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.front_door is taking over 10 seconds
2021-05-10 22:42:39 WARNING (MainThread) [homeassistant.components.ring.camera] Time out fetching recording url for camera camera.front_door
2021-05-10 22:45:29 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring active dings data: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2021-05-10 22:47:29 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring active dings data: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2021-05-10 22:48:29 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring active dings data: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2021-05-10 22:49:39 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from debian.lan (192.168.86.103). (Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0)
2021-05-11 08:00:46 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring active dings data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2021-05-11 08:00:46 ERROR (MainThread) [homeassistant.components.hue.light] Timeout fetching light data
2021-05-11 08:00:46 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Timeout fetching sensor data
2021-05-11 08:00:46 ERROR (MainThread) [homeassistant.components.hue.light] Timeout fetching group data
2021-05-11 08:00:50 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring device data: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2021-05-11 08:00:54 WARNING (MainThread) [pylutron_caseta.smartbridge] ping was not answered. closing connection.
2021-05-11 08:16:28 WARNING (MainThread) [pylutron_caseta.smartbridge] Reconnecting...
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/smartbridge.py", line 434, in _monitor_once
await self._leap.run()
File "/usr/local/lib/python3.8/site-packages/pylutron_caseta/leap.py", line 78, in run
received = await self._reader.readline()
File "/usr/local/lib/python3.8/asyncio/streams.py", line 540, in readline
line = await self.readuntil(sep)
File "/usr/local/lib/python3.8/asyncio/streams.py", line 632, in readuntil
await self._wait_for_data('readuntil')
File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Operation timed out
2021-05-11 10:38:50 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring device data: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2021-05-11 10:39:50 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring device data: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2021-05-11 10:40:50 WARNING (SyncWorker_1) [homeassistant.components.ring] Error fetching Ring history data for device 50338be9fcd9: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2021-05-11 10:41:50 WARNING (SyncWorker_0) [homeassistant.components.ring] Error fetching Ring history data for device 50338be9fcd9: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2021-05-11 10:44:50 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring active dings data: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2021-05-11 10:46:50 WARNING (MainThread) [homeassistant.components.ring] Error fetching Ring active dings data: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
It seems like you have network issues. The guide you posted has nothing to do with network issues, that’s just an installation guide. If you take the time to read the errors posted in your logs, they are all timeout/connection issues. You should investigate why these devices are timing out/losing connection.
I guess I meant that it’s a new install, so not a lot of time for things to have gotten mucked up by me messing around with stuff. But I see your point. Looking at the timeouts it seems like my Ring doorbell is most often the culprit. Funny enough it seems to work fine from the UI.
Hi, yes, my time seems to be set correctly. When I run that in the template I get
2021-05-12 09:23:39.752359-06:00
Which is the time in Utah right now.
My time-based automation ran okay yesterday so I decided to try a sun-based one again. It worked, but about an hour and a half after sunset. Do you know if HA has a way of accounting for daylight savings time?