I need your help to configure commands for devices through MQTT
(I have a running OH2 instance and slowly testing OH3.1 on a RPi4)
The device is a IKEA Bulb controlled throught Zigbee2MQTT.
I created the Thing, Channels, Items and OH can read all data from the device but when I would like to send MQTT command than Zigbee2Mqtt run to trouble.
Channel setup:
UID: mqtt:topic:280c278d0c:MQTT_IKEA_BULB_01
label: MQTT_IKEA_BULB_01
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:280c278d0c
channels:
- id: PowerSwitch
channelTypeUID: mqtt:switch
label: Kapcsoló
description: ""
configuration:
commandTopic: zigbee2mqtt/IKEA_BULB_01/set
stateTopic: zigbee2mqtt/IKEA_BULB_01
transformationPattern: JSONPATH:$.state
off: OFF
on: ON
After switching the OH items changes the status:
2021-08-15 16:11:44.011 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘MQTTIKEABULB01_Kapcsolo’ received command ON
2021-08-15 16:11:44.013 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item ‘MQTTIKEABULB01_Kapcsolo’ predicted to become ON
2021-08-15 16:11:44.022 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘MQTTIKEABULB01_Kapcsolo’ changed from OFF to ON
But on the MQTT.fx I see this massage:
{"level":"error","message":"Publish 'set' 'state' to 'IKEA_BULB_01' failed: 'Error: Command 0x60a423fffef36a2e/1 genOnOff.on({}, {\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":false,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (SREQ '--> AF - dataRequest - {\"dstaddr\":6032,\"destendpoint\":1,\"srcendpoint\":1,\"clusterid\":6,\"transid\":54,\"options\":0,\"radius\":30,\"len\":3,\"data\":{\"type\":\"Buffer\",\"data\":[1,98,1]}}' failed with status '(0x10: MEM_ERROR)' (expected '(0x00: SUCCESS)'))'"}
When I publish ON or OFF on zigbee2mqtt/IKEA_BULB_01/set using MQTT.fx than the bulb is switching without problem
What I tried without result:
- on/off values to blank, to 1/0, to ON/Off
- transformationPatternOUT: MAP:binary.map
- Outgoing Value Format to %S
Any idea how to set it up?