tchellomello / python-ring-doorbell

Python Ring Door Bell is a library written in Python 3 that exposes the Ring.com devices as Python objects.
GNU Lesser General Public License v3.0
543 stars 171 forks source link

FR: Add doorbot motion_snooze and chime do_not_disturb functions #87

Open shadowbq opened 6 years ago

shadowbq commented 6 years ago

Set a 3 hour chime 'do_not_disturb'..

POST https://api.ring.com/clients_api/chimes/123456/do_not_disturb HTTP/1.1
Host:   api.ring.com
Content-Type:   application/json
Accept: */*
Content-Length: 30
Connection: keep-alive
X-API-LANG: en
Hardware_Id:    <GUID>
User-Agent: ring/4.1.16 (iPhone; iOS 11.3; Scale/2.00)
Accept-Language:    en-US;q=1, es-ES;q=0.9
Authorization:  Bearer <TOKEN>
Accept-Encoding:    identity

{"api_version":"9","time":180}

Disable the motion snooze..

POST https://api.ring.com/clients_api/chimes/123456/do_not_disturb HTTP/1.1
Host:   api.ring.com
Content-Type:   application/json
Accept: */*
Content-Length: 19
Connection: keep-alive
X-API-LANG: en
Hardware_Id:    <GUID>
User-Agent: ring/4.1.16 (iPhone; iOS 11.3; Scale/2.00)
Accept-Language:    en-US;q=1, es-ES;q=0.9
Authorization:  Bearer <TOKEN>
Accept-Encoding:    identity
{
    "api_version": "9"
}

Set a 15 minute doorbell 'motion_snooze'..

POST https://api.ring.com/clients_api/doorbots/7654321/motion_snooze HTTP/1.1
Host:   api.ring.com
Content-Type:   application/json
Accept: */*
Content-Length: 29
Connection: keep-alive
X-API-LANG: en
Hardware_Id:    <GUID>
User-Agent: ring/4.1.16 (iPhone; iOS 11.3; Scale/2.00)
Accept-Language:    en-US;q=1, es-ES;q=0.9
Authorization:  Bearer <TOKEN>
Accept-Encoding:    identity
{
    "api_version": "9",
    "time": 15
}

Clear doorbell 'motion_snooze'..

POST https://api.ring.com/clients_api/doorbots/7654321/motion_snooze/clear HTTP/1.1
Host:   api.ring.com
Content-Type:   application/json
Accept: */*
Content-Length: 19
Connection: keep-alive
X-API-LANG: en
Hardware_Id:    <GUID>
User-Agent: ring/4.1.16 (iPhone; iOS 11.3; Scale/2.00)
Accept-Language:    en-US;q=1, es-ES;q=0.9
Authorization:  Bearer <TOKEN>
Accept-Encoding:    identity
{
    "api_version": "9"
}
msteenhu commented 5 years ago

I am trying to implement this: https://github.com/msteenhu/python-ring-doorbell/commit/288d384f98c02dcc4f09d04666c96a84f86d13b0

Didn't seem to work during first tests. Will debug/test further when I have time.

msteenhu commented 5 years ago

It works but i hoped to snooze motion alerts on the doorbell itself. Not possible apparently...

MoonScript commented 5 years ago

When I "Snooze Motion Alerts" for 15 minutes via the (iOS) app, does the current motion_snooze API only snooze alerts for only my own (iOS) device, but not for everyone? So if my wife also has the (iOS) app installed on her phone, she will still receive motion alerts during that 15 minute window?

Any ideas how to do a global snooze of motion detection on the doorbell, so no clients will get alerted, as @msteenhu mentioned earlier?

AlexAbraham1 commented 1 year ago

I created a PR for do not disturb https://github.com/tchellomello/python-ring-doorbell/pull/279

@MoonScript I think it should be possible to snooze all devices with what Ring describes as Global Snooze. I don't see the option on my Android app but maybe it's available on iPhone? Anyone know how to get the API URL for global snooze?

github-actions[bot] commented 3 months ago

There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs. Please make sure to update to the latest ring_doorbell version and check if that solves the issue. Thank you for your contributions.