Help for MQTT command in OH3

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
  - id: PowerSwitch
    channelTypeUID: mqtt:switch
    label: Kapcsoló
    description: ""
      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:
  • Outgoing Value Format to %S

Any idea how to set it up?

I also try to publish the full JSON: {“state”:“ON”} but no success.

formatBeforePublish: '{"state":"%S"}'

Who is publishing that message?
This looks unusual -

It is published by OH MQTT Binding

How strange. That’s a zigbee2mqtt error message.

What topic are you listening to with mqtt.fx?

Same topic: zigbee2mqtt/IKEA_BULB_01/set
I see the messages from both from OH and manual publishing. They are the same letter by letter but one works other not
This not works:

This works:

What is also interesting that the OFF message looks to be working either from OH or manual… :woozy_face:

Okay, there’s not much more that can be done from openHAB than sending the correct message. Make sure you are sending ON and not 0N (zero-N), we can’t check from screenshots.

I feel it is not OH issue rather in zigbee2mqtt. I put it on a sitemap and I can switch on and off without problem (so far I used a zigbee PIR sensor to switch the bulb on and off by a simple rule). Maybe the zigbee trafic overload it or something like that.