dsc-itv2-client 1.0.16 → 1.0.17
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/package.json +1 -1
- package/src/ITV2Client.js +9 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsc-itv2-client",
|
|
3
3
|
"author": "fajitacat",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.17",
|
|
5
5
|
"description": "Reverse engineered DSC ITV2 Protocol Client Library for TL280R Communicator - Monitor and control DSC alarm panels",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"type": "module",
|
package/src/ITV2Client.js
CHANGED
|
@@ -486,6 +486,15 @@ export class ITV2Client extends EventEmitter {
|
|
|
486
486
|
if (this.handshakeState === 'SENT_OPEN_SESSION') {
|
|
487
487
|
// Panel accepted our OPEN_SESSION
|
|
488
488
|
this.handshakeState = 'WAITING_REQUEST_ACCESS';
|
|
489
|
+
} else if (this.handshakeState === 'SENT_REQUEST_ACCESS') {
|
|
490
|
+
// Panel accepted our REQUEST_ACCESS - session established!
|
|
491
|
+
this.handshakeState = 'ESTABLISHED';
|
|
492
|
+
this._logMinimal(`[Handshake] Session established (Type ${this.detectedEncryptionType} encryption)`);
|
|
493
|
+
this.emit('session:established', {
|
|
494
|
+
encryptionType: this.detectedEncryptionType,
|
|
495
|
+
sendKey: this.session.derivedSendKey?.toString('hex'),
|
|
496
|
+
recvKey: this.session.pendingReceiveKey?.toString('hex')
|
|
497
|
+
});
|
|
489
498
|
}
|
|
490
499
|
}
|
|
491
500
|
|