Is your HA stable?

Hello there,

is your HA stable? my HA keeps showing me errors and i have no clue why is this so. All i have at the moment connected to HA is tracker, tracking 2 ios devices ( using push notifications ). dark sky weather and system information. It seems that these errors also delay push notifications - sometimes they delay a lot.

Running 0.44.1.

what am i doing wrong? I am afraid that, when i’ll connect more devices, i’ll get even more errors :frowning:

My error log:

2017-05-19 20:07:29 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.samsung_tv is taking over 10 seconds
2017-05-19 20:07:30 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2017-05-20 00:46:39 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.samsung_tv is taking over 10 seconds
2017-05-20 00:46:40 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2017-05-20 02:49:25 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/selector_events.py", line 582, in _read_ready
    data = self._sock.recv(self.max_size)
OSError: [Errno 113] No route to host
2017-05-20 02:49:25 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/websocket_api.py", line 363, in forward_events
    yield from self.send_message(event_message(msg['id'], event))
  File "/home/homeassistant/.homeassistant/deps/aiohttp/http_writer.py", line 127, in drain
    yield from self._protocol._drain_helper()
  File "/usr/lib/python3.4/asyncio/streams.py", line 197, in _drain_helper
    yield from waiter
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/asyncio/selector_events.py", line 582, in _read_ready
    data = self._sock.recv(self.max_size)
OSError: [Errno 113] No route to host
2017-05-20 08:56:05 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.samsung_tv is taking over 10 seconds
2017-05-20 08:56:06 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2017-05-20 17:17:50 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.samsung_tv is taking over 10 seconds
2017-05-20 17:17:51 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2017-05-20 17:18:02 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2017-05-20 17:18:13 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2017-05-21 01:03:14 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.samsung_tv is taking over 10 seconds
2017-05-21 01:03:15 WARNING (MainThread) [homeassistant.components.media_player] Updating samsungtv media_player took longer than the scheduled update interval 0:00:10
2017-05-21 11:11:33 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.dark_sky_temperature is taking over 10 seconds
2017-05-21 11:11:54 WARNING (MainThread) [homeassistant.components.sensor] Updating darksky sensor took longer than the scheduled update interval 0:00:30
2017-05-21 11:12:25 WARNING (MainThread) [homeassistant.components.sensor] Updating darksky sensor took longer than the scheduled update interval 0:00:30
2017-05-21 16:16:05 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal write error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/selector_events.py", line 641, in _write_ready
    n = self._sock.send(self._buffer)
TimeoutError: [Errno 110] Connection timed out
2017-05-21 16:16:05 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/websocket_api.py", line 363, in forward_events
    yield from self.send_message(event_message(msg['id'], event))
  File "/home/homeassistant/.homeassistant/deps/aiohttp/http_writer.py", line 127, in drain
    yield from self._protocol._drain_helper()
  File "/usr/lib/python3.4/asyncio/streams.py", line 197, in _drain_helper
    yield from waiter
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/asyncio/selector_events.py", line 641, in _write_ready
    n = self._sock.send(self._buffer)
TimeoutError: [Errno 110] Connection timed out
2017-05-22 13:40:49 WARNING (MainThread) [aiohttp.websocket] websocket connection is closing.

I am on 0.45 and getting some of these errors continuously. Those are not creating any functional trouble though.

So, even if everything works like charm, you still get errors? I mean, is this normal?

you say:

but your log shows

[homeassistant.components.media_player] Updating samsungtv media_
so i guess you have a samsung TV in your config.
and that seems to generate some warnings.

other things i see is that sometimes a network connection isnt there or takes to long.
but with an errorlog this short over 3 days i wouldnt worry.

push notifications can take a little longer sometimes, depending on the recieving device or the network connection.
i get a delay if i let my tablet run for to long. when i restart my tablet the delay is gone again.

Yes, this has to be discovery function. Although it doesnt work, i can’t control my TV via HA.

what can I do about network connection?

I also have 1 tablet connected to HA - does it make a delay?

there will Always be moments that your internetconnection is a bit slow to a certain server or a server is down somewhere or your network is more busy then on other times.

the only thing to avoid that as much as possible is using everything at the highest speed, but that comes with a high price also :wink:

the tablet itselve does cause a delay. but the notify can be delayed because of the fact that the tablet is running long. off course only if you send a notify to that tablet.

Nah, tablet is just connected to it, nothing notifies it.

But i’ve noticed that my logbook is full of not really important things. Is it possible that this also delays HA? my logbook:

if you have been running HA for a longer time and you havent set any purge for the recording, then the database can have become pretty big.
and that will cause HA to slow down.

you can read about that in the recording component.

I really have no clue what “pretty big” means in this case, but, is this pretty big? :slight_smile:

no thats not. :wink:
when i still had recording on, that was what it was after 1 day for me :wink:

but you seem to be searching for a delay in your push notifications.
and like i already said before that can also come from complete other reasons then a HA problem.

i also get a little confused when i read that you use push notifications to track ios devices.

push notifications is to send messages, trackers are for tracking.
notifications in general can get delayed for several reasons

  1. slow network
  2. slow device that receives the notification
  3. slow connection to the server that is used (if any)
  4. bad internet connection
  5. bad wifi connection

and i also have no idea what you mean with delayed a lot.
do you mean 2 seconds, 2 minutes, 2 hours, 2 days?

I hate to say it but I believe a spazzy logfile is a bit normal once you get up and running. There are too many components managed by many developers. Some are more on top of things than others. Some hardware devices act differently than developers anticipate. Getting down to those edge cases can be a lot of work for users and developers so many just don’t get resolved because of time issues, lack of interest, or whatever. There could be many more reasons as well. I’ve probably only touched a few.

I can give you an example. Recently my hass log was 155 MB for a runtime of 11 days.

I’ve also had cases where restarting HASS fixes issues with automatons not running.

So is HASS stable? I guess it depends on your definition of stable. For me, I would say no. I’d rate it beta quality software over-all, but it works. It’s free, and as long as it works for you great.

1 Like

400 mb for someone that hasn’t done much with it is big. You should setup purging. The data in the database isn’t very useful to me after 2 or 3 days so I have mine set to 3 days and my DB is 700mb but I have a lot of “stuff” going on.

To be honest, it bothers me that i get errors even now, with only presence detection and i am afraid what will be once, I connect some sensor on it. It bother me that sometimes notifications work, sometimes are delayed and sometime dont even work. Although i didnt make any changes.

I will have to purge my db then, something new for me - still learning :slight_smile:

I’ll get a stack trace in my HA log from my Chromecast component every time I turn my TV off, so that may be why you’re getting the stack trace for your samsung component. A lot of logging options can be adjusted with the logger: settings in configuration.yaml https://home-assistant.io/components/logger/

Regarding the logbook, I excluded a bunch of domains and entities from mine (or you can also only whitelist select entities you want to show up there) https://home-assistant.io/components/logbook/

I would also recommend excluding entities or domains from the recorder component if you don’t care about keeping any historical data on them. This will help reduce the size of the home-assistant database and can help speed things up. https://home-assistant.io/components/recorder/

If i put in my config

recorder:
purge_days: 2

will it delete all my previous logs older than 2 days or just from now on?

update: i’ve put that in my config and after restart::

I’m not sure exactly how the purge_days function works (I don’t use it on my install). The “setup of platform x is taking over 10 seconds” errors seem to be pretty common with less powerful devices such as the raspberry pis.

@Ziga_Jamnik it will purge everything older than two days once the process has run for 49 hours. So if you constantly restart hass, it’ll never purge.

Ok, thank you!

funny, but it seems that this did a trick. after i’ve put in configuration purge: 2 days… now my error list (after 16 hours) looks like this:

Just an update: it’s been 2 days now, still no errors :slight_smile: it seems that DB purge solved errors?..

It doesn’t seem like it should but never-the-less. I’m glad things have improved :slight_smile:

I actually found some more about my database size. Apparently there is a bug in the alarm panel component which caused the db to balloon to about 50x what it should be.