-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
locationIds
option to filter alarms
- Loading branch information
Showing
5 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,20 @@ This is TypeScript api for the [Ring Alarm System](https://shop.ring.com/pages/s | |
```js | ||
import { getAlarms } from '@dgreif/ring-alarm' | ||
|
||
const alarms = await getAlarms(); | ||
const alarms = await getAlarms({ | ||
email: '[email protected]', | ||
password: 'abc123!#', | ||
locationIds: ['488e4800-fcde-4493-969b-d1a06f683102', '4bbed7a7-06df-4f18-b3af-291c89854d60'] // OPTIONAL. See below for details | ||
}); | ||
``` | ||
`alarms` will be an array of alarms based on the locations you have set | ||
up in Ring. Each location has it's own alarm that can be armed or disarmed, | ||
and used to interact with alarm devices in that location. | ||
|
||
`locationIds` is an optional parameter that allows you to limit the alarm results to a specific set of locations. | ||
This is mainly useful for the [homebridge-ring-alarm Plugin](./homebridge), but can also be used if you only care about | ||
listening for events at a subset of your locations and don't want to create websocket connections to _all_ of your base | ||
stations. If this option is not included, all alarm locations will be returned. | ||
## Arming/Disarming Alarms | ||
```js | ||
const alarm = alarms[0] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,12 +24,17 @@ This [Homebridge](https://github.com/nfarina/homebridge) plugin provides a platf | |
{ | ||
"platform": "RingAlarm", | ||
"email": "[email protected]", | ||
"password": "abc123!#" | ||
"password": "abc123!#", | ||
"locationIds": ["488e4800-fcde-4493-969b-d1a06f683102", "4bbed7a7-06df-4f18-b3af-291c89854d60"] // OPTIONAL. See below for details | ||
} | ||
] | ||
} | ||
``` | ||
|
||
`locationIds` is an optional parameter that allows you to limit the alarm results to a specific set of locations. | ||
Use this option if you only want a subset of your alarms to appear in HomeKit. If this option is not included, | ||
all of your alarms will be added to HomeKit (which is what most users will want to do). | ||
|
||
### Supported Devices | ||
* Security Panel | ||
* This is a software device that represents the alarm for a Ring location | ||
|
@@ -50,6 +55,10 @@ This [Homebridge](https://github.com/nfarina/homebridge) plugin provides a platf | |
* Detect motion | ||
* Tamper status | ||
* Battery status | ||
* Smoke Alarm | ||
* Carbon Monoxide Alarm | ||
* Smoke/Carbon Monoxide Listener | ||
* Smart Locks | ||
|
||
### Alarm Modes | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters