Koenkk / zigbee-herdsman-converters

Collection of device converters to be used with zigbee-herdsman
MIT License
860 stars 2.84k forks source link

SONOFF SNZB-03: Change occupancy to ZoneStatusChange #6816

Open ykorzikowski opened 6 months ago

ykorzikowski commented 6 months ago

Thanks to https://github.com/Koenkk/zigbee2mqtt/issues/4874#issuecomment-812484150 I figured out, how to use the SNZB-03 properly.

The occupancy property is not reporting occupancy, but the ZoneStatusChange property does. Tested with Zigbee2Tasmota.

Zigbee2Tasmota + Mosquito + A self-made, lightweight python script for home automation proofed this sensors are working for arround 1 week now.

Screeenshot from MQTT Explorer.

Screenshot 2024-01-03 at 01 04 42

Today I was testing zigbee2mqtt, but it only provides the occupancy property. I checked the source code and found the place which need a change, but as I am not familiar with the project structure.

https://github.com/Koenkk/zigbee-herdsman-converters/blob/cf8c6ba2ad67bdbe5bbde31a3e3d190332ba5f3a/src/devices/sonoff.ts#L224C25-L224C25

I will stick with Zigbee2Tasmota for now, as it meets the KISS standard for me :)

Koenkk commented 6 months ago

Could you provide the debug log when occupancy is triggered on the SNZB-03?

marcorogo commented 4 months ago

I confirm that there is an issue with the integration of the SNZB-03 sensor. I have been using these sensors for more than 2 years, integrating them with Homey, and I have never received a false positive state. For a few days now, I have integrated them into the zigbee2mqtt network, and I am receiving many false positives. I also conducted another test and reintegrated the sensors into Homey's zigbee network, and they are working perfectly.