"Error while setting up platform zwave" during startup 0.31.0

I seem to get the error messages during startup since the upgrade, any ideas?

16-10-24 23:48:36 homeassistant.components.recorder: Ended unfinished session (id=128 from 2016-10-23 19:25:42.196899)
16-10-24 23:48:36 homeassistant.components.recorder: Found unfinished sessions
16-10-24 23:48:38 homeassistant.components.light: Error while setting up platform zwave
Traceback (most recent call last):
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 151, in _async_setup_platform
entity_platform.add_entities, discovery_info
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/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/light/zwave.py”, line 100, in setup_platform
add_devices([ZwaveDimmer(value)])
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 284, in add_entities
).result()
File “/usr/lib/python3.4/concurrent/futures/_base.py”, line 402, in result
return self.__get_result()
File “/usr/lib/python3.4/concurrent/futures/_base.py”, line 354, in __get_result
raise self._exception
File “/usr/lib/python3.4/asyncio/tasks.py”, line 233, in _step
result = coro.throw(exc)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 294, in async_add_entities
yield from asyncio.gather(*tasks, loop=self.component.hass.loop)
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/tasks.py”, line 237, in _step
result = next(coro)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 309, in _async_process_entity
ret = yield from self.component.async_add_entity(new_entity, self)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 189, in async_add_entity
yield from entity.async_update_ha_state()
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py”, line 213, in async_update_ha_state
device_attr = self.device_state_attributes
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/zwave/init.py”, line 597, in device_state_attributes
battery_level = self._value.node.get_battery_level()
File “/srv/hass/hass_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/command.py”, line 284, in get_battery_level
for val in self.get_battery_levels():
File “/srv/hass/hass_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/command.py”, line 306, in get_battery_levels
type=‘Byte’, readonly=True, writeonly=False)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/node.py”, line 438, in get_values
for value in self.values:
RuntimeError: dictionary changed size during iteration
16-10-24 23:49:04 homeassistant.components.zwave: zwave not ready after 30 seconds, continuing anyway

Just thought you guys should know.

Cheers.

Did you read the release notes? There were major breaking changes in ZWave that required renaming all devices. It was laid out by @robbiet480 in depth along with a work flow to updating. I used his instructions in the post and while it took a bit of time it worked like a charm.

1 Like

Yep - I followed all the notes and renamed everything.

Not sure what’s happening but sometimes I get these errors on startup and sometimes I dont.

I’ve just restarted again (testing another fix by changing some polltimes) but this time i’ve got:

16-10-26 19:02:19 homeassistant.components.sensor: Error while setting up platform zwave
Traceback (most recent call last):
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 151, in _async_setup_platform
entity_platform.add_entities, discovery_info
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/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/sensor/zwave.py”, line 37, in setup_platform
add_devices([ZWaveMultilevelSensor(value)])
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 284, in add_entities
).result()
File “/usr/lib/python3.4/concurrent/futures/_base.py”, line 402, in result
return self.__get_result()
File “/usr/lib/python3.4/concurrent/futures/_base.py”, line 354, in __get_result
raise self._exception
File “/usr/lib/python3.4/asyncio/tasks.py”, line 233, in _step
result = coro.throw(exc)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 294, in async_add_entities
yield from asyncio.gather(*tasks, loop=self.component.hass.loop)
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/tasks.py”, line 237, in _step
result = next(coro)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 309, in _async_process_entity
ret = yield from self.component.async_add_entity(new_entity, self)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 189, in async_add_entity
yield from entity.async_update_ha_state()
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py”, line 213, in async_update_ha_state
device_attr = self.device_state_attributes
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/zwave/init.py”, line 597, in device_state_attributes
battery_level = self._value.node.get_battery_level()
File “/srv/hass/hass_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/command.py”, line 284, in get_battery_level
for val in self.get_battery_levels():
File “/srv/hass/hass_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/command.py”, line 306, in get_battery_levels
type=‘Byte’, readonly=True, writeonly=False)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/node.py”, line 438, in get_values
for value in self.values:
RuntimeError: dictionary changed size during iteration
16-10-26 19:02:44 homeassistant.components.zwave: zwave not ready after 30 seconds, continuing anyway

Weird errors; I can’t say I’ve ever seen them before. Is there a chance you could have missed any references, like in a group or an automation/script?

1 Like

no - i checked them all & all fine.

I’ve rebooted 2-3 times tonight and not seen them since. Very odd.

Oh well no worries. I just thought they looked serious and somebody here should know about it.

Thanks anyway @rpitera! btw - you seen my other issue?:
https://community.home-assistant.io/t/very-chatty-zwave-fibaro-fgd212-dimmer-2

I have id3ntical issue and behaviour. Can it be that something calls the zwave device before it is Ready?

1 Like

That’s a good thought. Not sure where to go with it though…

I just looked at it but I get a lot of cross talk in my Zwave devices too - none of which are Fibaros - and since everything was operating nominally I didn’t give it a lot of thought.

I don’t think it would be a bad idea to raise an error on github, even if you just get told it’s normal. At least you’d know for sure. Honestly, ZWave is still a bit of a black box to me. Things work, but I’m not always sure why… LOL

I have been getting this error myself now and still getting it on .32.3. All of my ZWave devices are working and reporting normally, but I get this error on every restart now.

Did you ever raise an issue on github?

1 Like

Sorry not thought about opening an issue on github as i only saw it once maybe twice.

If i reboot now its fine.

I’m also getting this error. Could I ask how the response time is on your z-wave devices? I’m experiencing 5-30 second delays on mine, and judging by the logs, the delays seem to be coming from HA, rather than OZW.

I haven’t seen any delays myself. Haven’t been seeing this particular error since going to 33.3 either.