homebridge-smartsystem 6.0.9 → 6.0.10

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
@@ -240,6 +240,9 @@ switch =>
240
240
  ## v6.0.x - 01-07-2022
241
241
  - .1: first version running on Homebridge UI
242
242
  - .9: read version from package.json
243
+ - .10: removed "homekit" nav tab,
244
+ added "restart plugin" to settings,
245
+ set lock target state to "locked"
243
246
 
244
247
  ## Hardware
245
248
  A Raspberry Pi that connects to a Duotecno IP Node
@@ -13,6 +13,7 @@ const accessory_1 = require("./accessory");
13
13
  class Lock extends accessory_1.Accessory {
14
14
  constructor(log, homebridge, unit) {
15
15
  super(log, homebridge, unit);
16
+ this.targetState = 1; // locked
16
17
  this.log("created Lock -> " + unit.getDescription());
17
18
  // set default for Unlocked to Locked
18
19
  if (this.unit.getType() === types_1.UnitExtendedType.kUnlocker)
@@ -14,7 +14,7 @@ import { Accessory } from "./accessory";
14
14
 
15
15
 
16
16
  export class Lock extends Accessory {
17
- targetState;
17
+ targetState = 1; // locked
18
18
 
19
19
  constructor(log: LogFunction, homebridge: API, unit: Unit) {
20
20
  super(log, homebridge, unit);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-smartsystem",
3
3
  "displayname": "Duotecno Bridge",
4
- "version": "6.0.9",
4
+ "version": "6.0.10",
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",
@@ -211,8 +211,13 @@ class SmartApp extends webapp_1.WebApp {
211
211
  config = this.scrapeSettings(context);
212
212
  this.write("settings", config);
213
213
  }
214
+ else if (context.action === "restart") {
215
+ context.request = "restart";
216
+ return this.doRestart(false);
217
+ }
214
218
  else if (context.action === "install") {
215
219
  config = this.scrapeSettings(context);
220
+ context.request = "install";
216
221
  this.write("settings", config);
217
222
  this.writeDHCP(context, config);
218
223
  }
@@ -227,8 +227,13 @@ export class SmartApp extends WebApp {
227
227
  config = this.scrapeSettings(context);
228
228
  this.write("settings", config);
229
229
 
230
+ } else if (context.action === "restart") {
231
+ context.request = "restart";
232
+ return this.doRestart(false)
233
+
230
234
  } else if (context.action === "install") {
231
235
  config = this.scrapeSettings(context);
236
+ context.request = "install";
232
237
  this.write("settings", config);
233
238
  this.writeDHCP(context, config);
234
239
 
@@ -2,7 +2,7 @@
2
2
  <div class="nav-wrapper">
3
3
  <a href="/index.html" target=_blank class="brand-logo hide-on-small-only" >Duotecno</a>
4
4
  <ul id="nav-mobile" class="right">
5
- <li <%= (request === "homekit") ? 'class="active"' : '' %></li><a href="/homekit">Homekit</a></li>
5
+ <!-- li <%= (request === "homekit") ? 'class="active"' : '' %></li><a href="/homekit">Homekit</a></li -->
6
6
  <li <%= (request === "masters") ? 'class="active"' : '' %></li><a href="/masters">Masters</a></li>
7
7
  <li <%= (request === "services") ? 'class="active"' : '' %></li><a href="/services">Services</a></li>
8
8
  <% if (hasSmappee) { %><li <%= (request === "smappee") ? 'class="active"' : '' %></li><a href="/smappee">Smappee</a></li><% } %>
@@ -17,10 +17,10 @@
17
17
  <form method="POST" action="/settings">
18
18
  <input type="hidden" name="daction" value="save">
19
19
  <h1>
20
- IP Settings
21
- <button class="right btn waves-effect waves-light" type="submit" name="action" value="reset">Reset</button>
22
- <button class="right btn waves-effect waves-light" type="submit" name="action" value="install">Install</button>
23
- <button class="right btn waves-effect waves-light" type="submit" name="action" value="reboot">Reboot</button>
20
+ Settings<button class="right btn waves-effect waves-light" type="submit" name="action" value="reset">Reset to DHCP</button>
21
+ <button class="right btn waves-effect waves-light" type="submit" name="action" value="install">Install IP Settings</button>
22
+ <button class="right btn waves-effect waves-light" type="submit" name="action" value="reboot">Reboot PI</button>
23
+ <button class="right btn waves-effect waves-light" type="submit" name="action" value="restart">Restart Homebridge</button>
24
24
  </h1>
25
25
 
26
26
  <div class="row">