StyraHem / Homey.Sonoff.Zigbee

Sonoff Zigbee Devices
MIT License
1 stars 3 forks source link

Battery reporting not done regularly #7

Closed jrevillard closed 1 month ago

jrevillard commented 7 months ago

Hello everyone,

Great to see the new app for Sonoff devices. I have a lot of them: lots of DS01s on my doors and windows. The main problem with these devices is that they do not regularly report their battery status to Homey. It would be good to have an updated value every X hour(s) (maybe something to configure in the app).

The main problem is that I use the [Heimdall] (https://homey.app/fr-fr/app/com.uc.heimdall/Heimdall/) application, as I think many Homey users do. It has a very nice functionality to check devices that have not communicated with Homey in the last 24h and, of course, all my Sonoff devices are always in this case. The battery status would be a good reason to communicate with Homey maybe twice a day to report back a value.

Best regards, Jerome

hakana commented 7 months ago

How do you check devices without communication for the last 24 hours with the Heimdall app?

jrevillard commented 7 months ago

Hello @hakana ,

Internally, I guess that it checks if some value was reported. Certainly something equivalent to this: https://community.homey.app/t/a-script-to-check-sensor-last-update/63142

Best Jérôme

jrevillard commented 6 months ago

Any opinion on that @hakana ?

Best Jérôme

hakana commented 6 months ago

I tried Heimdall app but didn't find a way to use it to show status of Sonoff devices...

jrevillard commented 6 months ago

Would there be a way to "Cron" the battery reporting ?....I might have a look if I have time but I do not know very well the homey SDK....

hakana commented 6 months ago

It is not possible to connect the device when speeling. It sending the temperature regulary but not the battery status. What we do is to ask the device for battery status when it sending the temperature. There is not a way of getting the battery status in any other way as I know about. I will soon build a zigbee sniffer so I can see more in detail how the communication look like.

jrevillard commented 6 months ago

Ok, I was looking at something like this: https://apps.developer.homey.app/wireless/zigbee#attribute-reporting....

hakana commented 6 months ago

@jrevillard I have tried but the only thing that was working for me was to read the attribute when the device is active. Please let me know if you find a better solution.