homebridge-smartsystem 7.1.1 → 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/README.md CHANGED
@@ -325,6 +325,7 @@ Homebridge UI version
325
325
  ### v.7.1.x - jan 2026
326
326
  - 0: master + config ports in the proxy
327
327
  - 1: fix for reading the proxy config
328
+ - 2: missing port number in unique id for master port
328
329
 
329
330
  ## Hardware
330
331
  A Raspberry Pi that connects to a Duotecno IP Node
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-smartsystem",
3
3
  "displayname": "Duotecno Bridge",
4
- "version": "7.1.1",
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",
package/server/proxy.js CHANGED
@@ -129,8 +129,9 @@ function cleanStart(restart = false) {
129
129
  let connectionsStarted = 0;
130
130
  // Start connection for the master device if uniqueId is configured
131
131
  if (config.uniqueId && config.masterAddress) {
132
- log(`[PROXY] Starting proxy for master device: ${config.uniqueId}`);
133
- makeNewCloudConnection(config.masterAddress, config.masterPort, config.cloudServer, config.cloudPort, config.uniqueId);
132
+ const masterId = `${config.uniqueId}:${config.masterPort}`;
133
+ log(`[PROXY] Starting proxy for master device: ${masterId}`);
134
+ makeNewCloudConnection(config.masterAddress, config.masterPort, config.cloudServer, config.cloudPort, masterId);
134
135
  connectionsStarted++;
135
136
  }
136
137
  else if (config.uniqueId) {
@@ -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) {