persandstrom / python-verisure

A python module for reading and changing status of verisure devices through verisure app api.
MIT License
138 stars 42 forks source link

What's the arm state when triggered? #100

Open ptz0n opened 6 years ago

ptz0n commented 6 years ago

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:

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

ptz0n commented 6 years ago

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"
  ],
}
persandstrom commented 6 years ago

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 :)

SalkinDK commented 5 years ago

Did anybody found out what the state is when trigged?

And will the status be the same in homeassistant?

SalkinDK commented 5 years ago

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

xibriz commented 5 years ago

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..

SalkinDK commented 5 years ago

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

jacobhallgren commented 4 years ago

Would be implement the alarm state for fire, intrusion etc

niro1987 commented 1 year ago

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 commented 1 year ago

@persandstrom can you assign this to me?

persandstrom commented 1 year ago

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.

niro1987 commented 1 year ago

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 commented 1 year ago

event_log already implemented

niro1987 commented 1 year ago

@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

persandstrom commented 1 year ago

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

jesperrooth commented 11 months ago

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.

persandstrom commented 11 months ago

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