If this is a topic better suited for a different category, please let me know…I wasn’t sure, so I picked Uncategorized.
I just got a Sonoff Orb 4-in-1 Zigbee Smart Scene Button. I was able to pair it with my Zigbee hub (Home Assistant Yellow module). Now, watching the Logbook for the device, I see:
Pressing button 1 alternately fires “On” and “Off” events
Button 2 fires “Step” event with StepMode.Up
Button 3 fires “Step” event with StepMode.Down
Button 4…doesn’t fire any events. The indicator LED in the button blinks, but Home Assistant seems to remain blissfully unaware.
Has anyone worked with this scene button, experienced the same behavior, and found a solution?
It’s not the end of the world if I can only use three buttons, but that fourth button will just be sitting there, taunting me…
I’m back around to futzing with my HA setup, and updated everything to the latest versions.
Now I can see several events in the activity log for the SNZB-01M buttons, and it’s rather interesting:
Button 1 fires “Remote Button Short Press - Button 1”, “Attribute Updated”, and “On” (or “Off”) events in that order.
Button 2 fires “Remote Button Short Press - Button 2” and “Step” events in that order.
Button 3 fires “Remote Button Short Press - Button 3” and “Step” events in that order, but the “Step” event has a different step_mode property value than Button 2.
Button 4 fires “Remote Button Short Press - Button 4” and nothing else.
I suppose now it’s up to me to dig through logs and figure out what HA “event” corresponds to “Remote Button Short Press - Button X” in order to use it for an automation trigger, as there doesn’t appear to be any easy point-and-click way to hook to it.
The critical bits are the device_ieee (identifies the specific SNZB-01M device), endpoint_id (identifies which button was pressed), and cluster_id = 64530 (which represents “Remote Button Short Press”).
I’ll mark @Peter886’s response as the answer, since it addressed the original question of “no events for button 4”.
I am struggeling with this switch. I almost returned it until I found your post now and perhaps you could help a rookie like me.
I will copy paste my message from the blueprint thread here instead:
None of this works and I’ve spent too many hours on this now. Please man I would appreciate if you explained the solution to me as if I was 5 years old. What should I do exactly after I have paired the device to HA.
You say “revert to the projects original YAML file” - what does that mean? The initial blueprint imported from the initial post here? The blueprint named “Sonoff SNZB-01M (ZHA)” in HA?
That’s the one I have, I never did any changes to the Blueprint.
When you say “replace it with this one” - I don’t know how/where to do that.
Anyway my issue is that none of the buttons does anything when used in the blueprint automations. I have tried several different events but none work. Also I have like 50 devices on my HA without issues, so I should be capable of getting it to work normally.
I did install the quirk earlier, and have not uninstalled it after I read the thread.. Should that be required? Also I have updated the firmware to the latest firmware since today.
The event activity under the device is just “On event was fired” / “Off event was fired”
I don’t know how to get better logs than that.
Hey @CheckJamz, I’m not sure if you’re talking to me or to @Peter886, but I’ll be happy to help if I can.
From what you’re describing (only seeing On / Off events), you might need to update your Home Assistant Core version. I’ve only skimmed through the thread you linked, but the upshot is the latest ZHA implementation includes better support for the SNZB-01M and it recognizes the raw button-press events (as opposed to the interpreted “on”, “off”, “step” events). You do still need to add manual zha_events to your automations to use the button-press events as triggers, but you don’t need to hand-edit any YAML to get the events recognized by the integration.
If you aren’t seeing “Remote Button Short Press” events in the Activity panel, you don’t have the latest ZHA. Start by updating your system to the latest releases.
Ah of course this factor. I have updated the HA core and OS, however I have not updated the ZHA integration. It got totally bricked last time and I managed to unbrick it finally and restore. However, I have been afraid to update it again. Perhaps I need to do this now.
Updating Home Assistant Core should resolve the issue. If the problem persists, please try removing and re-adding the device.
This is a new Zigbee wireless button. In the Zigbee specification itself, there are no standardized concepts such as single press, double press, or triple press. These actions are implemented using manufacturer-specific Zigbee commands. ZHA needs to be updated to understand and translate these proprietary commands into Home Assistant events.
That’s exactly the purpose of a Quirk (or an ZHA update). Until you either install the manufacturer’s Quirk or wait for the device support to be merged into ZHA and released, ZHA won’t be able to correctly recognize these proprietary Zigbee commands as button events.
And a Blueprint, serves a completely different purpose. It provides a convenient way to map those recognized button events to actions, so we don’t have to manually create separate automations like “If Button 1 is single-pressed, do this…” or “If Button 2 is double-pressed, do that…” for every single event. With this device supporting 16 button events, that would become tedious.
So, if the issue is simply that the button events are not being recognized correctly, updating Home Assistant Core (ZHA update has been included) should resolve it.
It seemed to be interfering with the newly merged zha device handlers file (zhaquirks/sonoff/snzb01m.py that was added recently and came in with a recent Home Assistant Core update. After disabling the quirk file and restarting Home Assistant it basically started working again. I then just went and deleted my quirk file and the associated __pycache__ directory that gets created when python compiles a .py file. Hope this helps.
Thank you both for the help and the information on how this works!
I have now successfully updated ZHA and the Homeassistant Core and OS. However, I don’t think I fully managed to remove the previous quirk. And since nothing works yet I believe this is the issue.
I removed the quirk file previously installed according to instructions of putting that .py file in a folder and un-linking to it from the HA configuration file.
Then I did the restart of HA and then updated ZHA. Then removed the previously paired device and blueprint, and re-added everything. But it still does not work.
The device shows thee quirk: Quirk: zhaquirks.sonoff.snzb01m:(SONOFF / SNZB-01M) in HA
Not sure what is wrong here. The events are listed like: On event was fired
etc..
thanks!
EDIT:
Got it to work by replacing the yaml information for the blueprint witht he one posted in this thread.
EDIT 2: Actually the long press does not seem to work at all.