Skip to content

Commit 9e0af1b

Browse files
Merge pull request #638 from martin-genzel/dev
Add preset support for T8423
2 parents 479b6e2 + 03514e3 commit 9e0af1b

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

src/http/device.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,12 @@ export class Device extends TypedEmitter<DeviceEvents> {
12041204
return false;
12051205
}
12061206

1207+
static isFloodLightT8423(type: number): boolean {
1208+
if (type == DeviceType.FLOODLIGHT_CAMERA_8423)
1209+
return true;
1210+
return false;
1211+
}
1212+
12071213
static isFloodLightT8425(type: number): boolean {
12081214
if (type == DeviceType.FLOODLIGHT_CAMERA_8425)
12091215
return true;
@@ -1586,6 +1592,10 @@ export class Device extends TypedEmitter<DeviceEvents> {
15861592
return Device.isFloodLightT8420X(this.rawDevice.device_type, this.rawDevice.device_sn);
15871593
}
15881594

1595+
public isFloodLightT8423(): boolean {
1596+
return Device.isFloodLightT8423(this.rawDevice.device_type);
1597+
}
1598+
15891599
public isFloodLightT8425(): boolean {
15901600
return Device.isFloodLightT8425(this.rawDevice.device_type);
15911601
}

src/http/station.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10765,7 +10765,7 @@ export class Station extends TypedEmitter<StationEvents> {
1076510765
}
1076610766

1076710767
rootHTTPLogger.debug(`Station preset position - sending command`, { stationSN: this.getSerial(), deviceSN: device.getSerial(), preset: PresetPositionType[position] });
10768-
if (device.isFloodLightT8425() || device.isIndoorPanAndTiltCameraS350() || device.isOutdoorPanAndTiltCamera()) {
10768+
if (device.isFloodLightT8425() || device.isIndoorPanAndTiltCameraS350() || device.isOutdoorPanAndTiltCamera() || device.isFloodLightT8423()) {
1076910769
this.p2pSession.sendCommandWithStringPayload({
1077010770
commandType: CommandType.CMD_DOORBELL_SET_PAYLOAD,
1077110771
value: JSON.stringify({
@@ -10797,7 +10797,7 @@ export class Station extends TypedEmitter<StationEvents> {
1079710797
}
1079810798

1079910799
rootHTTPLogger.debug(`Station save preset position - sending command`, { stationSN: this.getSerial(), deviceSN: device.getSerial(), preset: PresetPositionType[position] });
10800-
if (device.isFloodLightT8425() || device.isIndoorPanAndTiltCameraS350() || device.isOutdoorPanAndTiltCamera()) {
10800+
if (device.isFloodLightT8425() || device.isIndoorPanAndTiltCameraS350() || device.isOutdoorPanAndTiltCamera() || device.isFloodLightT8423()) {
1080110801
this.p2pSession.sendCommandWithStringPayload({
1080210802
commandType: CommandType.CMD_DOORBELL_SET_PAYLOAD,
1080310803
value: JSON.stringify({
@@ -10829,7 +10829,7 @@ export class Station extends TypedEmitter<StationEvents> {
1082910829
}
1083010830

1083110831
rootHTTPLogger.debug(`Station delete preset position - sending command`, { stationSN: this.getSerial(), deviceSN: device.getSerial(), preset: PresetPositionType[position] });
10832-
if (device.isFloodLightT8425() || device.isIndoorPanAndTiltCameraS350() || device.isOutdoorPanAndTiltCamera()) {
10832+
if (device.isFloodLightT8425() || device.isIndoorPanAndTiltCameraS350() || device.isOutdoorPanAndTiltCamera() || device.isFloodLightT8423()) {
1083310833
this.p2pSession.sendCommandWithStringPayload({
1083410834
commandType: CommandType.CMD_DOORBELL_SET_PAYLOAD,
1083510835
value: JSON.stringify({

src/http/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9617,6 +9617,9 @@ export const DeviceCommands: Commands = {
96179617
CommandName.DeviceStartTalkback,
96189618
CommandName.DeviceStopTalkback,
96199619
CommandName.DeviceSnooze,
9620+
CommandName.DevicePresetPosition,
9621+
CommandName.DeviceSavePresetPosition,
9622+
CommandName.DeviceDeletePresetPosition,
96209623
],
96219624
[DeviceType.FLOODLIGHT_CAMERA_8424]: [
96229625
CommandName.DeviceStartLivestream,

0 commit comments

Comments
 (0)