Hi,
my whole setup is based on config-files and this makes it easy for me to migrate from openHAB 2.2 to 2.4. I made a new installation and copied my whole config-files to openHAB 2.4.
But I have to migrate to MQTT 2.4.
I’m using mosquitto-broker
I have some issues translating the Things and Items and want to ask for some help.
“o2mqtt” is the old broker in openHAB 2.2. “broker” the new one in openHAB 2.4
This is the old Item from openHAB 2.2:
Number SW1_MQT_231 "SW1MQT231: [%s]"
{ mqtt="<[o2mqtt:/mqtt231/Taste1/state:state:default]" }
I created the Thing, based on this documentation:
Bridge mqtt:broker:mosquitto "Mosquitto" [ host="localhost", port=1883, secure=false ]
{
Thing topic SW1MQT231 {
Channels:
Type number : button "Taste1" [ stateTopic="mqtt231/Taste1/state"]
}
Thing topic SWTMQT233 {
Channels:
Type string : reachable "Reachable" [ stateTopic="tele/mqtt233/LWT" ]
Type switch : power "Power" [ stateTopic="stat/mqtt233/POWER", commandTopic="cmnd/mqtt233/POWER" ]
Type number : rssi "WiFi Signal Strength" [ stateTopic="tele/mqtt233/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI"]
}
And here the Item:
Number SW1_MQT_231 "SW1MQT231: [%s]" { channel="mqtt:topic:mosquitto:SW1MQT231:button" }
String SWT_MQT_233_Reachable "Reachable: [%s]" { channel="mqtt:topic:mosquitto:SWTMQT233:reachable" }
Switch SWT_MQT_233 "MQT233" { channel="mqtt:topic:mosquitto:SWTMQT233:power" }
Number SWT_MQT_233_RSSI "WiFi Signal Strength [%d %%]" { channel="mqtt:topic:mosquitto:SWTMQT233:rssi" }
SWT_MQT_233 is working perfect, but I get no state from SW1_MQT_231
I checked the ESPEASY with
mosquitto_sub -h localhost -t /mqtt231/Taste1/state
and get 1 by pressing an 0 by relaesing the button.
What is my mistake in the Thing and/or Item?