homebridge-smartsystem 6.4.2 → 6.4.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.
- package/duotecno/master.js +7 -9
- package/duotecno/master.ts +5 -5
- package/package.json +1 -1
- package/server/powerbase.js +1 -1
- package/server/somfy.js +3 -2
- package/server/somfy.ts +2 -2
package/duotecno/master.js
CHANGED
|
@@ -412,7 +412,7 @@ class Master extends base_1.Base {
|
|
|
412
412
|
this.resolveLogin = null;
|
|
413
413
|
// if logged in, ask protocol version
|
|
414
414
|
if (this.isLoggedIn) {
|
|
415
|
-
this.send(protocol_1.Protocol.buildRequestNodeMgt(protocol_1.reqNodeAttributes.
|
|
415
|
+
this.send(protocol_1.Protocol.buildRequestNodeMgt(protocol_1.reqNodeAttributes.nodeVersion));
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
else {
|
|
@@ -434,16 +434,14 @@ class Master extends base_1.Base {
|
|
|
434
434
|
this.log("NodeMgtInfo - master " + this.getName() + " can be master: " + message[2]);
|
|
435
435
|
}
|
|
436
436
|
else if (message[1] === protocol_1.reqNodeAttributes.nodeVersion) {
|
|
437
|
-
console.log("*** -> " + message);
|
|
438
437
|
this.log("NodeMgtInfo - version " + this.getName() + ", version: " + message[2] + "." + message[3]);
|
|
439
438
|
this.version = message[2] * 100 + message[3];
|
|
440
|
-
|
|
441
|
-
this.protocol = message[2] * 100 + message[3];
|
|
439
|
+
console.log("*** version -> " + message + " -> " + this.version + " ***");
|
|
442
440
|
}
|
|
443
441
|
else if (message[1] === protocol_1.reqNodeAttributes.nodeProtocol) {
|
|
444
|
-
console.log("*** -> " + message);
|
|
445
442
|
this.log("NodeMgtInfo - protocol " + this.getName() + ", protocol: " + message[2] + "." + message[3]);
|
|
446
443
|
this.protocol = message[2] * 100 + message[3];
|
|
444
|
+
console.log("*** protocol -> " + message + " -> " + this.protocol + " ***");
|
|
447
445
|
}
|
|
448
446
|
else {
|
|
449
447
|
this.err("dropped NodeMgtInfo info message = " + message[1] + ", message: " + message);
|
|
@@ -753,12 +751,12 @@ class Master extends base_1.Base {
|
|
|
753
751
|
}
|
|
754
752
|
requestRegisterValue(register) {
|
|
755
753
|
return __awaiter(this, void 0, void 0, function* () {
|
|
756
|
-
if (this.version >=
|
|
754
|
+
if (this.version >= 6609) {
|
|
757
755
|
yield this.send(protocol_1.Protocol.buildRegister(register));
|
|
758
756
|
this.info("request register: " + register);
|
|
759
757
|
}
|
|
760
758
|
else {
|
|
761
|
-
this.err("FC_REGISTERMAP not available before
|
|
759
|
+
this.err("FC_REGISTERMAP not available before firmware v66.09");
|
|
762
760
|
}
|
|
763
761
|
});
|
|
764
762
|
}
|
|
@@ -775,12 +773,12 @@ class Master extends base_1.Base {
|
|
|
775
773
|
}
|
|
776
774
|
setRegisterValue(register, value) {
|
|
777
775
|
return __awaiter(this, void 0, void 0, function* () {
|
|
778
|
-
if (this.version >=
|
|
776
|
+
if (this.version >= 6609) {
|
|
779
777
|
yield this.send(protocol_1.Protocol.buildRegister(register, value));
|
|
780
778
|
this.info("set register: " + register + ", to: " + value);
|
|
781
779
|
}
|
|
782
780
|
else {
|
|
783
|
-
this.err("FC_REGISTERMAP not available before
|
|
781
|
+
this.err("FC_REGISTERMAP not available before firmware v66.09");
|
|
784
782
|
}
|
|
785
783
|
});
|
|
786
784
|
}
|
package/duotecno/master.ts
CHANGED
|
@@ -459,7 +459,7 @@ export class Master extends Base {
|
|
|
459
459
|
|
|
460
460
|
// if logged in, ask protocol version
|
|
461
461
|
if (this.isLoggedIn) {
|
|
462
|
-
this.send(Protocol.buildRequestNodeMgt(reqNodeAttributes.
|
|
462
|
+
this.send(Protocol.buildRequestNodeMgt(reqNodeAttributes.nodeProtocol));
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
} else {
|
|
@@ -818,11 +818,11 @@ export class Master extends Base {
|
|
|
818
818
|
}
|
|
819
819
|
|
|
820
820
|
async requestRegisterValue(register: number) {
|
|
821
|
-
if (this.
|
|
821
|
+
if (this.protocol >= 209) {
|
|
822
822
|
await this.send(Protocol.buildRegister(register));
|
|
823
823
|
this.info("request register: " + register);
|
|
824
824
|
} else {
|
|
825
|
-
this.err("FC_REGISTERMAP not available before
|
|
825
|
+
this.err("FC_REGISTERMAP not available before protocol v2.09")
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
|
|
@@ -837,11 +837,11 @@ export class Master extends Base {
|
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
async setRegisterValue(register: number, value: number) {
|
|
840
|
-
if (this.
|
|
840
|
+
if (this.protocol >= 209) {
|
|
841
841
|
await this.send(Protocol.buildRegister(register, value));
|
|
842
842
|
this.info("set register: " + register + ", to: " + value);
|
|
843
843
|
} else {
|
|
844
|
-
this.err("FC_REGISTERMAP not available before
|
|
844
|
+
this.err("FC_REGISTERMAP not available before protocol v2.09")
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
847
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-smartsystem",
|
|
3
3
|
"displayname": "Duotecno Bridge",
|
|
4
|
-
"version": "6.4.
|
|
4
|
+
"version": "6.4.3",
|
|
5
5
|
"description": "SmartServer (Proxy Websockets to TCP sockets, Smappee MQTT, Duotecno IP Nodes, Homekit interface)",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": "Johan Coppieters",
|
package/server/powerbase.js
CHANGED
|
@@ -249,7 +249,7 @@ class PowerBase extends base_1.Base {
|
|
|
249
249
|
//
|
|
250
250
|
updateBindings() {
|
|
251
251
|
// sort on channel.
|
|
252
|
-
this.bindings.sort((a, b) =>
|
|
252
|
+
this.bindings.sort((a, b) => a.register - b.register);
|
|
253
253
|
// sanitize and copy all rules into the config
|
|
254
254
|
this.config.bindings = this.bindings.map(b => types_1.Sanitizers.bindingConfig(b));
|
|
255
255
|
(0, logger_1.debug)("power", "config.bindings = " + JSON.stringify(this.config.bindings));
|
package/server/somfy.js
CHANGED
|
@@ -171,8 +171,9 @@ setup().then(() => {
|
|
|
171
171
|
init = true;
|
|
172
172
|
busy = false;
|
|
173
173
|
}).catch((e) => {
|
|
174
|
-
(0, logger_1.debug)("somfy", "
|
|
175
|
-
(
|
|
174
|
+
(0, logger_1.debug)("somfy", "gpio package not initialized");
|
|
175
|
+
if (e.code != "EACCES")
|
|
176
|
+
(0, logger_1.debug)("somfy", e);
|
|
176
177
|
init = false;
|
|
177
178
|
busy = false;
|
|
178
179
|
});
|
package/server/somfy.ts
CHANGED
|
@@ -165,10 +165,10 @@ setup().then(() => {
|
|
|
165
165
|
debug("somfy", "gpio package initialized");
|
|
166
166
|
init = true;
|
|
167
167
|
busy = false;
|
|
168
|
-
|
|
168
|
+
|
|
169
169
|
}).catch((e) => {
|
|
170
170
|
debug("somfy", "gpio package not initialized");
|
|
171
|
-
if (e.code != "EACCES") debug("somfy", e);
|
|
171
|
+
if ((e.code != "EACCES") && (e.code != "ENOENT")) debug("somfy", e);
|
|
172
172
|
init = false;
|
|
173
173
|
busy = false;
|
|
174
174
|
});
|