home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.47k stars 29.41k forks source link

ZWave switches toggle their state at HASS restart #6068

Closed covrig closed 7 years ago

covrig commented 7 years ago

Home Assistant release (hass --version): 0.38.3 Python release (python3 --version): 3.4.2 Component/platform: ZWave (Aeotec Gen 5 controller)

Description of problem: At reboot or reset HASS toggles the state of some ZWave switches in the home (Fibaro Wall plugs). No devices were added or removed. Configuration was not changed. Everything was OK in the previous HASS version (for the last 2-3 months). Running on Raspberry Pi (All in one installer).

Expected: State should not change. Attached you can find the OZW log.

OZW_Log.txt

turbokongen commented 7 years ago

So is the device switched, or is it the state of the frontend you are mentioning? Because the log contains no set commands, meaning Hass does not send a command to the zwave network. However there are associations set for devices on the network, so check them according to the devices manuals. That is commands just sent between devices.

covrig commented 7 years ago

@turbokongen Thanks for the reply. The devices are switched off (not only in the frontend). I noticed that there isn't any error in the log (both HASS and OZW). However, I didn't do anything recently (only the HASS update) and I am seeing this behavior. I don't have any associations that I know off. Also, checking the nodes and the xml there is no association between different nodes. I see a node 2 association but I assume that is the Aeotec controller (there is no node 2 in OZW Control Panel). Do they associate by themselves? What could be wrong? The Aeotec controller is sending a command to switch off everything.

I am also receiving this error in HASS:

17-02-17 21:43:08 ERROR (Dummy-18) [openzwave] Error in manager callback
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/network.py", line 950, in zwcallback
    self._handle_value_changed(args)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/network.py", line 1501, in _handle_value_changed
    'value' : self.nodes[args['nodeId']].values[args['valueId']['id']]})
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/PyDispatcher-2.0.5-py3.4.egg/pydispatch/dispatcher.py", line 338, in send
    **named
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/PyDispatcher-2.0.5-py3.4.egg/pydispatch/robustapply.py", line 55, in robustApply
    return receiver(*arguments, **named)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/zwave/__init__.py", line 631, in network_value_changed
    self.value_changed(value)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/zwave/__init__.py", line 636, in value_changed
    self.schedule_update_ha_state()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 285, in schedule_update_ha_state
    self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'
covrig commented 7 years ago

Found the problem. I had a Aeotec multisensor sending a Basic Set Off command every time motion was recorded. This appeared randomly, no associations were created by me and it worked just fine for months before. Every day I find a new problem with Aeotec devices.