MisterWil / abodepy

A thin Python wrapper for the Abode alarm API
MIT License
49 stars 17 forks source link

Time Settings and Gateway Sound Settings #1

Closed medic459 closed 6 years ago

medic459 commented 6 years ago

Any chance you've managed to get the api info for system settings? Specifically i'm trying to work it so that I can easily (via a script) turn off arming sounds in the morning so that I don't wake up anyone else.

I'd love to run a script that

  1. silences all sounds (door chimes, arming beeps)
  2. arms the system
  3. resets the sounds back to 'normal'

This way I can leave and arm the house with no one else waking up.

Thanks for what you've already done!

MisterWil commented 6 years ago

There's a new abodepy.set_setting(setting, value) method, or with the command line utility --setting setting=value.

The valid settings and their values are:

medic459 commented 6 years ago

Have you been able to express/view the individual device settings for a door/window chime? I can get the device settings via a GET of https://my.goabode.com/api/v1/devices/RF:00000000 [ { "id": "RF:00000000", "type_tag": "device_type.door_contact", "type": "Door Contact", "name": "Front Door", "area": "1", "zone": "1", "sort_order": "0", "is_window": "0", "bypass": "0", "schar_24hr": "0", "sresp_mode_0": "3", "sresp_entry_0": "3", "sresp_exit_0": "0", "sresp_mode_1": "1", "sresp_entry_1": "1", "sresp_exit_1": "0", "sresp_mode_2": "1", "sresp_entry_2": "1", "sresp_exit_2": "0", "sresp_mode_3": "1", "sresp_entry_3": "1", "sresp_exit_3": "0", "version": "", "origin": "abode", "has_subscription": null, "control_url": "", "deep_link": null, "status_color": "#5cb85c", "faults": { "low_battery": 0, "tempered": 0, "supervision": 0, "out_of_order": 0, "no_response": 0 }, "status": "Closed", "statuses": { "hvac_mode": null }, "status_ex": "", "actions": [], "status_icons": { "Open": "assets/icons/door-open-red.svg", "Closed": "assets/icons/door-closed-green.svg" }, "sresp_trigger": "0", "sresp_restore": "0", "icon": "assets/icons/doorsensor-a.svg" } ]

When I change the device to NOT chime when it's triggered, I do see the change: "sresp_mode_0": "0", "sresp_entry_0": "0", "sresp_exit_0": "0",

However, when I try to PUT the settings back to: "sresp_mode_0": "3", "sresp_entry_0": "3", "sresp_exit_0": "0", nothing happens.

Any ideas?

My goal here is to make an Alexa app that runs an AWS Lambda function that will let me leave in the morning without waking anyone up. I have most of the moving pieces working except for shutting off the chime. I'd also love to be able to silence the external siren but that seems to work independently of the gateway sound settings..

MisterWil commented 6 years ago

I'm not sure what the srep device values do. However, I did just notice that the siren has different put settings...

PUT /api/v1/siren
    action    "confirm"
    option    "0"

Where action can be "confirm", "tamper", and "entry". I'll need to include those...

MisterWil commented 6 years ago

Okay, I added settings for the siren where you can set the confirm, tamper, and entry sounds from indoor/outdoor external sirens to 0 for disabled and 1 for enabled. So to get what you want you probably want to do something like:

$ python abodepy.py --username USERNAME --password PASSWORD --setting beeper_mute=1 --setting entry=0 --setting confirm=0 --setting home_exit_delay=0

$ python abodepy.py --username USERNAME --password PASSWORD --arm home

$ python abodepy.py --username USERNAME --password PASSWORD --setting beeper_mute=0 --setting entry=1 --setting confirm=1 --setting home_exit_delay=X

Where X is your default home exit delay if you have one.