Z-Wave Causing HASS to Crash Randomly

Tags: #<Tag:0x00007f328a59fad8> #<Tag:0x00007f328a59f8f8> #<Tag:0x00007f328a59f768>

Problem:

I have noticed random crashes over the last few days, usually in the middle of the night when no events are being triggered. I only have one z-wave device connected. Configuration is otherwise working normally, z-wave device is working normally prior to the error.

Software:

Ubuntu Linux 16.04 LTS

Hardware:

Z-Stick Gen 5
Aotec Switch

Log:

Output log is such for the error. There is a repeating loop at the end, which I have truncated. :

17-03-13 00:37:30 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/selector_events.py", line 662, in _read_ready
    data = self._sock.recv(self.max_size)
OSError: [Errno 113] No route to host
17-03-13 09:01:29 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/selector_events.py", line 662, in _read_ready
    data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out
17-03-13 09:01:57 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/selector_events.py", line 662, in _read_ready
    data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out
17-03-13 09:14:56 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/selector_events.py", line 662, in _read_ready
    data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out

The repeating error is then such:

17-03-13 09:24:09 ERROR (Dummy-14) [openzwave] Error in manager callback
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/openzwave-0.3.2-py3.5.egg/openzwave/network.py", line 950, in zwcallback
    self._handle_value_changed(args)
  File "/srv/homeassistant/lib/python3.5/site-packages/openzwave-0.3.2-py3.5.egg/openzwave/network.py", line 1502, in _handle_value_changed
    'value' : self.nodes[args['nodeId']].values[args['valueId']['id']]})
  File "/srv/homeassistant/lib/python3.5/site-packages/PyDispatcher-2.0.5-py3.5.egg/pydispatch/dispatcher.py", line 338, in send
    **named
  File "/srv/homeassistant/lib/python3.5/site-packages/PyDispatcher-2.0.5-py3.5.egg/pydispatch/robustapply.py", line 55, in robustApply
    return receiver(*arguments, **named)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/zwave/__init__.py", line 691, in network_value_changed
    self.value_changed(value)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/zwave/__init__.py", line 697, in value_changed
    self.schedule_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 288, in schedule_update_ha_state
    self.hass.add_job(self.async_update_ha_state(force_refresh))
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 178, in add_job
    self.loop.call_soon_threadsafe(self.async_add_job, target, *args)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 532, in call_soon_threadsafe
    handle = self._call_soon(callback, args)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 506, in _call_soon
    self._check_closed()
  File "/usr/lib/python3.5/asyncio/base_events.py", line 334, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Any advice would be appreciated.

Hey zoggels,

how did you solve the issue? Erperiencing the same here…

mny

What version of Home Assistant? What operating system are you running it on? What Z-Wave controller are you using? What devices are you using?

Sorry:

  • HA 0.49.1
  • Raspberry Pi 3 with Razberry Z-Wave-Module
  • MQTT: Mosquitto
  • Philips Hue
  • Devolo thermostats
  • Devolo 4 button Wall Controller
  • Fibaro Motion Sensor FGMS-001
  • FIBARO Wall Plug
  • Aeotec_Range_Extender

0.49.1 is quite outdated, there’s been at least one update to OpenZWave (OZW) since then. Did you install via Hassbian, the AIO installer, or something else?

I’ve got the same board, also on a Pi3 (and the same Fibaro sensor) and HA has been totally stable. I assume you’ve got a quality power supply that’s good for at least 2.4 Amps, and the USB cable for power is relatively short and thick (thin cables can cause power loss)?

What error message is it that you’re getting at the time of the problem? Exactly what happens at that point, is it a crash, an endless loop of the same error…?

Tinkerer,

Thanks for getting onto this.

Power supply is stable, 2.5 Amps and no issues so far.

I think its Raspian (installed with raspberrypi.org)

Despite the log file entry there is no error message at all. What bugs me is that HA lost its reliability so temporarily there is a false or no reaction at all.

Experiencing same issue since the last 0.65.5 update.

2018-03-23 06:53:59 ERROR (Dummy-9) [openzwave] Error in manager callback
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/openzwave/network.py", line 952, in zwcallback
    self._handle_value_changed(args)
  File "/srv/homeassistant/lib/python3.6/site-packages/openzwave/network.py", line 1504, in _handle_value_changed
    'value' : self.nodes[args['nodeId']].values[args['valueId']['id']]})
  File "/srv/homeassistant/lib/python3.6/site-packages/pydispatch/dispatcher.py", line 338, in send
    **named
  File "/srv/homeassistant/lib/python3.6/site-packages/pydispatch/robustapply.py", line 55, in robustApply
    return receiver(*arguments, **named)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/zwave/node_entity.py", line 119, in network_node_changed
    self.node_changed()
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/zwave/node_entity.py", line 151, in node_changed
    self.maybe_schedule_update()
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/zwave/node_entity.py", line 54, in maybe_schedule_update
    self.hass.add_job(self._schedule_update)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 204, in add_job
    self.loop.call_soon_threadsafe(self.async_add_job, target, *args)
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 620, in call_soon_threadsafe
    self._check_closed()
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 357, in _check_closed
    raise RuntimeError('Event loop is closed')

Please raise an issue so that the developers are aware.

Done

Did you ever find a permanent solution? I’m still suffering this issue.