I setup an Arduino with buttons on it that when depressed send a message to the MQTT broker 0 for “on” and 1 for “off”. I also am listening on the same channel on the arduino to turn the relay on or off.
The openhab UI is correctly turning on and off the relay, however when I hit a button on the arduino, it doesn’t update the openhab UI.
MQTT Subscribe:
FROM BUTTON ON ARDUINO
Client mosqsub/806-openhab received PUBLISH (d0, q0, r0, m0, 'livingroom/relay1', ... (1 bytes))
0
Client mosqsub/806-openhab received PUBLISH (d0, q0, r0, m0, 'livingroom/relay1', ... (1 bytes))
1
FROM OPENHAB UI
Client mosqsub/806-openhab received PUBLISH (d0, q0, r0, m0, 'livingroom/relay1', ... (1 bytes))
0
Client mosqsub/806-openhab received PUBLISH (d0, q0, r0, m0, 'livingroom/relay1', ... (1 bytes))
1
This is my item in the items file. I’m sure there’s something here I’m doing wrong:
Switch LivingRoom_Relay1 "Living Room Light [MAP(switch.map):%s]" (Bedroom,Lights) {mqtt=">[mymosquitto:livingroom/relay1:command:ON:0],>[mymosquitto:livingroom/relay1:command:OFF:1],<[mymosquitto:livingroom/relay1:state:default]"}
for completeness here is the contents of the map file.
OFF=0 ON=1
Nothing is showing up in the openhab.log as if something is misconfigured.
Anyone have any ideas??
Thanks in advance