Stability of HA

Does anyone notice degradation of HA over uptime? After 3 or 4 days start getting all kind of errors in log.

I have noticed very strange bug with input_selects. After 3 or 4 days it seems options from other entity_ids are being put in. For example, yesterday with uptime of 6 days i received an error that
“Music” is not an invalid option for input_select. Valid options “Выкл, Средняя, Высокая” (Off, Medium, High)

Valid options are correctly stated. But “Music” is from another entity id. And this script is called out daily so definitely no mistakes are present in the code. Can that be because i use Cyrillic characters?

alarmpanel_we_are_home:
  sequence:
    - service: switch.turn_off
      entity_id:
      - switch.alarm_camera_hallway
      - switch.alarm_camera_balcony
    - service: input_select.select_option
      data:
        entity_id: input_select.ventilation
        option: "Средняя"

Ok here is the log and rule

2017-09-08 07:06:09 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2017-09-08 07:06:16 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback async_track_state_change.<locals>.state_change_listener(<Event state_...sensors_rules>) at /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/event.py:60
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
    self._callback(*self._args)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/event.py", line 80, in state_change_listener
    event.data.get('new_state'))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/core.py", line 247, in async_run_job
    target(*args)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/automation/state.py", line 96, in state_for_cancel_listener
    if inner_to_s.state == to_s.state:
AttributeError: 'NoneType' object has no attribute 'state'
2017-09-08 07:06:29 WARNING (MainThread) [homeassistant.components.input_select] Invalid option: XBOX (possible options: Выкл, Низкая, Средняя, Высокая)

And the rule

- alias: System Ventilation Night mode off
  trigger:
    platform: state
    entity_id: input_boolean.rules_sleeping
    from: 'on'
    to: 'off'
  action:
    - service: switch.turn_off
      entity_id: switch.vsr_klapan_zal
    - service: input_select.select_option
      data:
        entity_id: input_select.ventilation
        option: "Средняя"

I have a similar experience, although different errors. After about 4 days automations start to act weird. For example only one light turns on instead of the normal two, they don’t turn off at the set time, etc
After a restart of HA it is all fine again, for about 4 days.
When I first got HA I didn’t notice as I was constantly tinkering and therefore restarting, but now that I got most of it up and running the way I want I notice this weird behaviour.

Are Moskovskiy82 and I the only ones experiencing this, or is this normal and a consequence of HA still being in beta?

2 Likes

It runs solid for me for weeks at a time. All my automations are done through appdaemon though, which might make a difference.

In my case, I start to get problems after 8 hours of running (it stops to communicate with mosquitto and doesn’t run command line commands!). I tried it in several computers with different OS and the problem is the same. This is a very old problem… I noticed it since v0.20’s.

Because of this, HA just controls a small subset of my home automation setup (for testing purposes), the main part is controlled by OpenHAB (is rock solid).

Well it’s at least good to hear i’m not alone :slight_smile: Exactly the same - sometimes 2 lights instead of one.

I don’t have a solution yet for the root cause, but at least something to address the symptoms: I wrote an automation to restart HA every other night at 2AM. I thought it might be helpful for you, so here you go:

# restart HA to keep it fresh
- alias: Restart HA
  trigger: 
    platform: time
    at: "02:00:00"  
  condition:
    condition: time
    weekday:
    - sun
    - wed
    - fri
  action:
    - service: homeassistant.restart

One thing to keep in mind: if you purge your recorder every x days (to keep the size of the recorder/history file under control) then the counter for that counts since the last restart. So if you have the purge set to 3 days, then this will never trigger as you restart every 2 days.

The funny thing - you never know where it will strike. Yesterday - for just one day my mqtt got buggy with the following errors

[homeassistant.core] Invalid service data for mqtt.publish: string value is None for dictionary value @ data[‘topic’]. Got None

The topics are there - in the config files. But HA just went blind on them. Restarting just HA process didn’t help.
Rebooting the system solved the problem.

Checked all the system logs - nothing