Can someone please help me understand the “new” mqtt fully :
please tell me what is right and wrong and i will correct it ,so i guess it will help others too.
1 : This makes the broker . ( XXXXX.things file ) Right ?
2. And its called “myUnsecureBroker” ?
broker.things
mqtt:broker:myUnsecureBroker [ host="10.0.1.15", secure=false ]
3. What does the first line reference too/do ?
mqtt.things
Bridge mqtt:broker:myUnsecureBroker [ host="10.0.1.15", secure=false ] {
Thing mqtt:topic:mything {
Channels:
Type switch : lamp "Kitchen Lamp" [ stateTopic="lamp/enabled", commandTopic="lamp/enabled/set" ]
Type switch : fancylamp "Fancy Lamp" [ stateTopic="fancy/lamp/state", commandTopic="fancy/lamp/command", on="i-am-on", off="i-am-off" ]
Type string : alarmpanel "Alarm system" [ stateTopic="alarm/panel/state", commandTopic="alarm/panel/set", allowedStates="ARMED_HOME,ARMED_AWAY,UNARMED" ]
Type color : lampcolor "Kitchen Lamp color" [ stateTopic="lamp/color", commandTopic="lamp/color/set", rgb=true ]
Type dimmer : blind "Blind" [ stateTopic="blind/state", commandTopic="blind/set", min=0, max=5, step=1 ]
}
}
items:
Switch Kitchen_Light "Kitchen Light" {channel="mqtt:mybroker:topic:mything:lamp" }
Rollershutter shutter "Blind" {channel="mqtt:mybroker:topic:mything:blind" }
rules:
rule "Send startup message"
when
System started
then
val actions = getActions("mqtt","mqtt:broker:myUnsecureBroker")
actions.publishMQTT("system/started","true")
end
.
.
.
And another way to show the the “new” mqtt :
.
.
.
please comment the picture (reference by number ) and then i will correct it with the changes.
.
Bonus question
1 . When i want to make another mqtt Things file what does the bridge line look like because when
i try to make another bridge it messes up the other ??? very frustrating . and nothing works anymore.
- my goal is to be able to have bought my old mqtt and new running at the same time but, mabye it i too hard ? to figurer out .
ps: the files in this are taken from other mqtt questions in the forum ,hope its ok ,this i just to understand the new mqtt fully .
.
.
My setup :
Im on windows 10 , openhab 2.5.3 Build#66
I have mosquitto running and working
I have mqtt1 and mqtt v2 binding installed