homebridge-smartsystem 7.1.4 → 7.1.5
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/server/smartapp.js +3 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-smartsystem",
|
|
3
3
|
"displayname": "Duotecno Bridge",
|
|
4
|
-
"version": "7.1.
|
|
4
|
+
"version": "7.1.5",
|
|
5
5
|
"description": "SmartServer (Proxy TCP sockets to the cloud, Smappee MQTT, Duotecno IP Nodes, Homekit interface)",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": "Johan Coppieters",
|
package/server/smartapp.js
CHANGED
|
@@ -760,7 +760,6 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
760
760
|
//////////////////////
|
|
761
761
|
sendDeviceList(ws) {
|
|
762
762
|
const devices = this.getDeviceList();
|
|
763
|
-
console.log("Sending device list to WebSocket client: " + JSON.stringify(devices));
|
|
764
763
|
if (ws.readyState === WebSocket.OPEN) {
|
|
765
764
|
(0, logger_1.debug)("smartapp", devices);
|
|
766
765
|
ws.send(JSON.stringify(devices));
|
|
@@ -831,7 +830,7 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
831
830
|
const channels = channel.split('+').map(c => parseInt(c.trim()));
|
|
832
831
|
let totalPower = 0;
|
|
833
832
|
for (const ch of channels) {
|
|
834
|
-
const binding = this.power.smappee.bindings.find(b => b.channel
|
|
833
|
+
const binding = this.power.smappee.bindings.find(b => b.channel === ch.toString());
|
|
835
834
|
if (binding && binding.value !== undefined) {
|
|
836
835
|
totalPower += binding.value;
|
|
837
836
|
}
|
|
@@ -848,7 +847,7 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
848
847
|
return null;
|
|
849
848
|
try {
|
|
850
849
|
// P1 meter typically has single power value
|
|
851
|
-
const binding = this.power.p1.bindings.find(b => b.channel
|
|
850
|
+
const binding = this.power.p1.bindings.find(b => b.channel === channel);
|
|
852
851
|
if (binding && binding.value !== undefined) {
|
|
853
852
|
return binding.value;
|
|
854
853
|
}
|
|
@@ -867,7 +866,7 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
867
866
|
const channels = channel.split('+').map(c => parseInt(c.trim()));
|
|
868
867
|
let totalPower = 0;
|
|
869
868
|
for (const ch of channels) {
|
|
870
|
-
const binding = this.power.shelly.bindings.find(b => b.channel
|
|
869
|
+
const binding = this.power.shelly.bindings.find(b => b.channel === ch.toString());
|
|
871
870
|
if (binding && binding.value !== undefined) {
|
|
872
871
|
totalPower += binding.value;
|
|
873
872
|
}
|