Zwave thermostat not working in 0.26.2

Does anybody else has problem with Zwave thermostats?
I have three Danfoss Zwave thermostats that show properly in OZWCP.
They dont show in Home Assistant.
In log I get:

Aug 21 21:11:00 homeautomation hass[14960]: ERROR:openzwave:Error in manager callback
Aug 21 21:11:00 homeautomation hass[14960]: Traceback (most recent call last):
Aug 21 21:11:00 homeautomation hass[14960]: File “/usr/local/lib/python3.4/dist-packages/openzwave-0.3.1-py3.4.egg/openzwave/network.py”, line 950, in zwcallback
Aug 21 21:11:00 homeautomation hass[14960]: self._handle_value_changed(args)
Aug 21 21:11:00 homeautomation hass[14960]: File “/usr/local/lib/python3.4/dist-packages/openzwave-0.3.1-py3.4.egg/openzwave/network.py”, line 1501, in _handle_value_changed
Aug 21 21:11:00 homeautomation hass[14960]: ‘value’ : self.nodes[args[‘nodeId’]].values[args[‘valueId’][‘id’]]})
Aug 21 21:11:00 homeautomation hass[14960]: File “/usr/local/lib/python3.4/dist-packages/PyDispatcher-2.0.5-py3.4.egg/pydispatch/dispatcher.py”, line 338, in send
Aug 21 21:11:00 homeautomation hass[14960]: **named
Aug 21 21:11:00 homeautomation hass[14960]: File “/usr/local/lib/python3.4/dist-packages/PyDispatcher-2.0.5-py3.4.egg/pydispatch/robustapply.py”, line 55, in robustApply
Aug 21 21:11:00 homeautomation hass[14960]: return receiver(*arguments, **named)
Aug 21 21:11:00 homeautomation hass[14960]: File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/thermostat/zwave.py”, line 87, in value_changed
Aug 21 21:11:00 homeautomation hass[14960]: self.update_ha_state()
Aug 21 21:11:00 homeautomation hass[14960]: File “/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py”, line 157, in update_ha_state
Aug 21 21:11:00 homeautomation hass[14960]: attr = self.state_attributes or {}
Aug 21 21:11:00 homeautomation hass[14960]: File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/thermostat/init.py”, line 215, in state_attributes
Aug 21 21:11:00 homeautomation hass[14960]: ATTR_MIN_TEMP: self._convert_for_display(self.min_temp),
Aug 21 21:11:00 homeautomation hass[14960]: File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/thermostat/init.py”, line 306, in min_temp
Aug 21 21:11:00 homeautomation hass[14960]: return convert(7, TEMP_CELSIUS, self.unit_of_measurement)
Aug 21 21:11:00 homeautomation hass[14960]: File “/usr/local/lib/python3.4/dist-packages/homeassistant/util/temperature.py”, line 27, in convert
Aug 21 21:11:00 homeautomation hass[14960]: TEMPERATURE))
Aug 21 21:11:00 homeautomation hass[14960]: ValueError: None is not a recognized temperature unit.

Seems that self.unit_of_measurement is none.

Is this working for someone?
When did this work ok?

I have 3 2gig CT-100s and they work fine, so perhaps it is specific to your model?

Might be, I have to check the code tomorrow.
BTW, they have never worked in my system because I just added them to network.

Found the problem, the thermostat code assumes that thermostat has value for current temperature, and Danfoss has that not.
I changed the code that it also gets unit from set point temperature that all thermostats should have and it now works. Have the check later how to get that correction to public repository.

@MarkoMarjamaa I have a similar problem, in my case I have three TRANE thermostats. They do show up properly in OZWCP. But not on Home-Assistant. I’m running 0.28.2

Any chance you can help me do similar fixes on my HA? Do I need to setup a development environment?
I have no previous experience with Python, but willing to learn. THANK YOU!!

From the log:
16-09-25 09:32:48 homeassistant.components.climate: Error while setting up platform zwave
Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py”, line 107, in _setup_platform
discovery_info)
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/climate/zwave.py”, line 73, in setup_platform
add_devices([ZWaveClimate(value, temp_unit)])
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/climate/zwave.py”, line 102, in init
self.update_properties()
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/climate/zwave.py”, line 143, in update_properties
class_id=COMMAND_CLASS_SENSOR_MULTILEVEL).values():
File “/usr/local/lib/python3.4/dist-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-09-25 09:32:52 homeassistant.components.sensor: Error while setting up platform zwave
Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py”, line 107, in _setup_platform
discovery_info)
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/sensor/zwave.py”, line 63, in setup_platform
add_devices([ZWaveMultilevelSensor(value)])
File “/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py”, line 198, in add_entities
if self.component.add_entity(entity, self):
File “/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py”, line 134, in add_entity
entity.update_ha_state()
File “/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py”, line 159, in update_ha_state
device_attr = self.device_state_attributes
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/zwave.py”, line 580, in device_state_attributes
battery_level = self._value.node.get_battery_level()
File “/usr/local/lib/python3.4/dist-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 “/usr/local/lib/python3.4/dist-packages/openzwave-0.3.1-py3.4.egg/openzwave/command.py”, line 306, in get_battery_levels
type=‘Byte’, readonly=True, writeonly=False)
File “/usr/local/lib/python3.4/dist-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-09-25 09:32:53 homeassistant.components.climate: Error while setting up platform zwave
Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py”, line 107, in _setup_platform
discovery_info)
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/climate/zwave.py”, line 73, in setup_platform
add_devices([ZWaveClimate(value, temp_unit)])
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/climate/zwave.py”, line 102, in init
self.update_properties()
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/climate/zwave.py”, line 143, in update_properties
class_id=COMMAND_CLASS_SENSOR_MULTILEVEL).values():
File “/usr/local/lib/python3.4/dist-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

Those are not the same errors messages I got. I do get those errors sometime, but my devices still work ok ( i guess).

You can still try my version. it’s in

You have to copy that over your /components/thermostat/zwave.py
Before you do that, make a backup of that file.
It’s located in Python libraries, sorry can’t remember the path.
Then just restart HA.

@MarkoMarjamaa How are these Danfoss working for you with OpenZwave? I have them working for a few hours and then they jump into an E5 error. They worked fine when I had them connected to my Vera.

Did you change anything in the openZwave settings?

@MarkoMarjamaa what danfoss model are you using? can you share your configuration file?

Thanks!

The LC 13 model (but I also have the older one). I’m assuming you mean the Zwave configuration part?

	<Node id="23" name="" location="" basic="4" generic="8" specific="4" type="Setpoint Thermostat" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Session">
		<Manufacturer id="2" name="Danfoss">
			<Product type="5" id="4" name="Z Thermostat 014G0013" />
		</Manufacturer>
		<CommandClasses>
			<CommandClass id="67" name="COMMAND_CLASS_THERMOSTAT_SETPOINT" version="1" request_flags="4" override_precision="2" innif="true" base="0">
				<Instance index="1" />
				<Value type="decimal" genre="user" instance="1" index="1" label="Heating 1" units="C" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="21.00" />
			</CommandClass>
			<CommandClass id="70" name="COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE" version="1" request_flags="4" innif="true" change_counter="0">
				<Instance index="1" />
				<Value type="schedule" genre="user" instance="1" index="1" label="Monday" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" />
				<Value type="schedule" genre="user" instance="1" index="2" label="Tuesday" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" />
				<Value type="schedule" genre="user" instance="1" index="3" label="Wednesday" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" />
				<Value type="schedule" genre="user" instance="1" index="4" label="Thursday" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" />
				<Value type="schedule" genre="user" instance="1" index="5" label="Friday" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" />
				<Value type="schedule" genre="user" instance="1" index="6" label="Saturday" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" />
				<Value type="schedule" genre="user" instance="1" index="7" label="Sunday" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" />
				<Value type="list" genre="user" instance="1" index="8" label="Override State" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="1">
					<Item label="None" value="0" />
					<Item label="Temporary" value="1" />
					<Item label="Permanent" value="2" />
				</Value>
				<Value type="byte" genre="user" instance="1" index="9" label="Override Setback" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="127" />
			</CommandClass>
			<CommandClass id="114" name="COMMAND_CLASS_MANUFACTURER_SPECIFIC" version="1" request_flags="4" innif="true">
				<Instance index="1" />
			</CommandClass>
			<CommandClass id="117" name="COMMAND_CLASS_PROTECTION" version="1" request_flags="4" innif="true">
				<Instance index="1" />
				<Value type="list" genre="system" instance="1" index="0" label="Protection" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="1">
					<Item label="Unprotected" value="0" />
					<Item label="Protection by Sequence" value="1" />
					<Item label="No Operation Possible" value="2" />
				</Value>
			</CommandClass>
			<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" innif="true">
				<Instance index="1" />
				<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="98" />
			</CommandClass>
			<CommandClass id="129" name="COMMAND_CLASS_CLOCK" version="1" request_flags="4" innif="true">
				<Instance index="1" />
				<Value type="list" genre="user" instance="1" index="0" label="Day" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="1" size="1">
					<Item label="Monday" value="1" />
					<Item label="Tuesday" value="2" />
					<Item label="Wednesday" value="3" />
					<Item label="Thursday" value="4" />
					<Item label="Friday" value="5" />
					<Item label="Saturday" value="6" />
					<Item label="Sunday" value="7" />
				</Value>
				<Value type="byte" genre="user" instance="1" index="1" label="Hour" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="20" />
				<Value type="byte" genre="user" instance="1" index="2" label="Minute" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="41" />
			</CommandClass>
			<CommandClass id="132" name="COMMAND_CLASS_WAKE_UP" version="2" request_flags="2" innif="true">
				<Instance index="1" />
				<Value type="int" genre="system" instance="1" index="0" label="Wake-up Interval" units="Seconds" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="300" />
				<Value type="int" genre="system" instance="1" index="1" label="Minimum Wake-up Interval" units="Seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="60" />
				<Value type="int" genre="system" instance="1" index="2" label="Maximum Wake-up Interval" units="Seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="1800" />
				<Value type="int" genre="system" instance="1" index="3" label="Default Wake-up Interval" units="Seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="300" />
				<Value type="int" genre="system" instance="1" index="4" label="Wake-up Interval Step" units="Seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="60" />
			</CommandClass>
			<CommandClass id="134" name="COMMAND_CLASS_VERSION" version="1" request_flags="4" innif="true">
				<Instance index="1" />
				<Value type="string" genre="system" instance="1" index="0" label="Library Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="6" />
				<Value type="string" genre="system" instance="1" index="1" label="Protocol Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="3.67" />
				<Value type="string" genre="system" instance="1" index="2" label="Application Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="1.00" />
			</CommandClass>
			<CommandClass id="143" name="COMMAND_CLASS_MULTI_CMD" version="1" request_flags="4" innif="true">
				<Instance index="1" />
			</CommandClass>
		</CommandClasses>
	</Node>

Use the LC13 model, other models work are not guaranteed to work with other Zwave hubs than Danfoss’s own.

I don’t actively use the thermostat’s so I can’t guarantee they are working. In Hass they show now right information but I’m not sure if that is an indication it’s working.