I’m trying to get my shelly plug s to work via mqtt, I get it so far that the device publish data to mqtt broker but I fail on getting it into openhab. I prefer mqtt so I don’t have to set static IP:s to all devices, and i allready have a shelly 1 pro running via mqtt.
Heres is my thing configuration for generic mqtt thing.
@Marcus_Carlsson I hooked up a couple of Nous A1’s (running Tasmota) to OH by looking up what MQTT strings arrive at OH and then built the generic MQTT thing-configuration around this. Am not a pro, but after some iteration it worked.
Maybe what I came up with helps you for your exercise.
why do you need this “formatBeforePublish” part?
Also, on and off should be defined in separate lines of the configuration, like
configuration:
commandTopic: shellies/shellyplug-s-livigroom_south/relay/0/command
stateTopic: shellies/shellyplug-s-livigroom_south/relay/0
off: off
on: on
Thanks for all hints I did just have a working example of a shell pro 1 module and tried to reverse that and that didn’t go well. No it seem like it works as supposed to. I just need to figure out how to make channles for energy and power, maybe also temperature.
Also the typoo was already made in configuration of shelly topic so in openhab it was correct.
And if somone stumbles across this i post my updated config, I used gui to create new channels because mu code wouldn’t get saved when typing into code page of generic mqtt thing.