homebridge-ring 13.0.1 → 13.1.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 +13 -0
- package/README.md +2 -0
- package/lib/ring-platform.js +3 -0
- package/lib/valve.js +35 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# homebridge-ring
|
|
2
2
|
|
|
3
|
+
## 13.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1a1ee4b`](https://github.com/dgreif/ring/commit/1a1ee4b7fe44ead78577ff22d2d13b9133c9737b) Thanks [@dgreif](https://github.com/dgreif)! - Add support for water valves. Note, these have not been tested extensively so please let us know if you run into issues.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [`2f5d646`](https://github.com/dgreif/ring/commit/2f5d646471abcae2e20a3929aab44e292e67d9ab) Thanks [@dgreif](https://github.com/dgreif)! - Update dependencies
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`1a1ee4b`](https://github.com/dgreif/ring/commit/1a1ee4b7fe44ead78577ff22d2d13b9133c9737b), [`2f5d646`](https://github.com/dgreif/ring/commit/2f5d646471abcae2e20a3929aab44e292e67d9ab)]:
|
|
14
|
+
- ring-client-api@13.1.0
|
|
15
|
+
|
|
3
16
|
## 13.0.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -209,6 +209,8 @@ Note: Although homebridge has support for HomeKit Secure Video (HKSV), I will no
|
|
|
209
209
|
- Set Thermostat mode to heat/cool/off
|
|
210
210
|
- Set target temperature
|
|
211
211
|
- View current temperature and heating/cooling status
|
|
212
|
+
- Water Valves (**untested**)
|
|
213
|
+
- Open/Close the valve
|
|
212
214
|
|
|
213
215
|
### Chimes
|
|
214
216
|
|
package/lib/ring-platform.js
CHANGED
|
@@ -30,6 +30,7 @@ const thermostat_1 = require("./thermostat");
|
|
|
30
30
|
const unknown_zwave_switch_1 = require("./unknown-zwave-switch");
|
|
31
31
|
const util_2 = require("./util");
|
|
32
32
|
const intercom_1 = require("./intercom");
|
|
33
|
+
const valve_1 = require("./valve");
|
|
33
34
|
const ignoreHiddenDeviceTypes = [
|
|
34
35
|
ring_client_api_1.RingDeviceType.RingNetAdapter,
|
|
35
36
|
ring_client_api_1.RingDeviceType.ZigbeeAdapter,
|
|
@@ -95,6 +96,8 @@ function getAccessoryClass(device) {
|
|
|
95
96
|
return water_sensor_1.WaterSensor;
|
|
96
97
|
case ring_client_api_1.RingDeviceType.Thermostat:
|
|
97
98
|
return thermostat_1.Thermostat;
|
|
99
|
+
case ring_client_api_1.RingDeviceType.WaterValve:
|
|
100
|
+
return valve_1.Valve;
|
|
98
101
|
case ring_client_api_1.RingDeviceType.UnknownZWave:
|
|
99
102
|
return unknown_zwave_switch_1.UnknownZWaveSwitchSwitch;
|
|
100
103
|
}
|
package/lib/valve.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Valve = void 0;
|
|
4
|
+
const base_device_accessory_1 = require("./base-device-accessory");
|
|
5
|
+
const hap_1 = require("./hap");
|
|
6
|
+
const util_1 = require("ring-client-api/util");
|
|
7
|
+
class Valve extends base_device_accessory_1.BaseDeviceAccessory {
|
|
8
|
+
constructor(device, accessory, config) {
|
|
9
|
+
super();
|
|
10
|
+
this.device = device;
|
|
11
|
+
this.accessory = accessory;
|
|
12
|
+
this.config = config;
|
|
13
|
+
const { Characteristic, Service } = hap_1.hap;
|
|
14
|
+
this.registerCharacteristic({
|
|
15
|
+
characteristicType: Characteristic.On,
|
|
16
|
+
serviceType: Service.Switch,
|
|
17
|
+
getValue: (data) => this.isOpen(data.valveState),
|
|
18
|
+
setValue: (value) => this.setOnState(value),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
isOpen(status) {
|
|
22
|
+
if (status === 'open') {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
setOnState(on) {
|
|
28
|
+
(0, util_1.logInfo)(`Turning ${this.device.name} ${on ? 'On' : 'Off'}`);
|
|
29
|
+
if (on) {
|
|
30
|
+
return this.device.sendCommand('valve.open');
|
|
31
|
+
}
|
|
32
|
+
return this.device.sendCommand('valve.close');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.Valve = Valve;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-ring",
|
|
3
3
|
"displayName": "Ring",
|
|
4
|
-
"version": "13.0
|
|
4
|
+
"version": "13.1.0",
|
|
5
5
|
"description": "Homebridge plugin for Ring doorbells, cameras, security alarm system and smart lighting",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@homebridge/camera-utils": "^2.2.6",
|
|
16
16
|
"@homebridge/plugin-ui-utils": "^1.0.3",
|
|
17
|
-
"ring-client-api": "13.0
|
|
17
|
+
"ring-client-api": "13.1.0",
|
|
18
18
|
"werift": "0.19.4"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"homebridge": "1.8.4",
|
|
24
24
|
"nodemon": "^3.1.4",
|
|
25
25
|
"tsconfig": "*",
|
|
26
|
-
"typescript": "5.5.
|
|
26
|
+
"typescript": "5.5.4"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": "^18 || ^20",
|