homebridge-smartsystem 7.1.24 → 7.1.25

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/types.js CHANGED
@@ -168,7 +168,7 @@ var LinkType;
168
168
  LinkType["kNoType"] = "";
169
169
  LinkType["kAccessory"] = "accessory";
170
170
  })(LinkType = exports.LinkType || (exports.LinkType = {}));
171
- exports.kEmptyLink = Object.assign(Object.assign({}, exports.kEmptyUnit), { type: LinkType.kNoType, max: 100, min: 0, accName: "acc", accId: "", accService: [] });
171
+ exports.kEmptyLink = Object.assign(Object.assign({}, exports.kEmptyUnit), { type: LinkType.kNoType, max: 100, min: 0, nostop: "N", accName: "acc", accId: "", accService: [] });
172
172
  /////////////
173
173
  // Devices //
174
174
  /////////////
@@ -342,6 +342,7 @@ exports.Sanitizers = {
342
342
  link.type = aLink.type || exports.kEmptyLink.type;
343
343
  link.max = aLink.max || exports.kEmptyLink.max;
344
344
  link.min = aLink.min || exports.kEmptyLink.min;
345
+ link.nostop = aLink.nostop || exports.kEmptyLink.nostop;
345
346
  return link;
346
347
  },
347
348
  deviceConfig: function (aDevice) {
@@ -400,7 +401,8 @@ exports.Sanitizers = {
400
401
  return exports.Sanitizers.linkConfig({ name: aLink.name, unitName: aLink.unitName,
401
402
  masterAddress: aLink.masterAddress, masterPort: aLink.masterPort,
402
403
  logicalAddress: aLink.logicalAddress, logicalNodeAddress: aLink.logicalNodeAddress,
403
- accName: aLink.accName, accService: aLink.accService, accId: aLink.accId, type: aLink.type });
404
+ accName: aLink.accName, accService: aLink.accService, accId: aLink.accId, type: aLink.type,
405
+ max: aLink.max, min: aLink.min, nostop: aLink.nostop });
404
406
  },
405
407
  ruleConfig(rule) {
406
408
  rule = Object.assign({}, rule);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-smartsystem",
3
3
  "displayname": "Duotecno Bridge",
4
- "version": "7.1.24",
4
+ "version": "7.1.25",
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",
@@ -732,10 +732,15 @@ function SmartSocketInit(message){
732
732
  if (typeof hbValue != "undefined") {
733
733
  try {
734
734
  if (hbValue === -1) {
735
- (0, logger_1.log)("smartapp", "-> Virtual unit send 'stop' for accessory: " + link.accName + " of Duotecno unit: " + u.getDisplayName());
736
- const val = yield (0, HB_1.hbStop)(this.config.apiHost + ":" + this.config.apiPort, link.accId, link.accService, this.token);
737
- if (typeof val != "undefined")
738
- link.hbValue = val;
735
+ if (link.nostop === "Y") {
736
+ (0, logger_1.debug)("smartapp", "-> Not sending simulated 'stop' for accessory: " + link.accName + " of Duotecno unit: " + u.getDisplayName() + " (disabled)");
737
+ }
738
+ else {
739
+ (0, logger_1.log)("smartapp", "-> Virtual unit send 'stop' for accessory: " + link.accName + " of Duotecno unit: " + u.getDisplayName());
740
+ const val = yield (0, HB_1.hbStop)(this.config.apiHost + ":" + this.config.apiPort, link.accId, link.accService, this.token);
741
+ if (typeof val != "undefined")
742
+ link.hbValue = val;
743
+ }
739
744
  }
740
745
  else if (hbValue !== link.hbValue) {
741
746
  (0, logger_1.log)("smartapp", "-> Setting HB value for accessory: " + link.accName + " to " + hbValue + " of Duotecno unit: " + u.getDisplayName() + " with value " + u.value);
@@ -827,11 +832,13 @@ function SmartSocketInit(message){
827
832
  // max & min values
828
833
  const min = context.getParam({ name: "min", type: "integer", default: 0 });
829
834
  const max = context.getParam({ name: "max", type: "integer", default: 100 });
835
+ // don't forward the simulated 'stop' of an up/down link to the accessory
836
+ const nostop = context.getParam({ name: "nostop", type: "string", default: "N" });
830
837
  // uniqiue id for the accessory
831
838
  const accId = context.getParam({ name: "accId", type: "string", default: "" });
832
839
  const accName = (0, HB_1.hbName)(accId);
833
840
  const accService = (0, HB_1.hbService)(accId);
834
- return { accId, accName, accService, name, masterAddress, masterPort, logicalAddress, logicalNodeAddress, type: stype, min, max };
841
+ return { accId, accName, accService, name, masterAddress, masterPort, logicalAddress, logicalNodeAddress, type: stype, min, max, nostop };
835
842
  ;
836
843
  }
837
844
  updateLink(inx, link) {
@@ -74,6 +74,17 @@
74
74
  </div>
75
75
  </div>
76
76
 
77
+ <% if (link.unit && link.unit.isUpDown()) { %>
78
+ <div class="row">
79
+ <div class="switch input-field col s4">
80
+ <label>Send stop
81
+ <input id="nostop" name="nostop" <%= (link.nostop == 'Y') ? 'checked' : '' %> type="checkbox" value="Y">
82
+ <span class="lever"></span>Don't
83
+ </label>
84
+ </div>
85
+ </div>
86
+ <% } %>
87
+
77
88
  <div class="row">
78
89
  <div class="input-field col s4">
79
90
  <label for="min">Off value</label>
@@ -1 +0,0 @@
1
- {"sessionId":"29e28b48-3a89-4159-baf0-58e668c1fe0d","pid":61331,"procStart":"Wed Sep 16 12:58:32 2026","acquiredAt":1789563711220}