How to ‘poke’ a zigbee device?

I am using several sonoff presence detectors and most of the time they work great.

But sometimes just fails to detect presence.

When this occurs unplugging and plugging it back in again fixes it.

But so does pressing the refresh button in zigbee2MQTT see photo and circle :o:


Can anyone tell me how to press this button using an Home Assistant automation or node Red option?

Much appreciated

If the usual “jumping in front of the sensor, flapping your arms” does not work, then I’d be looking at why messages seem to get lost instead of forcing a refresh from HA, which is more like a band aid solution.

Are there enough zigbee routers near, do any mains powered zigbee devices get unplugged every one in a while, interference from nerby applyances? Things like that.

2 Likes

OK

The zigbee coordinator is 6 feet away in the same room.

The messages are not getting lost, they aren’t being generated, and the sonoff just seems to go to sleep.

All Sonoff SNZB-06Ps are up to date with their firmware and zigbee2MQTT is up to date too.

Now it can go a day before this strange sleep state.

This issue happens with the Sonoff Presence sensors on both zigbee networks with a sonoff P coordinator and an smlight coordinator.

There is no interference by other zigbee or wifi networks.

It is showing it is checking in often and seems to be a device issue seen in most of the sonoffs - a damn shame but I have quite a few so I would like them to function.

If I can’t ‘poke’ it using the action illustrated then it is a shame and requires a more sledge hammer approach and putting it on a switchable usb/power socket and just rebooting it every say 6 hours.

But the best workaround would be if some zigbee2MQTT expert can craft an Home Assistant automation or clue to one - or maybe an MQTT command I can throw at it using Node Red.

If poking helps then it still sounds to me like the sensor thought it sent it but it never arrived. I do. ot know if an automated poke is possible. There is such a thing as ZHA toolkit but that does not sound like it can be used with z2m, or if z2m has similar tools itself. I think the latter.

Thanks

Hopefully some zigbee2MQTT expert will come up with an idea

I am trying an mqtt

zigbee2MQTT_2/Lounge/Presence/action

or maybe a get instead of an action

I’ll report back on progress

Ah, the guy with the eternal zigbee issues is back!

Was gonna suggest that battery devices from Sonoff are crap, but this isn’t a battery device, so it shouldn’t possibly be sleeping.

If no message is being sent to Z2M, then that points to either a device or a setting issue. Try setting the sensitivity to medium - if that doesn’t work, then go nuclear. Publish an MQTT get request every hour via automation to make sure the devices are always ready to respond.

Thanks,

Since getting the great advice to split the zigbee2MQTT of 60 devices up into 2 zigbee2MQTT the 23 months of zigbee hell has ended!

Which means if I am not re-pairing 10% of devices a day, I can start focusing on actually getting devices to do things, like well automations, amazing what you can do when devices stay on the network and we’ll work! :slight_smile:

I turned up to medium and need to be careful as this sensor has picked up occupancy in the bedroom above the lounge.

Not sure how if set to low does not pick up occupancy, but pressing refresh it does report occupancy while still set to low.

But trying medium, see if that helps.

Also interesting that it was detecting occupancy on low consistently for a day or so then not later on.

But a gentle version of the ‘nuclear option’ every 12 hours should work as based on observed and reported behaviour.

Thanks for the ideas!

1 Like

Nah a get doesn’t do it.

but pressing the refresh button does, anyone know how to replicate that in a Home Assistant automation or mqqt action?

I think I have it.

Perform a xxxx/get with a payload of ‘occupancy’

That is is what the zigbee2MQTT interface seems to be sending

Will return if it works