Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ring alarm api #14

Closed
wants to merge 12 commits into from
Closed

feat: ring alarm api #14

wants to merge 12 commits into from

Conversation

dgreif
Copy link

@dgreif dgreif commented Oct 31, 2018

Ring Alarm

  • Get alarms from all ring locations
  • Get devices for each alarm
  • Arm/disarm alarm with optional bypass of specific sensors
  • Subscribe to data updates on individual devices
  • Change volume on base station and keypad
  • Flattened data structure for returned device data. Original format from ring is cumbersome to interact with

Other Enhancements

  • Editorconfig consisten with existing code style
  • Re-fetching of auth token if it appears to have expired
  • OAuth requests using Bearer token auth header
  • Retrying api calls if the endpoint is unreachable (for cases where internet connection is interrupted)
  • Typescript .d.ts file added. Currently only contains types for my alarm additions

Closes #8

Sorry for the long delay on this, haven't had much free time lately. Looks like @mrose17 has a different implementation based on doorbot over at https://github.com/homespun/ring-alarm now. Personally, I think your base library setup is cleaner and more modern so I think it's still worth adding alarm functionality here. For anyone interested in a homebridge plugin, I have one ready to go that I will be publishing in the next couple days (probably waiting until this PR is merged).

@mrose17
Copy link

mrose17 commented Oct 31, 2018

@dgreif - thanks for the reply! i was planning on writing a ring alarm homebridge plugin during november, but now i don't have too!

@dgreif
Copy link
Author

dgreif commented Nov 1, 2018

@mrose17 I've published homebridge-ring-alarm using my fork of the api for now. It's my first attempt at a homebridge plugin so any feedback/issues/PRs are appreciated!

The ring api does not appear to use an always-consistent data store.
Without a delay here, the `connections` endpoint (and presumably others)
will occasionally return a 404 error.
If an alarm base station is offline, on cellular backup, or updating
firmware, the `connections` endpoint returns an error code.  When that
happens, we will just try again in 20 seconds.

Removing auth token delays because they weren't actually necessary
(thought they might be the cause of the 404 errors)
@psifertex
Copy link

Been a while with no updates. Anything blocking a merge on this?

@jogibear9988
Copy link

@jimhigson could you merge please?

@dgreif
Copy link
Author

dgreif commented Jan 2, 2019

I've been using my repo in https://github.com/dgreif/homebridge-ring-alarm for 2 months with no issues. Should be ready to merge any time @jimhigson

@dgreif
Copy link
Author

dgreif commented Feb 9, 2019

Since @jimhigson is unresponsive, I decided to just pull the ring alarm into it's own repo. I've got a new repo that houses both the alarm api and the homebridge-ring-alarm plugin at https://github.com/dgreif/ring-alarm.

@dgreif dgreif closed this Feb 9, 2019
@joeyeng
Copy link

joeyeng commented Feb 16, 2019

Wow, great work on this @dgreif! I used this to update my ip cams home/away mode (Blue Iris) based on the Ring alarm mode and it's working flawlessly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants