davglass / doorbot

Ring.com Doorbell API
Other
317 stars 55 forks source link

FR: Add doorbot motion_snooze and chime do_not_disturb functions #15

Closed shadowbq closed 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"
}
davglass commented 6 years ago

Published in doorbot@4.0.0. Methods are in the README.