I am trying to set up my first hue light bulb in OpenHAB3 via Zigbee2MQTT. I am able to read values from the bulb, but I cannot figure out how to send commands back to the bulb via MQTT. Should the state and command topic be different or what am I doing wrong?
Thanks in advance
UID: mqtt:topic:cb609d2f95
label: Hue White Ambiance 1
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:e90f42a7f8
location: Kitchen Island
channels:
- id: state
channelTypeUID: mqtt:string
label: state
description: null
configuration:
commandTopic: zigbee2mqtt/0x001788010830795c
allowedStates: ON,OFF
postCommand: true
transformationPatternOut: JSONPATH:$.state
stateTopic: zigbee2mqtt/0x001788010830795c
transformationPattern: JSONPATH:$.state
To make things easier I would recommend using the “output: attribute” setting in zigbee2mqtt. With that option each attribute will get it’s own message so you don’t need json transformations anymore.
And the web-GUI is another essential feature of zigbee2mqtt if you haven’t discovered it yet.
You can find many examples in the discussions here: