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 +3 -0
- package/accessories/lock.js +1 -0
- package/accessories/lock.ts +1 -1
- package/package.json +1 -1
- package/server/smartapp.js +5 -0
- package/server/smartapp.ts +5 -0
- package/server/views/nav.ejs +1 -1
- package/server/views/settings.ejs +4 -4
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
|
package/accessories/lock.js
CHANGED
|
@@ -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)
|
package/accessories/lock.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-smartsystem",
|
|
3
3
|
"displayname": "Duotecno Bridge",
|
|
4
|
-
"version": "6.0.
|
|
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",
|
package/server/smartapp.js
CHANGED
|
@@ -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
|
}
|
package/server/smartapp.ts
CHANGED
|
@@ -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
|
|
package/server/views/nav.ejs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
21
|
-
<button class="right btn waves-effect waves-light" type="submit" name="action" value="
|
|
22
|
-
<button class="right btn waves-effect waves-light" type="submit" name="action" value="
|
|
23
|
-
<button class="right btn waves-effect waves-light" type="submit" name="action" value="
|
|
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">
|