ptz0n/homebridge-verisure

Alarm status not changing when alarm is triggered

redjoto opened this issue · 12 comments

Is it possible to make the alarm change status when it is triggered? I tried to trigger my alarm to see if I could use it in an automation (all lights full brightness), but nothing happened, it still had the «Away» state.

I can use the option «triggered» when I try to create the automation (see picture), so I guess it should be possible? Am I doing something wrong?
94BE395C-9A5D-48F9-9E92-26FC954F12F3

ptz0n commented

This have been up for discussion earlier. The latency directly tied to your polling interval. Would 30 seconds be fast enough for your use case?

This have been up for discussion earlier. The latency directly tied to your polling interval. Would 30 seconds be fast enough for your use case?

I understand. 30 seconds would be fast enough I guess. I can see that my polling interval is 60 seconds by default. Can I change this to 30 without any issues?

This have been up for discussion earlier. The latency directly tied to your polling interval. Would 30 seconds be fast enough for your use case?

Hi @ptz0n! Do you know if decreasing polling interval to 30 will have a large impact on battery drain?

Also, is polling done even without the HomeBridge plugin, or is the entire concept of polling introduced by the plugin? I am assuming that polling will fetch the state of all connected devices.
If I use the native Verisure app the fire alarm statuses (temperature + humidity) seem to update around once per hour. Does your plugin poll the devices even when the Home app is not active, effectively increasing polling from around once per hour to every 30 seconds?

I'd love to use 30 second polling interval but am concerned I'd drain my devices battery life too quickly. Any insights into this would be greatly appreciated!

Thanks so much!

ptz0n commented

Oh, sorry for not getting back earlier. I've not seen any issues with the polling interval affecting battery drain. Have you tested different intervals and spotted a difference in drain?

Hi @ptz0n! No, I haven't experimented with the interval because I was worried it may have an effect on the battery drain. Do you know if this would be the case, i.e. are the devices "sampled" more often if the interval is increased, potentially leading to far faster battery drain?

Also, do you know if even the default 60 second poll interval is higher than what would normally happen? Iirc. the Verisure app refreshes the temperature and humidity sensors around once an hour, so does merely having the plugin installed increase this 60-fold? And one more question -- in case the battery drain is increased, does it only happen when the Home app is active, or does the polling happen in the background at all times (by default once per minute)?

Thanks so much for insights into how this works!

ptz0n commented

Sorry, which battery are we referring to here? iOS device or Verisure devices?

Verisure devices battery is not affected by different polling intervals due to it's values are updated and stored on change. When polling, the current value is returned.

Hi @ptz0n! I am referring to the Verisure devices.

My point is that with the native Verisure app the device status (humidity, temperature etc.) seems to be updated once every hour or so, so I am assuming that the devices don't activate their transmitter more often than that (unless there's an emergency of some kind). Surely activating the transmitter every minute, or every 30 seconds, has to drain the device battery faster? If not I'm very happy, but I'd be very surprised if that was the case, no?

Thank you!

ptz0n commented

No, you don't have to worry about that.

It's not possible to trigger reading of new values all the way from each device. As you mentioned, temp and humidity sensors have their respective polling intervals. Door and window sensors send update upon state change etc.

All readings are done from the main transmitter and/or Verisure centralized storage using the API.

ptz0n commented

The plugin never communicate directly to the transceiver, we are using the REST API.

I've not been able to forcefully refresh the state using the web version myself. How do you do that?

I'm pretty sure that you cannot read new values for, for example, a smoke detector more frequent than every hour.

Hi @ptz0n and thank you again for the reply!

Oh I see, it's reads just the cached values then.
To force a refresh via the web pages, go to:
Climate (click the right arrow) -> Main view -> Refresh button (looks like arrows going in a circle)

Once it's pressed the web page refreshes the climate values, and the values will also be refreshed in the app.
I was initially worried that such a refresh would be happening every 30 seconds, thank you for clarifying!

ptz0n commented

I believe we can close this issue, as we're unable to subscribe to arm state updates. A webhook or frequently pollable endpoint provided by Verisure would be nice.