homebridge-ring 11.1.0 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +153 -144
- package/config.schema.json +6 -6
- package/lib/api/ring-types.d.ts +11 -1
- package/lib/api/ring-types.js +3 -0
- package/lib/api/util.d.ts +2 -2
- package/lib/api/util.js +2 -2
- package/lib/homebridge/base-accessory.d.ts +1 -2
- package/lib/homebridge/base-accessory.js +3 -2
- package/lib/homebridge/base-data-accessory.d.ts +1 -2
- package/lib/homebridge/base-data-accessory.js +5 -6
- package/lib/homebridge/base-device-accessory.d.ts +1 -2
- package/lib/homebridge/beam.d.ts +2 -3
- package/lib/homebridge/beam.js +6 -5
- package/lib/homebridge/{base-station.d.ts → brightness-only.d.ts} +4 -4
- package/lib/homebridge/brightness-only.js +52 -0
- package/lib/homebridge/camera.d.ts +2 -3
- package/lib/homebridge/camera.js +6 -6
- package/lib/homebridge/chime.d.ts +2 -3
- package/lib/homebridge/chime.js +1 -2
- package/lib/homebridge/co-alarm.d.ts +2 -3
- package/lib/homebridge/co-alarm.js +1 -2
- package/lib/homebridge/config.d.ts +1 -1
- package/lib/homebridge/contact-sensor.d.ts +2 -3
- package/lib/homebridge/contact-sensor.js +1 -2
- package/lib/homebridge/fan.d.ts +2 -3
- package/lib/homebridge/fan.js +4 -4
- package/lib/homebridge/flood-freeze-sensor.d.ts +2 -3
- package/lib/homebridge/flood-freeze-sensor.js +4 -4
- package/lib/homebridge/freeze-sensor.d.ts +2 -3
- package/lib/homebridge/freeze-sensor.js +3 -3
- package/lib/homebridge/location-mode-switch.d.ts +2 -3
- package/lib/homebridge/location-mode-switch.js +4 -5
- package/lib/homebridge/lock.d.ts +2 -3
- package/lib/homebridge/lock.js +1 -2
- package/lib/homebridge/motion-sensor.d.ts +2 -3
- package/lib/homebridge/motion-sensor.js +1 -2
- package/lib/homebridge/multi-level-switch.d.ts +2 -3
- package/lib/homebridge/multi-level-switch.js +4 -4
- package/lib/homebridge/outlet.d.ts +2 -3
- package/lib/homebridge/outlet.js +3 -3
- package/lib/homebridge/panic-buttons.d.ts +2 -3
- package/lib/homebridge/panic-buttons.js +6 -6
- package/lib/homebridge/ring-platform.js +24 -25
- package/lib/homebridge/security-panel.d.ts +4 -4
- package/lib/homebridge/security-panel.js +14 -11
- package/lib/homebridge/smoke-alarm.d.ts +2 -3
- package/lib/homebridge/smoke-alarm.js +1 -2
- package/lib/homebridge/smoke-co-listener.d.ts +2 -3
- package/lib/homebridge/smoke-co-listener.js +1 -2
- package/lib/homebridge/switch.d.ts +2 -3
- package/lib/homebridge/switch.js +3 -3
- package/lib/homebridge/temperature-sensor.d.ts +2 -3
- package/lib/homebridge/temperature-sensor.js +1 -2
- package/lib/homebridge/thermostat.d.ts +2 -3
- package/lib/homebridge/thermostat.js +11 -11
- package/lib/homebridge/unknown-zwave-switch.d.ts +2 -3
- package/lib/homebridge/unknown-zwave-switch.js +3 -3
- package/lib/homebridge/water-sensor.d.ts +2 -3
- package/lib/homebridge/water-sensor.js +3 -3
- package/package.json +1 -1
- package/lib/homebridge/base-station.js +0 -14
- package/lib/homebridge/keypad.d.ts +0 -11
- package/lib/homebridge/keypad.js +0 -14
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UnknownZWaveSwitchSwitch = void 0;
|
|
4
4
|
const base_device_accessory_1 = require("./base-device-accessory");
|
|
5
5
|
const hap_1 = require("./hap");
|
|
6
|
+
const util_1 = require("../api/util");
|
|
6
7
|
class UnknownZWaveSwitchSwitch extends base_device_accessory_1.BaseDeviceAccessory {
|
|
7
|
-
constructor(device, accessory,
|
|
8
|
+
constructor(device, accessory, config) {
|
|
8
9
|
super();
|
|
9
10
|
this.device = device;
|
|
10
11
|
this.accessory = accessory;
|
|
11
|
-
this.logger = logger;
|
|
12
12
|
this.config = config;
|
|
13
13
|
const { Characteristic, Service } = hap_1.hap;
|
|
14
14
|
this.registerCharacteristic({
|
|
@@ -19,7 +19,7 @@ class UnknownZWaveSwitchSwitch extends base_device_accessory_1.BaseDeviceAccesso
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
setOnState(on) {
|
|
22
|
-
|
|
22
|
+
(0, util_1.logInfo)(`Turning ${this.device.name} ${on ? 'On' : 'Off'}`);
|
|
23
23
|
return this.device.setInfo({ device: { v1: { basicValue: on ? 255 : 0 } } });
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { BaseDeviceAccessory } from './base-device-accessory';
|
|
2
2
|
import { RingDevice } from '../api';
|
|
3
3
|
import { RingPlatformConfig } from './config';
|
|
4
|
-
import {
|
|
4
|
+
import { PlatformAccessory } from 'homebridge';
|
|
5
5
|
export declare class WaterSensor extends BaseDeviceAccessory {
|
|
6
6
|
readonly device: RingDevice;
|
|
7
7
|
readonly accessory: PlatformAccessory;
|
|
8
|
-
readonly logger: Logging;
|
|
9
8
|
readonly config: RingPlatformConfig;
|
|
10
|
-
constructor(device: RingDevice, accessory: PlatformAccessory,
|
|
9
|
+
constructor(device: RingDevice, accessory: PlatformAccessory, config: RingPlatformConfig);
|
|
11
10
|
}
|
|
@@ -4,12 +4,12 @@ exports.WaterSensor = void 0;
|
|
|
4
4
|
const base_device_accessory_1 = require("./base-device-accessory");
|
|
5
5
|
const hap_1 = require("./hap");
|
|
6
6
|
const operators_1 = require("rxjs/operators");
|
|
7
|
+
const util_1 = require("../api/util");
|
|
7
8
|
class WaterSensor extends base_device_accessory_1.BaseDeviceAccessory {
|
|
8
|
-
constructor(device, accessory,
|
|
9
|
+
constructor(device, accessory, config) {
|
|
9
10
|
super();
|
|
10
11
|
this.device = device;
|
|
11
12
|
this.accessory = accessory;
|
|
12
|
-
this.logger = logger;
|
|
13
13
|
this.config = config;
|
|
14
14
|
const { Characteristic: { LeakDetected }, } = hap_1.hap, leakService = this.getService(hap_1.hap.Service.LeakSensor), onWaterDetected = device.onData.pipe((0, operators_1.map)((data) => {
|
|
15
15
|
return data.faulted
|
|
@@ -25,7 +25,7 @@ class WaterSensor extends base_device_accessory_1.BaseDeviceAccessory {
|
|
|
25
25
|
onWaterDetected
|
|
26
26
|
.pipe((0, operators_1.filter)((faulted) => Boolean(faulted)))
|
|
27
27
|
.subscribe(() => {
|
|
28
|
-
|
|
28
|
+
(0, util_1.logInfo)(device.name + ' Detected Water');
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseStation = void 0;
|
|
4
|
-
const base_device_accessory_1 = require("./base-device-accessory");
|
|
5
|
-
class BaseStation extends base_device_accessory_1.BaseDeviceAccessory {
|
|
6
|
-
constructor(device, accessory, logger, config) {
|
|
7
|
-
super();
|
|
8
|
-
this.device = device;
|
|
9
|
-
this.accessory = accessory;
|
|
10
|
-
this.logger = logger;
|
|
11
|
-
this.config = config;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.BaseStation = BaseStation;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseDeviceAccessory } from './base-device-accessory';
|
|
2
|
-
import { RingDevice } from '../api';
|
|
3
|
-
import { RingPlatformConfig } from './config';
|
|
4
|
-
import { Logging, PlatformAccessory } from 'homebridge';
|
|
5
|
-
export declare class Keypad extends BaseDeviceAccessory {
|
|
6
|
-
readonly device: RingDevice;
|
|
7
|
-
readonly accessory: PlatformAccessory;
|
|
8
|
-
readonly logger: Logging;
|
|
9
|
-
readonly config: RingPlatformConfig;
|
|
10
|
-
constructor(device: RingDevice, accessory: PlatformAccessory, logger: Logging, config: RingPlatformConfig);
|
|
11
|
-
}
|
package/lib/homebridge/keypad.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Keypad = void 0;
|
|
4
|
-
const base_device_accessory_1 = require("./base-device-accessory");
|
|
5
|
-
class Keypad extends base_device_accessory_1.BaseDeviceAccessory {
|
|
6
|
-
constructor(device, accessory, logger, config) {
|
|
7
|
-
super();
|
|
8
|
-
this.device = device;
|
|
9
|
-
this.accessory = accessory;
|
|
10
|
-
this.logger = logger;
|
|
11
|
-
this.config = config;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.Keypad = Keypad;
|