roleoroleo / yi-hack_ha_integration

Home Assistant custom integration for Yi cameras: yi-hack-MStar, yi-hack-Allwinner, yi-hack-Allwinner-v2, yi-hack-v5 and sonoff-hack
GNU General Public License v3.0
221 stars 32 forks source link

binary sensor for sound detection have at intervals of 10' #125

Closed ibratos closed 1 year ago

ibratos commented 1 year ago

Hi, I have detected that when there is sound that I activate it, it turns on for 1' (normal), then it returns to a clean state, but it does not activate again after 9', despite the persistence of the high sound level

Yi 1080p 9FUS Firm 12.2.x YiHack 0.3.3

Is it normal? Can we change interval?

roleoroleo commented 1 year ago

The cam sens only the "sound detection" event when the event is fired. It doesn't send the stop command. So, the integration set a 60 seconds off delay when it creates the binary sensor: self._off_delay = 60 And there is no feedback between ha and the cam.

I think that the 9 secs interval depends on the cam, and not on the integration. You could check this behavior reading the mqtt messages sent by the cam. Try with MQTT Explorer or with another client.

ibratos commented 1 year ago

I had check it, 10' interval comes from camera, with cloud service the interval was equal

roleoroleo commented 1 year ago

If 60 seconds is too much, I can set it to 10.