MQTT thing failure

Im using zigbee2mqtt bridge, have a several devices working perfectly. Now Im trying to add a radiator valve, TuYa TS0601. Zigbee2mqtt posting data to mqtt topic, this data is parsed by openhab, but no update on corresponding items…
Here is an things file

Bridge mqtt:broker:MQTTBroker [ host=“localhost”, secure=false ]
{
Thing topic CabineRadiatorValve “CabineRadiatorValve” @ “Cabinet” {
Channels:
Type string : auto_lock [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.auto_lock”]
Type number : away_preset_days [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.away_preset_days”]
Type number : away_preset_temperature [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.away_preset_temperature”]
Type number : boost_time [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.boost_time”]
Type string : child_lock [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.child_lock”]
Type number : comfort_temperature [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.comfort_temperature”]
Type number : current_heating_setpoint [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.current_heating_setpoint”]
Type number : eco_temperature [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.eco_temperature”]
Type string : force [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.force”]
Type number : local_temperature [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.local_temperature”]
Type number : local_temperature_calibration [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.local_temperature_calibration”]
Type number : max_temperature [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.max_temperature”]
Type number : min_temperature [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.min_temperature”]
Type number : position [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.position”]
Type string : preset [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.preset”]
Type string : system_mode [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.system_mode”]
Type string : week [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.week”]
Type string : window_detection [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.window_detection”]
Type number : Linkquality [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve”, transformationPattern=“JSONPATH:$.linkquality”]
Type number : Availability [ stateTopic=“zigbee2mqtt/CabinetRadiatorValve/availability”, transformationPattern=“JS:getZigbeeAvail2Number.js”]
}
}

and here is an item file

Group 				gCabinetRadiatorValve								"OfficeRadiator" 									<device> 			(Office) 								{autoupdate="false"}
String 				OfficeRadiatorValveAuto_lock 						"OfficeRadiator Auto_lock [%s]" 					<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:auto_lock"}
Number 				OfficeRadiatorValveAway_preset_days					"OfficeRadiator Away_preset_days [%.1f]" 			<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:away_preset_days"}
Number 				OfficeRadiatorValveAway_preset_temperature 			"OfficeRadiator Away_preset_temperature [%.1f °C]" 	<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:away_preset_temperature"}
Number 				OfficeRadiatorValveBoost_time 						"OfficeRadiator Boost_time [%.1f]" 					<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:boost_time"}
String 				OfficeRadiatorValveChild_lock 						"OfficeRadiator Child_lock [%s]" 					<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:child_lock"}
Number 				OfficeRadiatorValveComfort_temperature 				"OfficeRadiator Comfort_temperature [%.1f °C]" 		<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:comfort_temperature"}
Number 				OfficeRadiatorValveCurrent_heating_setpoint 		"OfficeRadiator Current_heating_setpoint [%.1f °C]" <temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:current_heating_setpoint"}
Number 				OfficeRadiatorValveEco_temperature 					"OfficeRadiator Eco_temperature [%.1f °C]" 			<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:eco_temperature"}
String 				OfficeRadiatorValveForce 							"OfficeRadiator Force[%s]" 							<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:force"}
Number 				OfficeRadiatorValveLocal_temperature 				"OfficeRadiator Local_temperature [%.1f °C]" 		<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:local_temperature"}
Number 				OfficeRadiatorValveLocal_temperature_calibration	"OfficeRadiator Local_temperature_calibration[%.1f °C]" <temperature> 	(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:local_temperature_calibration"}
Number 				OfficeRadiatorValveMax_temperature 					"OfficeRadiator Max_temperature [%.1f °C]" 			<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:max_temperature"}
Number 				OfficeRadiatorValveMin_temperature 					"OfficeRadiator Min_temperature [%.1f °C]" 			<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:min_temperature"}
Number 				OfficeRadiatorValvePosition 						"OfficeRadiator Position [%.1f]" 					<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:position"}
String 				OfficeRadiatorValvePreset 							"OfficeRadiator Preset [%s]" 						<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:preset"}
String 				OfficeRadiatorValveSystem_mode 						"OfficeRadiator System_mode [%s]" 					<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:system_mode"}
String 				OfficeRadiatorValveWeek 							"OfficeRadiator Week [%s]" 							<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:week"}
String 				OfficeRadiatorValveWindow_detection 				"OfficeRadiator Window_detection [%s]" 				<temperature> 		(Office,gCabinetRadiatorValve) 			{channel="mqtt:topic:MQTTBroker:CabinetRadiatorValve:window_detection"}                                                                           

Openhab version 2.5.1-2

and here is a little dubug output

2020-10-21 12:44:15.200 [DEBUG] [ternal.JSonPathTransformationService] - about to transform '{"auto_lock":"MANUAL","away_preset_days":1,"away_preset_temperature":15,"boost_time":300,"child_lock":"UNLOCKED","comfort_temperature":20,"current_heating_setpoint":"20.0","device":{"applicationVersion":83,"dateCode":"","friendlyName":"CabinetRadiatorValve","hardwareVersion":1,"ieeeAddr":"0x60a423fffeab32d6","manufacturerID":4098,"manufacturerName":"_TZE200_ckud7u2l","model":"TS0601_thermostat","networkAddress":21830,"powerSource":"Battery","stackVersion":0,"type":"EndDevice","zclVersion":3},"eco_temperature":15,"force":"normal","holidays":[{"hour":134,"minute":0,"temperature":20},{"hour":9,"minute":0,"temperature":16},{"hour":11,"minute":30,"temperature":15},{"hour":13,"minute":31,"temperature":14},{"hour":17,"minute":30,"temperature":21},{"hour":22,"minute":6,"temperature":15}],"linkquality":39,"local_temperature":"25.0","local_temperature_calibration":"-1.0","max_temperature":35,"min_temperature":5,"position":A,"preset":"schedule","system_mode":"auto","week":"5+2","window_detection":"OFF","window_detection_params":{"minutes":10,"temperature":5},"workdays":[{"hour":9,"minute":5,"temperature":20},{"hour":9,"minute":6,"temperature":15},{"hour":11,"minute ":30,"temperature":15},{"hour":12,"minute":30,"temperature":15},{"hour":18,"minute":30,"temperature":20},{"hour":22,"minute":0,"temperature":16}]}' by the function '$.system_mode'
2020-10-21 12:44:15.201 [DEBUG] [.jsonpath.internal.path.CompiledPath] - Evaluating path: $['system_mode']                                                                                                                            
2020-10-21 12:44:15.201 [DEBUG] [ternal.JSonPathTransformationService] - transformation resulted in 'auto'                                                                                                                            
2020-10-21 12:44:15.201 [DEBUG] [ternal.JSonPathTransformationService] - about to transform '{"auto_lock":"MANUAL","away_preset_days":1,"away_preset_temperature":15,"boost_time":300,"child_lock":"UNLOCKED","comfort_temperature":20,"current_heating_setpoint":"20.0","device":{"applicationVersion":83,"dateCode":"","friendlyName":"CabinetRadiatorValve","hardwareVersion":1,"ieeeAddr":"0x60a423fffeab32d6","manufacturerID":4098,"manufacturerName":"_TZE200_ckud7u2l","model":"TS0601_thermostat","networkAddress":21830,"powerSource":"Battery","stackVersion":0,"type":"EndDevice","zclVersion":3},"eco_temperature":15,"force":"normal","holidays":[{"hour":134,"minute":0,"temperature":20},{"hour":9,"minute":0,"temperature":16},{"hour":11,"minute":30,"temperature":15},{"hour":13,"minute":31,"temperature":14},{"hour":17,"minute":30,"temperature":21},{"hour":22,"minute":6,"temperature":15}],"linkquality":39,"local_temperature":"25.0","local_temperature_calibration":"-1.0","max_temperature":35,"min_temperature":5,"position":A,"preset":"schedule","system_mode":"auto","week":"5+2","window_detection":"OFF","window_detection_params":{"minutes":10,"temperature":5},"workdays":[{"hour":9,"minute":5,"temperature":20},{"hour":9,"minute":6,"temperature":15},{"hour":11,"minute ":30,"temperature":15},{"hour":12,"minute":30,"temperature":15},{"hour":18,"minute":30,"temperature":20},{"hour":22,"minute":0,"temperature":16}]}' by the function '$.away_preset_temperature'
2020-10-21 12:44:15.201 [DEBUG] [.jsonpath.internal.path.CompiledPath] - Evaluating path: $['away_preset_temperature']                                                                                                                
2020-10-21 12:44:15.202 [DEBUG] [ternal.JSonPathTransformationService] - transformation resulted in '15'

Show the events.log file for the same time period.

Im afraid there is no change on corresponding items, only the other ones

> 2020-10-21 12:44:14.934 [thome.event.ItemStateEvent] - mains_reserved_reactpower updated to 163
> 2020-10-21 12:44:15.049 [event.ThingStatusInfoEvent] - 'modbus:data:DDS238:power_factor:value' updated: ONLINE
> 2020-10-21 12:44:15.049 [thome.event.ItemStateEvent] - mains_reserved_powerfactor updated to 0.714
> 2020-10-21 12:44:15.050 [vent.ItemStateChangedEvent] - mains_reserved_powerfactor changed from 0.712 to 0.714
> 2020-10-21 12:44:15.175 [event.ThingStatusInfoEvent] - 'modbus:data:DDS238:frequency:value' updated: ONLINE
> 2020-10-21 12:44:15.175 [thome.event.ItemStateEvent] - mains_reserved_frequency updated to 49.98
> 2020-10-21 12:44:15.175 [vent.ItemStateChangedEvent] - mains_reserved_frequency changed from 49.99 to 49.98
> 2020-10-21 12:44:15.177 [thome.event.ItemStateEvent] - ComplexStateMains_reserved updated to 166.0 W
> 2020-10-21 12:44:15.177 [thome.event.ItemStateEvent] - ComplexStateColorMains_reserved updated to black
> 2020-10-21 12:44:15.248 [event.ThingStatusInfoEvent] - 'modbus:data:SDM230:volts:value' updated: ONLINE
> 2020-10-21 12:44:15.248 [thome.event.ItemStateEvent] - mains_voltage updated to 225.3697509765625
> 2020-10-21 12:44:15.249 [vent.ItemStateChangedEvent] - mains_voltage changed from 224.9865264892578 to 225.3697509765625
> 2020-10-21 12:44:15.250 [thome.event.ItemStateEvent] - ComplexStateMains updated to 614.1 W
> 2020-10-21 12:44:15.250 [thome.event.ItemStateEvent] - ComplexStateColorMains updated to black
> 2020-10-21 12:44:15.287 [event.ThingStatusInfoEvent] - 'modbus:data:DDS238:current:value' updated: ONLINE
> 2020-10-21 12:44:15.287 [thome.event.ItemStateEvent] - mains_reserved_current updated to 1.03
> 2020-10-21 12:44:15.287 [vent.ItemStateChangedEvent] - mains_reserved_current changed from 1.04 to 1.03
> 2020-10-21 12:44:15.289 [thome.event.ItemStateEvent] - ComplexStateMains_reserved updated to 166.0 W
> 2020-10-21 12:44:15.289 [thome.event.ItemStateEvent] - ComplexStateColorMains_reserved updated to black
> 2020-10-21 12:44:15.391 [event.ThingStatusInfoEvent] - 'modbus:data:SDM230:current:value' updated: ONLINE
> 2020-10-21 12:44:15.392 [thome.event.ItemStateEvent] - mains_current updated to 2.919901132583618
> 2020-10-21 12:44:15.392 [vent.ItemStateChangedEvent] - mains_current changed from 2.916914224624634 to 2.919901132583618
> 2020-10-21 12:44:15.393 [thome.event.ItemStateEvent] - ComplexStateMains updated to 614.1 W

I think the error is a simple typo.

  • Your Thing is called CabineRadiatorValve.
  • Your Items point to ...CabinetRadiatorValve...

I think your Thing has a missing “t”, and it should be called CabinetRadiatorValve:

Thing topic CabinetRadiatorValve "CabinetRadiatorValve" @ "Cabinet" 
...

However, also be aware that your position Channel will receive a letter according to your posted JSON strings:

..."position":A...

so you will need to change that Channel to be a string Channel, not a number Channel. Otherwise you’ll get something like the following in your logs:

22:08:49.768 [WARN ] [hab.binding.mqtt.generic.ChannelState] - Incoming payload 'A' not supported by type 'NumberValue'
3 Likes

Thank you, good man! That was it. Terribly sorry for bringing this up

about “A” in position, which is numeric - that was intentional mistake, posted by me via mosquitto_pub, to see if there will be an error or not.

Ah, good idea! Glad you’ve got it working!

Alex,
I am using the same thermostat and have some problems with sitemap…
Could you, please, post a part of your sitemap with these thermostat items ?
Thanks!

Something like that

Text item=OfficeRadiator1ValveComplexState valuecolor=[OfficeRadiator1ValveComplexStateColor =="red"="red",OfficeRadiator1ValveComplexStateColor =="black"="black",OfficeRadiator1ValveComplexStateColor =="green"="green",OfficeRadiator1ValveComplexStateColor =="blue"="blue",OfficeRadiator1ValveComplexStateColor =="lightgray"="lightgray"]
			{
				Selection item=OfficeRadiator1ValveHeatingMode	mappings=[0="OFF", 100="ON"]
				Text item=OfficeRadiator1ValvePosition	
				Setpoint item=OfficeRadiator1ValveCurrent_heating_setpoint minValue=18.0 maxValue=35 step=0.5 visibility=[OfficeRadiator1ValveHeatingMode==100]
				Text item=OfficeRadiator1ValveCurrent_heating_setpoint visibility=[OfficeRadiator1ValveHeatingMode!=100]
				Text item=OfficeRadiator1ValveLocal_temperature
			}