homebridge-smartsystem 7.2.3 → 7.2.4

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.2.3",
4
+ "version": "7.2.4",
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",
@@ -12,7 +12,8 @@
12
12
  <h1>
13
13
  Proxy Config
14
14
  <button class="right btn waves-effect waves-light" type="submit" name="action" value="cancel">Back</button>
15
- <button class="right btn waves-effect waves-light" type="submit" name="action" value="save">Save</button>
15
+ <button class="right btn waves-effect waves-light" type="submit" name="action" value="save"
16
+ onclick="return confirmNodeNumber();">Save</button>
16
17
  <button class="right btn waves-effect waves-light red" type="submit" name="action" value="restart">Restart</button>
17
18
  <button class="right btn waves-effect waves-light
18
19
  <%= backupState === 'warning' ? 'orange darken-1' : (backupState === 'blue' ? 'blue' : 'grey') %>"
@@ -116,7 +117,7 @@
116
117
  <div class="row" style="margin-top: 0;">
117
118
  <div class="input-field col s6">
118
119
  <label for="dserverEmail">Duotecno Account Email</label>
119
- <input id="dserverEmail" name="dserverEmail" type="email" autocomplete="off"
120
+ <input id="dserverEmail" name="dserverEmail" type="text" autocomplete="off"
120
121
  value="<%= config.dserverEmail || '' %>">
121
122
  </div>
122
123
  <div class="input-field col s6">
@@ -180,7 +181,8 @@
180
181
  </h2>
181
182
  <p class="grey-text" style="margin-bottom: 2rem;">
182
183
  Reach this configuration interface itself through the cloud server, at
183
- <code>https://<%= config.cloudServer %>/connect/<%= deviceIds.http %>/</code>.
184
+ <code>https://<%= config.cloudServer %>/connect/<%= deviceIds.http %>/ <br>
185
+ and fill in your username + password.</code>.
184
186
  </p>
185
187
 
186
188
  <div class="row" style="margin-top: 1rem;">
@@ -338,5 +340,19 @@
338
340
 
339
341
  </body>
340
342
 
343
+ <script>
344
+ // The gateway has no Duotecno bus address of its own -- it always registers under the
345
+ // reserved node 0xff. Deviating from that is an exceptional setup that can collide with
346
+ // another device's registration on the cloud server, so confirm it explicitly on Save.
347
+ function confirmNodeNumber() {
348
+ var el = document.getElementById('nodeNumber');
349
+ var v = (el.value || '').trim().toLowerCase().replace(/^0x/, '');
350
+ if (v === '' || v === 'ff') return true;
351
+ return confirm('You changed the reserved node number away from the default (0xff). ' +
352
+ 'This is an exceptional setup and may conflict with another device registered on the ' +
353
+ 'cloud server. Continue anyway?');
354
+ }
355
+ </script>
356
+
341
357
  <%- include('/views/scripts'); -%>
342
358
  </html>