mirror of
https://github.com/koush/scrypted.git
synced 2026-02-03 06:03:27 +00:00
ring: update webrtc stream endpoint, start phasing out rtsp stream
This commit is contained in:
2
external/ring-client-api
vendored
2
external/ring-client-api
vendored
Submodule external/ring-client-api updated: 4e95093f76...3db4127b58
4
plugins/ring/package-lock.json
generated
4
plugins/ring/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/ring",
|
||||
"version": "0.0.133",
|
||||
"version": "0.0.135",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/ring",
|
||||
"version": "0.0.133",
|
||||
"version": "0.0.135",
|
||||
"dependencies": {
|
||||
"@koush/ring-client-api": "file:../../external/ring-client-api",
|
||||
"@scrypted/common": "file:../../common",
|
||||
|
||||
@@ -44,5 +44,5 @@
|
||||
"got": "11.8.6",
|
||||
"socket.io-client": "^2.5.0"
|
||||
},
|
||||
"version": "0.0.133"
|
||||
"version": "0.0.135"
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class RingLight extends ScryptedDeviceBase implements Battery, TamperSensor, Mot
|
||||
}
|
||||
|
||||
private isBeamDevice() {
|
||||
return [RingDeviceType.BeamsMultiLevelSwitch, RingDeviceType.BeamsSwitch, RingDeviceType.BeamsTransformerSwitch].includes(this.device.deviceType);
|
||||
return [RingDeviceType.BeamsMultiLevelSwitch, RingDeviceType.BeamsSwitch, RingDeviceType.BeamsTransformerSwitch].includes(this.device.deviceType);
|
||||
}
|
||||
|
||||
updateState(data: RingDeviceData) {
|
||||
@@ -80,7 +80,7 @@ class RingLight extends ScryptedDeviceBase implements Battery, TamperSensor, Mot
|
||||
return this.device.setInfo({ device: { v1: { on: false } } });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
turnOn(): Promise<void> {
|
||||
if (this.isBeamDevice()) {
|
||||
this.device.sendCommand('light-mode.set', { lightMode: 'on' });
|
||||
@@ -118,7 +118,7 @@ class RingSwitch extends ScryptedDeviceBase implements OnOff {
|
||||
turnOff(): Promise<void> {
|
||||
return this.device.setInfo({ device: { v1: { on: false } } });
|
||||
}
|
||||
|
||||
|
||||
turnOn(): Promise<void> {
|
||||
return this.device.setInfo({ device: { v1: { on: true } } });
|
||||
}
|
||||
@@ -162,7 +162,7 @@ export class RingLocationDevice extends ScryptedDeviceBase implements DeviceProv
|
||||
this.location = location;
|
||||
|
||||
this.location.onLocationMode.subscribe(mode => this.updateLocationMode(mode));
|
||||
|
||||
|
||||
// if the location has a base station, updates when arming/disarming are not sent to the `onLocationMode` subscription
|
||||
// instead we subscribe to the security panel, which is updated during arming actions
|
||||
this.location.getSecurityPanel().then(panel => {
|
||||
@@ -193,8 +193,9 @@ export class RingLocationDevice extends ScryptedDeviceBase implements DeviceProv
|
||||
ScryptedInterface.RTCSignalingChannel,
|
||||
];
|
||||
if (!camera.isRingEdgeEnabled) {
|
||||
if (this.plugin.settingsStorage.values.legacyRtspStream)
|
||||
interfaces.push(ScryptedInterface.VideoCamera);
|
||||
interfaces.push(
|
||||
ScryptedInterface.VideoCamera,
|
||||
ScryptedInterface.Intercom,
|
||||
ScryptedInterface.VideoClips,
|
||||
);
|
||||
@@ -237,7 +238,7 @@ export class RingLocationDevice extends ScryptedDeviceBase implements DeviceProv
|
||||
|
||||
switch (data.deviceType) {
|
||||
case RingDeviceType.ContactSensor:
|
||||
case RingDeviceType.RetrofitZone:
|
||||
case RingDeviceType.RetrofitZone:
|
||||
case RingDeviceType.TiltSensor:
|
||||
case RingDeviceType.GlassbreakSensor:
|
||||
nativeId = locationDevice.id.toString() + '-sensor';
|
||||
@@ -346,7 +347,7 @@ export class RingLocationDevice extends ScryptedDeviceBase implements DeviceProv
|
||||
return this.devices.get(nativeId);
|
||||
}
|
||||
|
||||
async releaseDevice(id: string, nativeId: string): Promise<void> {}
|
||||
async releaseDevice(id: string, nativeId: string): Promise<void> { }
|
||||
|
||||
updateLocationMode(locationMode: LocationMode) {
|
||||
let mode: SecuritySystemMode;
|
||||
|
||||
@@ -84,6 +84,12 @@ class RingPlugin extends ScryptedDeviceBase implements DeviceProvider, Settings
|
||||
],
|
||||
defaultValue: 'Disabled',
|
||||
},
|
||||
legacyRtspStream: {
|
||||
title: 'Legacy RTSP Streaming',
|
||||
description: 'Enable legacy RTSP Stream support. No longer supported and is being phased out by Ring.',
|
||||
type: 'boolean',
|
||||
persistedDefaultValue: true,
|
||||
},
|
||||
});
|
||||
|
||||
constructor() {
|
||||
|
||||
Reference in New Issue
Block a user