Hey,
I can’t figure out how to link my MQTT broker with items, and send an command from a mosquitto_sub shell.
For instance:
something.things:
Bridge mqtt:broker:mosquitto [ host="0.0.0.0", secure=false ]
{
Thing mqtt:topic:mything "mqtt_test" {
Channels:
Type switch : lamp "Kitchen Lamp" [ stateTopic="lamp/enabled", commandTopic="lamp/enabled/set", on="ON", off="OFF" ]
}
}
someitems.items:
Switch dummy "dummy Switch" (gPiscine) {channel="mqtt:broker:mosquitto:mything:lamp"}
I have installed Mosquitto & I know it works, if I open 2 terminal I can mosquitto_sub -t sometopic
mosquitto_pub -t "sometopic" -m "hello world"
However if I do:
mosquitto_pub -t “lamp” -m “ON”
Or any of the 55 thousands variations I could think of ("mqtt:broker:mosquitto:mything… etc.) nothing seems to work.
What’s the syntax I need to be able to publish to the topics defined in my Bridge mqtt broker from a mosquitto_pub terminal? Or is my item suscription to the channel wrong?