I have a couple of RGBWW bulbs that have been flashed with tasmota 8.1 and I am using MQTT and files to add the devices to openHAB and HomeKit. All of the controls for the bulb appear to be working in the PaperUI->Controls as well as in the Home app, but there is an unexpected behaviour with one of the bulbs.
Simply, all of the Bulb1 controls change both bulbs, but Bulb2 controls only change Bulb2. (I hope that is clear)
I suspect a syntax error in my things/items files, but I can’t seem to find anything in the documentation/community about it.
I am hoping someone more experienced can find my error.
Here is my Things file…
Bridge mqtt:broker:myBroker [ host="192.168.X.X", secure=false, username="<user>", password="<pass>" ] {
// Living Room Lamp 1
Thing mqtt:topic:livingRoomLamp1 "LR Lamp 1"
{ Channels:
Type switch : livingRoomLamp1Power "LR Lamp 1: Power" [ stateTopic="stat/livingRoomLamp1/POWER", commandTopic="cmnd/livingRoomLamp1/POWER" ]
Type dimmer : livingRoomLamp1Brightness "LR Lamp 1: Brightness" [ stateTopic="stat/livingRoomLamp1/DIMMER", commandTopic="cmnd/livingRoomLamp1/DIMMER" ]
Type dimmer : livingRoomLamp1White "LR Lamp 1: White" [ stateTopic="stat/livingRoomLamp1/CT", commandTopic="cmnd/livingRoomLamp1/CT", min=153, max=500, step=10 ]
Type colorHSB : livingRoomLamp1Color "LR Lamp 1: Color" [ stateTopic="stat/livingRoomLamp1/HSBColor", commandTopic="cmnd/livingRoomLamp1/HSBColor" ]
}
// Living Room Lamp 2
Thing mqtt:topic:livingRoomLamp2 "LR Lamp 2"
{ Channels:
Type switch : livingRoomLamp2Power "LR Lamp 2: Power" [ stateTopic="stat/livingRoomLamp2/POWER", commandTopic="cmnd/livingRoomLamp2/POWER" ]
Type dimmer : livingRoomLamp2Brightness "LR Lamp 2: Brightness" [ stateTopic="stat/livingRoomLamp2/DIMMER", commandTopic="cmnd/livingRoomLamp2/DIMMER" ]
Type dimmer : livingRoomLamp2White "LR Lamp 2: White" [ stateTopic="stat/livingRoomLamp2/CT", commandTopic="cmnd/livingRoomLamp2/CT", min=153, max=500, step=10 ]
Type colorHSB : livingRoomLamp2Color "LR Lamp 2: Color" [ stateTopic="stat/livingRoomLamp2/HSBColor", commandTopic="cmnd/livingRoomLamp2/HSBColor" ]
}
}
Here is my Items file…
// Living Room Lamp 1
Switch livingRoomLamp1Power "LR Lamp 1: Power" ["Lighting"] { channel="mqtt:topic:livingRoomLamp1:livingRoomLamp1Power" }
Dimmer livingRoomLamp1Brightness "LR Lamp 1: Brightness" ["Lighting"] { channel="mqtt:topic:livingRoomLamp1:livingRoomLamp1Brightness" }
Dimmer livingRoomLamp1White "LR Lamp 1: White" ["Lighting"] { channel="mqtt:topic:livingRoomLamp1:livingRoomLamp1White" }
Color livingRoomLamp1Color "LR Lamp 1: Color" ["Lighting"] { channel="mqtt:topic:livingRoomLamp1:livingRoomLamp1Color" }
// Living Room Lamp 2
Switch livingRoomLamp2Power "LR Lamp 2: Power" ["Lighting"] { channel="mqtt:topic:livingRoomLamp2:livingRoomLamp2Power" }
Dimmer livingRoomLamp2Brightness "LR Lamp 2: Brightness" ["Lighting"] { channel="mqtt:topic:livingRoomLamp2:livingRoomLamp2Brightness" }
Dimmer livingRoomLamp2White "LR Lamp 2: White" ["Lighting"] { channel="mqtt:topic:livingRoomLamp2:livingRoomLamp2White" }
Color livingRoomLamp2Color "LR Lamp 2: Color" ["Lighting"] { channel="mqtt:topic:livingRoomLamp2:livingRoomLamp2Color" }
When I look at the messages in MQTT Explorer, I see the command…
cmnd
livingRoomLamp1
Power=0
and then a state for both bulbs…
stat
livingRoomLamp1
RESULT = {"POWER":"OFF"}
POWER = OFF
livingRoomLamp2
RESULT = {"POWER":"OFF"}
POWER = OFF