Thank you so much for your input so far, you have been a great help. Apologies, I’ve not got around to responding earlier (may be time difference, I’m in the UK).
However, I’ve now had chance to play around with configutrations and the below actually results in a error in the log.
2019-01-04 18:33:19.016 [WARN ] [eneric.internal.generic.ChannelState] - Command ‘ON’ not supported by type ‘OpenCloseValue’: No enum constant org.eclipse.smarthome.core.library.types.OpenClosedType.ON
2019-01-04 18:33:27.981 [WARN ] [eneric.internal.generic.ChannelState] - Command ‘OFF’ not supported by type ‘OpenCloseValue’: No enum constant org.eclipse.smarthome.core.library.types.OpenClosedType.OFF
I’m a little sorry it took so long - I definitely learned a lot. I got a chance to read through like 50 more forum topics, read the documentation on MQTT again, read the blog post about MQTT 2.4 by @David_Graeff again, play with node red (for my dummy item)…
Whew, that was much more fun than doing nothing for the last 2 hours of my work day. Enjoy!
I’m glad to help! Eventually I’ll need to figure this stuff out anyway for my house, it’s good for me to practice by tackling other people’s questions.
I just barely got it figured out, too… I had a whole post all put together about everything I’d tried that didn’t work - then I realized my pi didn’t have the Maps transformation service installed
I’m still not sure why the ON=“OPEN”, OFF=“CLOSED” didn’t work, does anyone know? Is that for outgoing transformations while the map is needed for incoming?
Honestly, sincere thank you! You have been key in getting this sorted, so thank you
I can understand your fustrations with the transformation service, easy mistake to make and obvious only once you realise lol
Agreed, not sure why the ON=“OPEN”, OFF=“CLOSED” didn’t work…would be great to hear thoughts from others…Could well be what you say, maps for incoming and the other for outgoing…
I am really confused, my binding seems to install, but I cannot get any commands to be received. My things looks like -
Thing mqtt topic Laundry Room “laundry” @ “light” {
Channels:
Type switch : switch “laundry_room_light” [
stateTopic=“laundry_room_light/STAT/”,
commandTopic=“laundry_room_light/cmnd/POWER/”,
//retained=false,
//postCommand="",
//transformationPattern=“JSONPATH:$.POWER”,
//formatBeforePublish="%s",
ON=“ON”,
OFF=“OFF”
]
where my item is -
Switch laundry_room_light “Laundry Room” (FF_LaundryRoom, gLight) { channel=“mqtt:topic:laundry_room_light:switch” }
Does this formatting look good? I am having troubles understanding where the “laundry” @ “light” is derived from. can someone point me in the right direction?
Yet the first line is faulty
You must not repeat the key word mqtt in the thing definition, beside that a Thing has a name, and the name must not contain spaces. So
Thing topic Laundry_Room "laundry" @ "light" {
would suffice.
In question of the channel definition, as you are using a switch, there is no need for parameters other than stateTopic and commandTopic. The whole thing would be:
But the bridge is missing, so please be aware that you have to configure a bridge for the Thing.
Are you sure the topics are correct? I’m using Tasmota, and the topics would be more like laundry_room_light/stat/POWER and laundry_room_light/cmnd/POWER (given, you defined full topic as %topic%/%prefix%/)
By the way: the “laundry” @ “light” part:
If the channel is linked to an item (you did not link the correct channel name either ), the Thing would appear in Paper UI control at the LIGHT tab and with the Name laundry
woot woot, it magically started working. well, not really. I had both the mqtt and the embedded mqtt services installing. Also, had to remove the last / in the topics. Thanks for the help @Udo_Hartmann!!!
Hello,
That is up to you as both approaches will work. If the garage doors are right next to each other it would probably make more sense to have one thing with two channels (eg right door and left door) but if they are separate from each other it might make more sense in your hierarchy to have two things with a channel each. You will have to link items too the channels anyway and they won’t care what thing the channel belongs to.
Best regards Johannes
Thanks for the reply, how do check current state of a channel returned, or do I create another channel to receive state?
one thing for switch and one for state?
I use this in my oh 2.3 rule to check if door left open