when using a tool, sub to #
, not '#'
(without the ' '
)
facebook thumbs up!
1 Like
openhab> items list |grep -i cord1
cord1 (Type=SwitchItem, State=NULL, Label=Cord-1, Category=poweroutlet, Groups=[Cords, Lights, Power])
openhab>
so we could break down:
mosquitto_pub -u openhabian -P D1aNAL@n3 -d -t diana/cord1/cmnd/POWER -m off
to:
mosquitto_pub = broker
-u open -P Dxxxxx -d = XXX
-t diana/cord1/ = topic
cmnd/ = command
POWER = trigger
-m off = transformation
am I missing a user and password in my topic?
Now to be easy for you try to arrange your code just like my example and check for difference
Switch Spoturii {mqtt=" > [mqtt: apartament/dormitor/lampa2: command: ON :1],
> [mqtt: apartament/dormitor/lampa2: command: OFF :0]"}
String RGBdormitor "LED Strip String"
{mqtt=" > [mqtt: apartament/dormitor/bandaled1: state: * :default]"}
your code
Switch cord1 "Cord-1" <poweroutlet> (Cords, Lights, Power)
{ mqtt="> [mosquitto: diana/cord1/cmnd : POWER: on ],
> [mosquitto: diana/cord1/cmnd: POWER: off]
< [mosquitto: stat/diana/cord1/POWER: state: default]" }
If i am right your code has some missing parameters that the mqtt need to know those parameters
compare my code with your code , and try to understand what you did wrong ,