How to use Sonoff WB01

I wonder if someone can help mig with a example about how to use Sonoff WB01 Zigbee button?
I have never use it before so not sure how to get to work.
I did try with “current state” but nothing happend and did add a debug but no output.
I can se i the logbook that it registret when I push the button.

I just want push the button and it turn off a smartplugg and push the button again and it turn it off.

1 Like

It is probably sending an event to the HA event bus, so try to look at the HA Developer Tools under the Events tab.

Start by listening to events and type * in the Events to subscribe to.
Click Start listening and click your button and then click stop listening.

  • will make you get a lot of events, so be quick to avoid having to look through too much output.
1 Like

Thanks for the replay
I did do that and I think this is the one

event_type: zha_event
data:
  device_ieee: 00:12:4b:00:25:1e:b2:4a
  unique_id: 00:12:4b:00:25:1e:b2:4a:1:0x0006
  device_id: 1f794f378672023daacb69e1bc9fc59f
  endpoint_id: 1
  cluster_id: 6
  command: toggle
  args: []
  params: {}
origin: LOCAL
time_fired: "2023-11-07T17:50:17.707817+00:00"
context:
  id: 01HENEG4KBTWW7CW7MEJQSFK8V
  parent_id: null
  user_id: null

In Node-RED I then add node “events: all” and in Event type I add “zha_event”
But after that I’m stuck, now it react to every zha_event so I need to filter the zha_event but not sure what value to use

You should fill in the event data field too.
Use what is needed to make the device distinct, like maybe device_id

1 Like

Ahh yes nice idea thanks
I did add

{"device_id":"1f794f378672023daacb69e1bc9fc59f"}

and I also find this
Node-Red: One button, multiple switches/lights - Share your Projects! - Home Assistant Community (home-assistant.io)
So now it works nice
Thanks

Hi, I have been struggling with my sonoff button to do the same thing.
Even using custom ChatGpt for Node-Red and i am getting no where.
I have the same issue where i am getting trigger on every zha_event

I even have a switch in try ensure its only activating on the specific device with its IEEE.
But then it does nothing. Even though the IEEE is correct.

Did you figure out how to get it to do single or double press?

Thanks

Debug
Even my debug spits out a different msgid on every action and does not show we anything useful. So really stuck.
Oh and yes im a noob on all of this. So forgive my ignorance :blush:

Hi
What I did do got get it to work is this
I did just add a state node and connect it to the button
After that I did add a switch node there one exit is single and other is double.