homebridge-smartsystem 7.1.2 → 7.1.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-smartsystem",
3
3
  "displayname": "Duotecno Bridge",
4
- "version": "7.1.2",
4
+ "version": "7.1.3",
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",
@@ -13,7 +13,9 @@
13
13
  "build": "npx tsc --build",
14
14
  "unpublish": "npm unpublish --force homebridge-smartsystem@6.8.17",
15
15
  "prepublishOnly": "npm run build",
16
- "to-publish": "npm publish"
16
+ "release:patch": "git add -A && git commit -m 'pre-release' --allow-empty && npm version patch && npm publish && git push && git push --tags",
17
+ "release:minor": "git add -A && git commit -m 'pre-release' --allow-empty && npm version minor && npm publish && git push && git push --tags",
18
+ "release:major": "git add -A && git commit -m 'pre-release' --allow-empty && npm version major && npm publish && git push && git push --tags"
17
19
  },
18
20
  "engines": {
19
21
  "node": "^18.20.4 || ^20.15.1 || ^22",
@@ -761,6 +761,7 @@ class SmartApp extends webapp_1.WebApp {
761
761
  sendDeviceList(ws) {
762
762
  const devices = this.getDeviceList();
763
763
  if (ws.readyState === WebSocket.OPEN) {
764
+ (0, logger_1.debug)("smartapp", devices);
764
765
  ws.send(JSON.stringify(devices));
765
766
  }
766
767
  }
@@ -883,18 +884,13 @@ class SmartApp extends webapp_1.WebApp {
883
884
  (0, logger_1.err)("smartapp", "WebSocket message must be an array");
884
885
  return;
885
886
  }
886
- // Empty array = keep-alive / poll
887
- if (data.length === 0) {
888
- this.sendDeviceList(ws);
889
- return;
890
- }
891
- // Process relay control commands
887
+ // Process relay control commands if any
892
888
  for (const cmd of data) {
893
889
  if (cmd.id && cmd.relay !== undefined) {
894
890
  yield this.setDeviceRelay(cmd.id, cmd.relay);
895
891
  }
896
892
  }
897
- // Send updated device list
893
+ // Send updated device list or if array was empty: keep-alive / poll
898
894
  this.sendDeviceList(ws);
899
895
  });
900
896
  }
@@ -921,8 +917,8 @@ class SmartApp extends webapp_1.WebApp {
921
917
  (0, logger_1.err)("smartapp", `Unit ${unit} in node ${node} not found`);
922
918
  return;
923
919
  }
924
- // Set the unit state (convert boolean to 0/100 for dimmer/switch)
925
- yield master.setUnitStatus(unitObj, state ? 100 : 0);
920
+ // Set the unit state
921
+ yield master.setUnitStatus(unitObj, state);
926
922
  });
927
923
  }
928
924
  setLink(inx, newstate, newvalue) {