I’m using the .things file to define my mqtt things.
My broker is set up using the same syntax as yours. Can’t say if the localhost address and using no credentials is making the connection, but you should see that in the logs!
For the device things my working syntax is:
@max-e-moose
Thank you for the tutorial using config files… would you mind posting a Sitemap for your example? I hope this will help me to finalize my config. With PaperUI it’s already working.
I see that error in the logs too. It did not have any effect on the Things so I had been ignoring it. However I have now edited my .things and .items files to follow the correct syntax that @opus posted and that error is now gone. Part of the change involved adding the broker name to the channel in the items file. I will edit the first post and correct the syntax there.
I copied the syntax from the MQTT Generic Thing documentation for my example. At the time it looked like “Thing mqtt:topic:mything” but now looks like “Thing topic mything”. I can confirm that the latter is correct.
Thanks for the update. I just verified it and it works also in my case fine!
All error/warning messages gone and the all switches and temperature and humidity items work fine.
Again all the best for the new year and thanks for the help and all the work for this project!
Very impressive that different kind of syntax still ends up in a working functionality. I like if something works error tolerant!
The group name can be set to any string you like. Setting groups is not necessary.
The used icons are most probably images or icons created by the user. I use a picture of a sonoff basic, the name is file name of the image/icon.
Uninstalling and re-installing the app fixed the issue, not rule related ; weird though ; thank you
Hello i used to have this rule send me broadcast notification whenever an item turns on or off, how can i make it work using mqtt 2.4 noting that mqtt action binding is no more available
Many thanks,
rule “Present”
when
Member of gDual changed or
Member of gSingle changed
then
if(previousState == NULL) return;
logInfo(“Sent”, “Test”)
sendBroadcastNotification(triggeringItem.name.toString +" changed to " + triggeringItem.state.toString)
end```
If you could post the topic and payload we could show you how to use the " mqttActions" as posted by @max-e-moose.
Although that should be possible for yourself.
I also tried to change to the new 2.4 (2.5) mqtt binding. Nearly everything works because this helpful solution.
But i have problems with the sonoff RF bridge (newest Tasmota Firmware).
With mqtt 1 it was possible to send the RFKey with this command:
The mqtt topic is cmnd/so_rfb_1/Backlog according to your old configuration. A switch can only send “ON” and “OFF” to a topic, if you don’t define custom ON/OFF parameters. (see documentation)
That means actually: Send ON/OFF to this topic: cmnd/sonoff_rfb_1/BACKLOG RfCode #000014 which is not what you want
rule "G_sonoff"
when
Member of G_Sonoff received command
then
if (receivedCommand == ON) {
switch triggeringItem.name.toString {
case "Switch Sw_it_licht_r88" : Sw_it_licht_command.sendCommand("RfCode #004015")
case "Switch Sw_it_licht_r11_west" : Sw_it_licht_command.sendCommand("RfCode #005015")
//etc...
}
} else {
switch triggeringItem.name.toString {
case "Switch Sw_it_licht_r88" : Sw_it_licht_command.sendCommand("RfCode #004014")
case "Switch Sw_it_licht_r11_west" : Sw_it_licht_command.sendCommand("RfCode #005014")
//etc...
}
}
end