hoffmation-base 3.2.3-alpha.2 → 3.2.3-alpha.3
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.
|
@@ -22,10 +22,18 @@ class OwnUnifiDoor extends DoorDevice_1.DoorDevice {
|
|
|
22
22
|
// Nothing
|
|
23
23
|
}
|
|
24
24
|
checkForDingUpdate(packet) {
|
|
25
|
+
var _a;
|
|
25
26
|
switch (packet.event) {
|
|
26
27
|
case 'access.data.device.remote_unlock':
|
|
27
28
|
this.log(enums_1.LogLevel.Debug, `Device ${this.unifiDeviceName} was unlocked`);
|
|
28
29
|
return;
|
|
30
|
+
case 'access.logs.add':
|
|
31
|
+
const event = packet.data;
|
|
32
|
+
if (((_a = event._source.authentication) === null || _a === void 0 ? void 0 : _a.credential_provider) === 'BUTTON_DOOR_BELL' &&
|
|
33
|
+
event._source.event.type === 'access.door.unlock') {
|
|
34
|
+
this.onNewDingActiveValue(true);
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
29
37
|
case 'access.remote_view':
|
|
30
38
|
const ringEvent = packet.data;
|
|
31
39
|
this._lastDoorbellRingRequestId = ringEvent.request_id;
|
|
@@ -62,9 +62,9 @@ class UnifiAccess {
|
|
|
62
62
|
case 'nvr':
|
|
63
63
|
break;
|
|
64
64
|
default:
|
|
65
|
+
// this.unifiLogger.debug(`onMessage: ${JSON.stringify(packet)}`);
|
|
65
66
|
// Lookup the device.
|
|
66
|
-
const
|
|
67
|
-
const ownName = this._idMap.get(id);
|
|
67
|
+
const ownName = this._idMap.get(packet.event_object_id);
|
|
68
68
|
if (!ownName) {
|
|
69
69
|
break;
|
|
70
70
|
}
|
|
@@ -87,7 +87,7 @@ class UnifiAccess {
|
|
|
87
87
|
}
|
|
88
88
|
const door = UnifiAccess.ownDoors.get(data.alias);
|
|
89
89
|
door.initialize(data);
|
|
90
|
-
logging_1.ServerLogService.writeLog(enums_1.LogLevel.Info, `Unifi-Access: ${data.name} (re)initialized`);
|
|
90
|
+
logging_1.ServerLogService.writeLog(enums_1.LogLevel.Info, `Unifi-Access: ${data.name} (re)initialized with unique_id: ${data.unique_id}`);
|
|
91
91
|
this._idMap.set(data.unique_id, data.alias);
|
|
92
92
|
}
|
|
93
93
|
}
|