- Platform information:
- Hardware: Raspberry pi4
- OS: raspi
- Java Runtime Environment: Openjdk 11
- openHAB version: 3
I’m trying to configure one Zigbee LED, but I can’t figure out how to get and command the brightness.
I can turn it ON and OFF, but no success extracting the brightness out ot the MQTT message or sending the command to it
I can see the mqtt message /zigbee2mqtt/LedLidl with Payload {“brightness”:80,“color”:{“x”:0.270103566139535,“y”:0.275462785681784},“color_temp”:80,“linkquality”:31,“state”:“ON”} with MQTT.fx
Any Idea how to solve it or where to look for the error?
zigbee2mqtt.thing file
Bridge mqtt:broker:mosquitto "mosquitto" [ host="192.168.8.213", port=1883, secure=false, username="openhab", password="" ] {
Thing topic LedLidl "Luz Led Lidl" @ "Salón" {
Channels:
Type switch : Encendido "Encendido" [
stateTopic="zigbee2mqtt/LedLidl",
transformationPattern="JSONPATH:$.state",
commandTopic="zigbee2mqtt/LedLidl/set",
transformationPatternOut="JS:settradfristate.js"
]
Type dimmer : Brillo "Brillo" [
stateTopic="zigbee2mqtt/LedLidl",
transformationPattern="JSONPATH:$.brightness",
commandTopic="zigbee2mqtt/LedLidl/set",
min=0,
max=254,
step=1
// formatBeforePublish="{ \"brightness\" : 30 }"
]
}
}
thigbee2mqtt.items
Group g_LuzLedLidl "Luz Led Lidl"
Switch LuzLedLidl "Luz Led Lidl" <light> (g_luces, g_LuzLedLidl) {channel= "mqtt:topic:mosquitto:LedLidl:Encendido"}
Dimmer LuzLedLidlBrillo "Luz Led Lidl Brillo [%d %%]" <light> (g_LuzLedLidl) {channel="mqtt:topic:LedLidl:Brillo"}