Sonoff SNZB-01 Button with beta Zigbee Button driver

I could be mistaken about the joining thing. It was just that the Sonoff buttons normally pair quickly and easily and a few times today they didn’t pair at all. I convinced myself there was a correllation with which of my phone’s I had picked up.

After a frustrating two weeks of waiting, the beta channel with the fix to the Zigbee Button driver for the Sonoff button was updated a few hours ago and one hub presumably picked it up when it rebooted with the 44.9 update. Unfortunately my test buttons were on the other hub. That updated to 44.9 minutes later but remained offline, even after a power cycle.

I rebooted it from the IDE and it came back online and the driver updated. So what is the replacement for that when the IDE goes?

So @nayelyz, the question is, did the fix work? Well it turned out I wasn’t going to find out without pairing the device again, and I thought I might as well delete it as well to make sure. Being in bed with the lights off I wasn’t really in a position to rip the case of the button open, find a pointy thing, and reset it. Naturally that didn’t stop me and yes the button presses are now working, thank you.

3 Likes

:joy: can’t let a pesky thing like sleep slow you down Graham! That’s the spirit!

It’s good to hear it is working again, @orangebucket. I don’t know why the device had that behavior but we have opened some reports where people mentioned that after a firmware update, their devices went offline until they reset them.

By “power cycle”, do you mean you disconnected the Hub, waited around 20 seconds and connected it again?
It wouldn’t be normal that the IDE reboot worked better than a hard reset…That’s why I’m trying to understand.
Also, the team is already aware this option is highly important, especially if you’re not at home, so, let’s see if they provide more info about this in the future.

this is a bit strange my snzb 01 is using the rdg zigbee button driver works great ,
if i change to the zigbee button driver the switch operates but any routeens added to it dont work at all
strange .

? Select a driver. 12
2022-08-24T00:59:24.820559291+00:00 TRACE Zigbee Button Received event with handler zigbee
2022-08-24T00:59:24.860824666+00:00 INFO Zigbee Button <ZigbeeDevice: 10343c69-0e34-4bee-a06a-318729e5ff72 [0x79A3] (SONOFF lap tray switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x79A3, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -62, body_length: 0x0003, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x01, seqno: 0xAA, ZCLCommandId: 0x02 >, < Toggle || > > >
2022-08-24T00:59:24.880367750+00:00 TRACE Zigbee Button Found ZigbeeMessageDispatcher handler in zigbee_button → eWeLink Button
2022-08-24T00:59:24.892400625+00:00 INFO Zigbee Button Executing ZclClusterCommandHandler: cluster: OnOff, command: Toggle
2022-08-24T00:59:24.901838500+00:00 INFO Zigbee Button <ZigbeeDevice: 10343c69-0e34-4bee-a06a-318729e5ff72 [0x79A3] (SONOFF lap tray switch)> emitting event: {“attribute_id”:“button”,“capability_id”:“button”,“component_id”:“main”,“state”:{“value”:“pushed”}}
2022-08-24T00:59:24.919358708+00:00 DEBUG Zigbee Button SONOFF lap tray switch device thread event handled
2022-08-24T00:59:36.444376589+00:00 TRACE Zigbee Button Received event with handler zigbee
2022-08-24T00:59:36.448716089+00:00 INFO Zigbee Button <ZigbeeDevice: 10343c69-0e34-4bee-a06a-318729e5ff72 [0x79A3] (SONOFF lap tray switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x79A3, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -62, body_length: 0x0003, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x01, seqno: 0xAB, ZCLCommandId: 0x02 >, < Toggle || > > >
2022-08-24T00:59:36.458732922+00:00 TRACE Zigbee Button Found ZigbeeMessageDispatcher handler in zigbee_button → eWeLink Button
2022-08-24T00:59:36.461977422+00:00 INFO Zigbee Button Executing ZclClusterCommandHandler: cluster: OnOff, command: Toggle
2022-08-24T00:59:36.465480964+00:00 INFO Zigbee Button <ZigbeeDevice: 10343c69-0e34-4bee-a06a-318729e5ff72 [0x79A3] (SONOFF lap tray switch)> emitting event: {“attribute_id”:“button”,“capability_id”:“button”,“component_id”:“main”,“state”:{“value”:“pushed”}}
2022-08-24T00:59:36.476476464+00:00 DEBUG Zigbee Button SONOFF lap tray switch device thread event handled
2022-08-24T00:59:43.460920759+00:00 DEBUG Zigbee Button driver device thread event handled
listening for logs… done

I may perhaps have not left a long enough period between off and on, but if so I’ve been making the same mistake consistently for years now. I’ve always considered an IDE Reboot as having a different effect and this forum has many examples of users apparently finding the same.

1 Like

I see what you mean and I think I know what the problem is.

@nayelyz The sub-driver seems to be calling emit_event without setting state_change to true as required for buttons. The events seem to propagate as far as the UI, which is why I said the button is working, but they don’t get any further unless you change the type of press. So the buttons are still useless.

I should have spotted that last night (*) really so I apologise for that. My further thoughts are “left to the reader’s imagination”.

(*) It still is last night.

Look where it got me, though. Poor duck’s cake, or something like that.

I think I am taking this quite well. I just hope that someone in ST has an overview of the issues that have cropped up so lessons can be learned.

2 Likes

Hello @nayelyz

I think I buried the reality that the button isn’t actually fixed. I would guess it needs an event.state_change = true in button_handler in the ewelink sub-driver but I haven’t tested it.

If you haven’t already can you report this? I created an issue on Github but I am not convinced that is particularly effective.

Thanks.

1 Like

I added this comment in the previous report, when you open an issue in the Github repo, please let us know (@andresg or me).

@nayelyz I’ve only just discovered that this device was fingerprinted for the production channel twenty days ago. It had barely entered beta at that stage and was, of course, totally broken and still is. They really know how to drive users away.

The issue is already being handled, here’s the PR as a reference:

Oh I know. I was just commenting on how annoying it is when you think you are beta testing something and you discover it is already in production.

Yesterday, I was happily standing in the sunshine overlooking a picturesque harbour and I thought I’d see if a steam train was due on the railway below me to complete the scene. The next thing I knew my hand and mobile phone were covered in a generous helping of bird crap.

ST and that bird seem very similar at the moment.

2 Likes

Hey guys, sorry if this sounds like a noob question but I kinda joined the Edge driver conversation a little late (a few days ago). As it was so close to the 9/30 cutover I haven’t joined the beta channel hoping instead to keep my hub fully production. Anyway - I removed the few button devices I have and the DTH, rediscovered/readded them, but they are on an 8/23 version of the driver which doesn’t work in routines. I followed the PR and it looks like the fix has been committed to the “main” channel. Does that mean the fix is in “production” and is there anything I need to do to update my hub with the new version? Maybe a better question is how can I tell which version of the driver is the most current production version? Thanks!!!

Hi, @ktdt00!

Not at all, don’t worry.
Do you mean this PR for the eWeLink/SNZB-01P device?
If so, the change hasn’t been published yet, I’ll ask the team about this.

By the automation not working, do you mean they don’t trigger when the button is pressed?

Yes. The button state change is observable in the ST app but routines based on the event are not triggering. I believe it is the same issue reported by @orangebucket and which you responded to here:

1 Like

Hi, @ktdt00, @orangebucket
The changes to the driver are now published in production, can you help us check how it works now, please?

1 Like

hi what is the version number

The drivers hadn’t been updated when I looked earlier this afternoon but they have now and my first response is to say that the buttons working as expected now. As I didn’t have to do any reinstalling of the devices this time I have been able to test them with my button handling rules. However I wouldn’t take too much notice of me, after all I called it wrong last time, even if I did also identify the problem. Thank you.

Now for one of my asides. Testing these buttons also reveals that the dashboard tile display of button status can get very confused. The transition to ‘standby’ sometimes just doesn’t happen.