OSRAM LEDVANCW power outlet: Setting to ON or OFF does not worl

  • Platform information:
    • Hardware: Raspi 4, 2 GB RAM, 16 GB SD card
    • OS: openhabian (OH3)
    • Java Runtime Environment: OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
    • openHAB version: 1.7.1
  • Issue of the topic:
    I connected the power outlet (OSRAM LEDVANCE AB3257001NJ) via zigbee successfully. Displaying the state (ON/OFF) works fine. However if I configure to set the switch there is no reaction. I can see in the log of Mosquitto that the command does not reach there.

The outlet state item is defined as:

 id: state
    channelTypeUID: mqtt:switch
    label: State(E003)
    description: ""
    configuration:
      retained: true
      postCommand: false
      transformationPatternOut: JSONPATH:$.state
      stateTopic: zigbee2mqtt/0x7cb03eaa0a0b0edb
      transformationPattern: JSONPATH:$.state
      off: OFF
      on: ON

I tried this to command the switch:

id: switch
    channelTypeUID: mqtt:switch
    label: Switch(E003)
    description: ""
    configuration:
      commandTopic: zigbee2mqtt/0x7cb03eaa0a0b0edb/set
      postCommand: true
      transformationPatternOut: JSONPATH:$.state
      off: OFF
      on: ON

I’m using the current firefox browser with “openhabian:8080” in the URL. I’m logged in as admin.

Kind regards,
Günther

Not really sure why you have set up two channels. What are they linked to, is more than one Item involved?

If your Item does not get sensible state updates, then the UI will not let a switch widget turn it OFF.

You certainly do not want that.

Try

commandTopic: zigbee2mqtt/0x7cb03eaa0a0b0edb/set/state

And remove the transformationPatternOut

Thank you very much. The commandTopic now works!

I created two channels because with one channel even fetching the state didn’t work. When I left out the CommandTopic it showed ON or OFF as it appears at the plug. I created the other channel to experiment. Now the issue is resolved and I have one channel.

The parameter PostCommand was set to find out what happens.

Thanks again guys and I wish a happy new year!