python-verisure icon indicating copy to clipboard operation
python-verisure copied to clipboard

What's the arm state when triggered?

Open ptz0n opened this issue 6 years ago • 16 comments

Hi all, I'm working on an implementation of events when the alarm is triggered. Do you know what the value of statusType for armState might be in this case? Maybe you have a response body laying around where the state is "triggered"?

Currently, these are the known security system arm states:

  • ARMED_AWAY
  • ARMED_HOME
  • DISARMED

Maybe I just need to trigger my alarm when I get home to find this out myself 🚨.

ptz0n avatar Sep 13 '18 08:09 ptz0n

Looking at their client side application resources on verisure.se. I found the following declared states. Anyone of these that looks familiar to you?

{
  armDisarm: [
    "ARMED_AWAY" ,
    "DISARMED_FROM_ARMED_AWAY_HEADER",
    "ARMED_HOME",
    "DISARMED_FROM_ARMED_HOME"
  ],
  alarms: [
    "FIRE",
    "INTRUSION",
    "SOS",
    "WATER"
  ],
}

ptz0n avatar Sep 13 '18 09:09 ptz0n

Not really

for the arm state I have 'ARMED_HOME', 'ARMED_AWAY', 'DISARMED'.

In the history I can see some similar states as "alarms"

'ARM', 'DISARM', 'FIRE', 'INTRUSION',
'TECHNICAL', 'SOS', 'WARNING', 'LOCK',
'UNLOCK'

I think the only way to know is as you say to fire off your alarm :)

persandstrom avatar Sep 14 '18 18:09 persandstrom

Did anybody found out what the state is when trigged?

And will the status be the same in homeassistant?

SalkinDK avatar Mar 27 '19 16:03 SalkinDK

Same problem in homeassistant Short story i trigged my alarm and the homeassistant component didn't change state. :(

SalkinDK avatar Aug 13 '19 12:08 SalkinDK

It seems like the armState:statusType don't change but there is another attribute alarms that is added when the alarm is triggered.

Don't know if alarms is an attribute of armState or it is elsewhere..

xibriz avatar Aug 14 '19 06:08 xibriz

@xibriz @persandstrom And there is no way to implement this attribute to the component?

SalkinDK avatar Sep 18 '19 16:09 SalkinDK

Would be implement the alarm state for fire, intrusion etc

jacobhallgren avatar Jan 16 '20 13:01 jacobhallgren

This is an interesting idea, perhaps we can read the history and look for alarms there. Too bad the app doesn't notify you when an alarm is triggered.

niro1987 avatar Aug 22 '23 14:08 niro1987

@persandstrom can you assign this to me?

niro1987 avatar Aug 22 '23 14:08 niro1987

I believe that the easiest way to get quick notice if the alarm is triggered is to enable email notifications and use a system that can trigger on those. So far I have been unsuccessful in capturing the push notifications.

persandstrom avatar Aug 22 '23 19:08 persandstrom

push notifications

The funny thing is, that I get a push notification if the alarm is enabled/disabled and even if the front door is (un)locked, but I haven't seen one when the alarm is triggered.

niro1987 avatar Aug 22 '23 20:08 niro1987

event_log already implemented

niro1987 avatar Aug 22 '23 21:08 niro1987

@persandstrom I'm looking at changing the event_log query to allow the user to set the pagesize, offset and eventCategories. What I can't figure out is the cli part, how do I make a parameter optional such that --event-log 15 0 ALL would have the same effect as just --event-log

niro1987 avatar Aug 23 '23 08:08 niro1987

Probably possible but it might be hard (and messy), what do you think about adding a new method event_log_ex.

persandstrom avatar Aug 23 '23 17:08 persandstrom

Maybe it's a very stupid idea/workaround. But what about creating a rule to switch on a Verisure Smart Plug when the alarm goes off? The rule can be set up on the Verisure homepage and the state of the SmartPlug can be read in HA.

jesperrooth avatar Nov 22 '23 17:11 jesperrooth

I think that's a simple solution that does the trick

persandstrom avatar Nov 22 '23 17:11 persandstrom