Button (SNZB-01P) On/Off rather than presses

I have add the above to OH 5.0.2 and the system has it as an On/Off switch. I want it to register presses like any other button. I’m using the inbuild Zigbee Binding rather than Z2M -

14:49:22.164 [DEBUG] [.converter.ZigBeeConverterSwitchOnoff] - 08DDEBFFFEACC992: ZigBee command received ToggleCommand [On/Off: E442/1 → 0000/1, cluster=0006, TID=1C]
14:49:22.166 [DEBUG] [.converter.ZigBeeBaseChannelConverter] - 08DDEBFFFEACC992: Channel zigbee:device:skyconnect:GardenButton:08DDEBFFFEACC992_1_switch updated to ON
14:49:22.167 [DEBUG] [ing.zigbee.handler.ZigBeeThingHandler] - 08DDEBFFFEACC992: Updating ZigBee channel state zigbee:device:skyconnect:GardenButton:08DDEBFFFEACC992_1_switch to ON
14:49:22.168 [DEBUG] [g.zigbee.handler.ZigBeeIsAliveTracker] - IsAlive Tracker scheduled task for thingUID=zigbee:device:skyconnect:GardenButton in 14430 seconds
14:49:23.403 [DEBUG] [.converter.ZigBeeConverterSwitchOnoff] - 08DDEBFFFEACC992: ZigBee command received ToggleCommand [On/Off: E442/1 → 0000/1, cluster=0006, TID=1D]
14:49:23.405 [DEBUG] [.converter.ZigBeeBaseChannelConverter] - 08DDEBFFFEACC992: Channel zigbee:device:skyconnect:GardenButton:08DDEBFFFEACC992_1_switch updated to OFF
14:49:23.405 [DEBUG] [ing.zigbee.handler.ZigBeeThingHandler] - 08DDEBFFFEACC992: Updating ZigBee channel state zigbee:device:skyconnect:GardenButton:08DDEBFFFEACC992_1_switch to OFF
14:49:23.406 [DEBUG] [g.zigbee.handler.ZigBeeIsAliveTracker] - IsAlive Tracker scheduled task for thingUID=zigbee:device:skyconnect:GardenButton in 14430 seconds

I have this device and use the ItemStateChange trigger so I can detect a button press. Maybe that would work for you?

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: JohnsButton
    type: core.ItemStateChangeTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      type: application/javascript
      script: |-
        console.log("toggling John's Light ")
        var item = items.getItem("JohnsLight");
        if (item.state == "ON") {
          item.sendCommand("OFF")
        } else {
          item.sendCommand("ON")
        }
    type: script.ScriptAction

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.