Hello! I’m trying to add some devices using the MQTT Binding. This is my .things file:
Bridge mqtt:broker:LocalMQTTBroker [ host="localhost", secure=false] {
Thing topic Kaffeemaschine "Kaffeemaschine" @ "Küche" {
Channels:
Type switch : PowerSwitch [ stateTopic="stat/wohnung/kueche/kaffee/POWER" , commandTopic="cmnd/wohnung/kueche/kaffee/power", on="ON", off="OFF"]
}
Thing topic Temperatur_Schlafzimmer "Temperatursensor Schlafzimmer" @ "Schlafzimmer" {
Channels:
State Number:Temperature : Temperature "Temperatur" [stateTopic="zigbee2mqtt/0x00158d0004240688", transformationPattern="JSONPATH:$.temperature"]
State Number:Dimensionless : Humidity "Luftfeuchtigkeit" [stateTopic="zigbee2mqtt/0x00158d0004240688", transformationPattern="JSONPATH:$.humidity"]
State Number:Dimensionless : Battery "Batterie" [stateTopic="zigbee2mqtt/0x00158d0004240688", transformationPattern="JSONPATH:$.battery"]
State Number : LinkQuality "Empfangsqualität" [stateTopic="zigbee2mqtt/0x00158d0004240688", transformationPattern="JSONPATH:$.linkquality"]
}
}
The coffee maker (first thing) works just fine, but the temperature sensor (second thing) doesn’t. The Thing and all four channels do show up in Paper UI and I am able to link them to items, but those items are never updated. Currently, the temperature and battery channels are linked.
Whenever I save the .things file, this shows up in the log:
2020-05-20 16:47:01.585 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mqtt.things'
2020-05-20 16:47:02.290 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to 'localhost' with clientid cb72b11a-3290-4798-8519-345f60b9e7a4
2020-05-20 16:47:03.402 [WARN ] [rnal.handler.GenericMQTTThingHandler] - Channel Temperatur has no type
2020-05-20 16:47:03.408 [WARN ] [rnal.handler.GenericMQTTThingHandler] - Channel Luftfeuchtigkeit has no type
2020-05-20 16:47:03.414 [WARN ] [rnal.handler.GenericMQTTThingHandler] - Channel Batterie has no type
2020-05-20 16:47:03.423 [WARN ] [rnal.handler.GenericMQTTThingHandler] - Channel Empfangsqualität has no type
2020-05-20 16:47:03.487 [WARN ] [qtt.generic.AbstractMQTTThingHandler] - Channel mqtt:topic:LocalMQTTBroker:Temperatur_Schlafzimmer:Temperature not supported!
2020-05-20 16:47:03.490 [WARN ] [qtt.generic.AbstractMQTTThingHandler] - Channel mqtt:topic:LocalMQTTBroker:Temperatur_Schlafzimmer:Battery not supported!
The “not supported” message appears for each of the sensor’s channels that are currently linked to an item.
I am aware that the coffee maker’s channel uses Type switch
and the other channels use State Number
. I found both formats in different parts of the documentation. Is the latter outdated?
I fiddled around a lot and tried things like Type Number:Temperature
, Type number:Temperature
Type number State Number:Temperature
, adding a dummy commandTopic
, adding unit="°C"
and many more, but they all throw syntax errors. I could just go with Type number
, but apparently that leaves me unable to specify a QuantityType. If I don’t specify one, my item won’t show up in the dropdown list when linking the channel in Paper UI.
My installation is up to date (2.5.4 Release Build). I’m positive that zigbee2mqtt works without problems.
Any tips? Thanks!