iobroker.zigbee 3.1.6 → 3.2.0

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.
Binary file
File without changes
Binary file
@@ -332,14 +332,45 @@
332
332
  margin-right: auto;
333
333
  width: 80px;
334
334
  }
335
+ .sml_list {
336
+ display: flex;
337
+ align-items: center;
338
+ gap: 20px;
339
+ }
335
340
 
336
341
  #dataroweven { background-color: #909090; color: #c0c0c0 !important; }
337
342
  #datarowodd { background-color: #c0c0c0; color: #202020 !important; }
338
343
  #datarowopt { background-color: #707070; color: #c0c0c0 !important; }
339
344
  #datatable { background-color: #3090c0; color: #202020 !important; }
345
+ #dataroweven_red { background-color: #909090; color: #c00000 !important; }
346
+ #datarowodd_red { background-color: #C0C0C0; color: #c00000 !important; }
347
+ #datarowopt_red { background-color: #707070; color: #c00000 !important; }
340
348
  #datared { color: #C00000 !important;}
341
349
  #datalime { background-color: #cddc31; color: #c00000 !important;}
342
350
 
351
+ .m.react-dark #dataroweven_red {
352
+ background-color: #500000 !important;
353
+ }
354
+ .m.react-dark #datarowodd_red {
355
+ background-color: #400000 !important;
356
+ }
357
+ .m.react-dark #datarowopt_red {
358
+ background-color: #300000 !important;
359
+ }
360
+ .m.react-dark #datarowodd {
361
+ background-color: #303030 !important;
362
+ }
363
+ .m.react-dark #dataroweven {
364
+ background-color: #505050 !important;
365
+ }
366
+ .m.react-dark #datatable {
367
+ background-color: #202020 !important;
368
+ }
369
+
370
+ .i.middle {
371
+ vertical-align:middle;
372
+ }
373
+
343
374
  #tab-main .main-toolbar-table .filter-input {
344
375
  display: inline-table;
345
376
  padding-left: 6px;
@@ -721,7 +752,7 @@
721
752
  <li class="tab col s2"><a href="#tab-herdsman" id="hardware" class="translate tooltipped">Hardware</a></li>
722
753
  <!--<li class="tab col s2"><a href="#tab-map" id="tabmap" class="translate tooltipped">Network map</a></li> -->
723
754
  <!--<li class="tab col s1"><a href="#tab-binding" class="translate tooltipped">Binding</a></li> -->
724
- <li class="tab col s2"><a href="#tab-exclude" class="translate tooltipped">Local Overrides</a></li>
755
+ <!--<li class="tab col s2"><a href="#tab-exclude" class="translate tooltipped">Local Overrides</a></li>-->
725
756
  <li class="tab col s2"><a href="#tab-overrides" class="translate tooltipped">Local Data</a></li>
726
757
  <!--<li class="tab col s2"><a href="#tab-main" id="devs" class="translate tooltipped">Devices</a></li>-->
727
758
  <li class="tab col s2"><a href="#tab-dev" id="develop" class="translate tooltipped">Developer</a>
@@ -935,7 +966,8 @@
935
966
  <a id="show_test_run" class="waves-effect waves-light blue btn"><img class="img-btn" src="img/start_stop.png" title="start / stop" ></a>&nbsp;
936
967
  <a id="readNVRam-btn" class="waves-effect waves-light btn"><img class="img-btn" src="img/nvram_read.png" title="read nvram backup" ></a>&nbsp;
937
968
  <a id="deleteNVRam-btn" class="waves-effect waves-light btn"><img class="img-btn" src="img/nvram_delete.png" title="remove nvram backup" ></a>&nbsp;
938
- <a id="reset-btn" class="waves-effect waves-light white-text btn translate"><img class="img-btn" src="img/reset.png" title="reset..." ></a>&nbsp;
969
+ <a id="reset-btn" class="waves-effect waves-light white-text btn translate"><img class="img-btn" src="img/reset.png" title="reset adapter" ></a>&nbsp;
970
+ <a id="restore-backup-btn" class="waves-effect waves-light white-text btn translate"><img class="img-btn" src="img/restore_backup.png" title="restore adapter from backup" ></a>&nbsp;
939
971
  </div>
940
972
  </div>
941
973
  <div class="row textarea">
@@ -1201,12 +1233,87 @@
1201
1233
  </ul>
1202
1234
  </div>
1203
1235
  <div id="tab-overrides" class="col s12 page">
1236
+ <div class="navbar-fixed" style="height: 56px;">
1237
+ <nav class="resposHeight" style="margin-left: -12px; line-height: 24px; width: calc(100% + 24px);">
1238
+ <ul id="nav-mobile-2" class="left">
1239
+ <li>
1240
+ <a id="refresh_models_btn" class="btn-floating waves-effect waves-light tooltipped center-align hoverable translateT" title="refresh data">
1241
+ <i class="material-icons large">refresh</i>
1242
+ </a>
1243
+ </li>
1244
+ <li>
1245
+ <div class="col main-toolbar-table-types-tools main-toolbar-table-filter input-field" style="line-height: 24px;">
1246
+ <i class="material-icons prefix" style="line-height: 24px;">search</i>
1247
+ <input id="model-search" class="filter-input translateP" placeholder="" readonly="readonly" onfocus="if (this.hasAttribute('readonly')) {this.removeAttribute('readonly'); this.blur(); this.focus();}" data-lang-placeholder="Sort">
1248
+ <a class="model-filter-clear btn-floating btn-very-small translateT red lighten-3" title="Очистить" data-lang-title="clear" style="display: none;"><i class="material-icons">clear</i></a>
1249
+ </div>
1250
+ </li>
1251
+ <li>
1252
+ <div class="col input-field" style="line-height: 24px;">
1253
+ <i class="material-icons left" style="line-height: 24px; margin-top: 5px;">sort</i>
1254
+ <a id="model-sort-btn" class="dropdown-trigger btn" href="#" data-target="model-sort">all</a>
1255
+ <ul id="model-sort" class="dropdown-content" tabindex="0">
1256
+ <li class="model-sort-item" data-type="function(a,b) { return true }" tabindex="0">
1257
+ <a class="translate" data-lang="default">default</a></li>
1258
+ <li class="model-sort-item" data-type="by type" tabindex="0">
1259
+ <a class="translate" data-lang="by type">by type</a></li>
1260
+ <li class="model-sort-item" data-type="by device count" tabindex="0">
1261
+ <a class="translate" data-lang="by device count">by device count</a></li>
1262
+ <li class="model-sort-item" data-type="by option count" tabindex="0">
1263
+ <a class="translate" data-lang="by option count">by option count</a></li>
1264
+ </ul>
1265
+ </div>
1266
+ </li>
1267
+ <li>
1268
+ <div class="col input-field" style="line-height: 24px;">
1269
+ <i class="material-icons left" style="line-height: 24px; margin-top: 5px;">filter_list</i>
1270
+ <a id="model-filter-btn" class="dropdown-trigger btn" href="#" data-target="model-filter">all</a>
1271
+ <ul id="model-filter" class="dropdown-content" tabindex="0">
1272
+ <li class="model-filter-item" data-type="with options" tabindex="0"><a class="translate" data-lang="without options">without options</a></li>
1273
+ <li class="model-filter-item" data-type="without options" tabindex="0"><a class="translate" data-lang="with options">with options</a></li>
1274
+ <li class="model-filter-item" data-type="routers" tabindex="0"><a class="translate" data-lang="Routers">Routers</a></li>
1275
+ <li class="model-filter-item" data-type="end devices" tabindex="0"><a class="translate" data-lang="End Devices">End Devices</a></li>
1276
+ <li class="model-filter-item" data-type="groups" tabindex="0"><a class="translate" data-lang="Groups">Groups</a></li>
1277
+ <li class="model-filter-item" data-type="all" tabindex="0"><a class="translate" data-lang="all">all</a></li>
1278
+ </ul>
1279
+ </div>
1280
+ </li>
1281
+ </ul>
1282
+ </nav>
1283
+ </div>
1284
+ <div class="row">
1285
+ <!--
1286
+ <div class="col s1 l1 m1"><a id="modelnamefilter" class="btn-large blue left" ><i class="material-icons icon-blue">filter_list</i></a></div>
1287
+ <div class="col s5 l5 m5 input-field" style="line-height: 24px;"><input id="Filter" type="text" /><label class="translate">Search</div>
1288
+ <div class="col s1 l1 m1"><a id="modelsetfilter" class="btn-large blue left" ><i class="material-icons icon-blue">reorder</i></a></div>
1289
+ <div class="input-field suffix col s2 m2 l2">
1290
+ <select id="channel" class="value">
1291
+ <option value="function(a) { return true }" selected>All</option>
1292
+ <option value="function(a) { return LocalDisplayDataValues[a].type == 'group' }">Groups</option>
1293
+ <option value="function(a) { return LocalDisplayDataValues[a].type == 'Router' }">Routers</option>
1294
+ <option value="function(a) { return LocalDisplayDataValues[a].type == 'Router' }">EndDevices</option>
1295
+ <option value="function(a) { return LocalDisplayDataValues[a].setOptions?.length > 0 }">with Options</option>
1296
+ <option value="function(a) { return !(LocalDisplayDataValues[a].setOptions?.length > 0) }">without Options</option>
1297
+ <label class="translate">Filter</label>
1298
+ </select>
1299
+ </div>
1300
+ <div class="col s1 l1 m1"><a id="modelnamefilter" class="btn-large blue left" ><i class="material-icons icon-blue">sort</i></a></div>
1301
+ <div class="input-field suffix col s2 m2 l2">
1302
+ <select id="channel" class="value">
1303
+ <option value="function(a,b) { return 0 }" selected>noSort</option>
1304
+ <option value="function(a,b) { return LocalDisplayDataValues[a].type > LocalDisplayDataValues[b].type }">by type</option>
1305
+ <option value="function(a,b) { return LocalDisplayDataValues[a].devices?.length > LocalDisplayDataValues[b].devices?.length }">by device counttype</option>
1306
+ <option value="function(a,b) { return LocalDisplayDataValues[a].setOptions?.length > LocalDisplayDataValues[b].setOptions?.length }">by option count</option>
1307
+ <label class="translate">Sort</label>
1308
+ </select>
1309
+ </div></div>
1204
1310
  <div class="fixed-action-btn" style="margin-bottom: 100px">
1205
1311
  <a id="updateData"
1206
1312
  class="btn-floating waves-effect waves-light blue tooltipped center-align hoverable translateT"
1207
1313
  title="update Data"><i class="material-icons large">replay</i></a>
1208
1314
  </div>
1209
- <div id="tab-overrides" row>
1315
+ -->
1316
+ <div id="tab-overrides-content" row>
1210
1317
  Nothing to see yet.
1211
1318
  </div>
1212
1319
  </div>
@@ -1284,17 +1391,17 @@
1284
1391
  </div>
1285
1392
  </div>
1286
1393
 
1287
- <div id="chooseimage" class="modal">
1394
+ <div id="chooseimage" class="modal modal-fixed-footer">
1288
1395
  <div class="modal-content">
1289
1396
  <div class="row">
1290
- <h3 class="translate">Data override</h3>
1397
+ <h3 class="translate">Edit model options</h3>
1291
1398
  <div class="row">
1292
1399
  <div class="col s12 input-field">
1293
1400
  <input id="d_name" type="text" class="value validate">
1294
1401
  <label for="d_name" class="translate">Name</label>
1295
1402
  </div>
1296
1403
  </div>
1297
- <div class="row">
1404
+ <div class="row">
1298
1405
  <div class="col s9 input-field">
1299
1406
  <select id="images" class="icons">
1300
1407
  </select>
@@ -1303,15 +1410,26 @@
1303
1410
  <div class="col s3 ">
1304
1411
  <div class="currentIcon"><img src="img/unknown.png"></div>
1305
1412
  </div>
1413
+ <div class="col options_grid s12">
1414
+ No Options available
1415
+ </div>
1416
+ <div class="new_options_available">
1417
+ <div class="input-field suffix col s10 m10 l10">
1418
+ <select id="option_Selector" class="materialSelect"></select class="value" />
1419
+ <label for="option_Selector">Available Options</label>
1420
+ </div>
1421
+ <div class="col">
1422
+ <a name="add_options" id="option_add_1084" class="waves-effect waves-green btn-large">
1423
+ <i class="material-icons large icon-green">add_circle</i></a>
1424
+ </div>
1425
+ </div>
1306
1426
  </div>
1307
1427
  </div>
1308
- <div class="row">
1309
- </div>
1310
1428
  </div>
1311
1429
  <div class="modal-footer">
1312
1430
  <div class="forcedelete" id = "globaldiv">
1313
1431
  <label>
1314
- <input id="globaloverride" type="checkbox" class="value"/>
1432
+ <input id="globaloverride" type="checkbox" class="value filled-in" checked="checked" disabled="disabled"/>
1315
1433
  <span class="translate" for="globaloverride">Apply to model</span>
1316
1434
  </label>
1317
1435
  </div>
@@ -1410,6 +1528,26 @@
1410
1528
  </div>
1411
1529
  </div>
1412
1530
 
1531
+ <div id="modalrestore" class="modal">
1532
+ <div class="modal-content">
1533
+ <h3 class="translate">Select backup to restore</h3>
1534
+ <!--p class="translate">Restore Info</p-->
1535
+ <div class="new_backups_available">
1536
+ <div class="input-field suffix col s10 m10 l10">
1537
+ <select id="backup_Selector" class="materialSelect"></select class="value" />
1538
+ <label for="backup_Selector">Available Backups</label>
1539
+ </div>
1540
+ <div class="col col s2 m2 l2">
1541
+ <a name="restore_this" id="restore_this" class="waves-effect waves-green btn-large">
1542
+ <i class="material-icons large icon-green tooltipped" title="restore">beenhere</i></a>
1543
+ </div>
1544
+ </div>
1545
+ </div>
1546
+ <div class="modal-footer">
1547
+ <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat translate">Cancel</a>
1548
+ </div>
1549
+ </div>
1550
+
1413
1551
  <div id="modalviewconfig" class="modal modal-fixed-footer">
1414
1552
  <div class="modal-content">
1415
1553
  <h3 class="translate">Map view config</h3>
package/admin/tab_m.html CHANGED
@@ -943,11 +943,11 @@
943
943
 
944
944
  <div id="modaledit" class="modal">
945
945
  <div class="modal-content">
946
- <h3 class="translate">Rename / Group device</h3>
946
+ <h3 class="translate">Group device</h3>
947
947
  <div class="row">
948
948
  <div class="col s12">
949
949
  <div class="input-field">
950
- <input id="d_name" type="text" class="value validate">
950
+ <input disabled id="d_name" type="text" class="value validate">
951
951
  <label for="d_name" class="translate">Name</label>
952
952
  </div>
953
953
  </div>
@@ -1008,7 +1008,7 @@
1008
1008
  <div id="groupedit" class="modal">
1009
1009
  <div class="modal-content">
1010
1010
  <div class = "editgroup">
1011
- <h3 class="translate">Edit Group</h3>
1011
+ <h3 class="translate">Edit group members</h3>
1012
1012
  </div>
1013
1013
  <div class="row">
1014
1014
  <div class="col s4 m4 l2 hide">
@@ -1018,7 +1018,7 @@
1018
1018
  </div>
1019
1019
  </div>
1020
1020
  <div class="input-field col s8 m8 l10">
1021
- <input id="g_name" type="text" class="value validate">
1021
+ <input id="g_name" type="text" class="value validate" disabled="">
1022
1022
  <label for="g_name" class="translate">Name</label>
1023
1023
  </div>
1024
1024
  </div>
@@ -1054,7 +1054,7 @@
1054
1054
  <div id="chooseimage" class="modal modal-fixed-footer">
1055
1055
  <div class="modal-content">
1056
1056
  <div class="row">
1057
- <h3 class="translate">Data override</h3>
1057
+ <h3 class="translate">Edit device options</h3>
1058
1058
  <div class="row">
1059
1059
  <div class="col s12 input-field">
1060
1060
  <input id="d_name" type="text" class="value validate">
@@ -1087,11 +1087,10 @@
1087
1087
  </div>
1088
1088
  </div>
1089
1089
  <div class="modal-footer">
1090
- <div class="forcedelete" id = "globaldiv">
1090
+ <div class="forcedelete hide" id = "globaldiv">
1091
1091
  <label>
1092
1092
  <input id="globaloverride" type="checkbox" class="value"/>
1093
1093
  <span class="translate" for="globaloverride">Apply to model</span>
1094
- </label>
1095
1094
  </div>
1096
1095
  <a name="save" href="#!" class="modal-action modal-close waves-effect waves-green btn green translate">Save</a>
1097
1096
  <a href="#!" class="modal-action modal-close waves-effect waves-red btn-flat translate">Cancel</a>
@@ -1153,7 +1152,7 @@
1153
1152
  </div>
1154
1153
  <div class="modal-footer">
1155
1154
  <a name="IEEE" href="#!" class="modal-action waves-effect waves-red btn-flat left">Network</a>
1156
- <a name="endpairing" id="endpairing" href="#!" class="modal-action waves-effect waves-red btn red translate">Stop</a>
1155
+ <a name="endpairing" id="endpairing" href="#!" class="waves-effect waves-red btn red translate">Stop</a>
1157
1156
  <a name="extendpairing" id="extendpairing" href="#!" class="modal-action waves-effect waves-green btn green translate">Extend</a>
1158
1157
  <a name="hide" href="#!" class="modal-action modal-close waves-effect waves-green btn green translate">Hide</a>
1159
1158
  </div>
Binary file
Binary file
package/docs/de/readme.md CHANGED
@@ -124,9 +124,9 @@ In Beiden Fällen ist es hinreichend den Adapter neu zu starten - die entspreche
124
124
  | ![](img/info.png) | Info <br> Öffnet die Informationsanzeige zum Gerät. Die auf dieser Seite dargestellten Informationen stammen direkt vom Gerät. Sie sind auch für unbekannte Geräte verfügbar. |
125
125
  | ![](img/debug.png) | Gerät debuggen <br> Aktiviert / deaktivert die Erzeugung von erweiterten Debug-Meldungen für dieses Gerät. Die Farbe des Icons zeigt den aktuellen Status an: (Schwarz/Weiss: keine Debug Meldungen, Grün Debug Meldungen - deaktivierbar mit dieser Schaltflächce. Orange - Debug Meldungen via Filter unter zigbee.x.info.debugmessages. |
126
126
  | ![](img/on_off.png) | An/Aus <br> Mit dieser Schaltfläche kann ein Gerät aktiviert / deaktiviert werden. Mit deaktiverten Geräten findet keine Kommunikation statt. |
127
- | ![](img/edit_image.png) | Bild / Name zusweisen <br> Mit dieser Schaltfläche ist es Möglich für das Gerät basierend auf dem Gerät oder dem Gerätetyp ein eigenes Bild und / oder einen eigenen Namen vorzugeben. Vorgaben die so gemacht werden bleiben erhalten wenn das Gerät gelöscht wird. |
127
+ | ![](img/edit_image.png) | Bild / Name zusweisen <br> Mit dieser Schaltfläche ist es Möglich die Bezeichnung des Gerätes, das Bild des Gerätes oder die Optionen des Gerätes anzupassen. Wichtig - die Einstellungen können hier **nur** auf Gerätebasis durchgeführt werden. Die Vorgabe auf Modellbasis ist in der Konfiguration hinterlegt.Vorgaben die so gemacht werden bleiben erhalten wenn das Gerät gelöscht wird. |
128
128
  | ![](img/reconfigure.png) | Das Gerät konfigurieren. <br> Mit dieser Schaltfläche ist es Möglich für das Gerät erneut zu konfigurieren. Dabei wird der *Converter* Angewiesen die Aktionen durchzufuehren die zur Konfiguration vorgesehen sind. Ueblicherweise werden damit verscheidene Cluster / Attribute an den Koordinator gebunden, um dafuer zu sorgen das das Gerät Informationen *Event* getriggert an den Koordinator sendet.<br>Damit dieses erfolgreich ist muss das Gerät aktiv sein. Insbesondere bei Batterie-betriebenen Geräten ist das of nut kurz nach einer Aktivierung der Fall.<br>Bei einer erfolgreichen Konfiguration verschwindet der Dialog ohne weitere Meldung, und es wird eine Info Meldung im Log platziert. Nur wenn die Konfiguration nicht erfolgreich war gibt es eine Meldung. Dabei sind 2 Arten von Meldungen zu unterscheiden - eine allgemeine Zeitüberschreitung (The device did not repond in time to the configuration request. Another attempt will be made when the device is awake.) oder eine echte Fehlermeldung. Im Falle der Zeitüberschreitung wird das Gerät in eine Liste eingetragen und bei der naechsten Kontaktaufnahme konfiguriert. Im Fehlerfall unterbleibt die Konfiguration. |
129
- | ![](img/edit_grp.png) | Name / Gruppen editieren <br> Über diese Schaltfläche lässt sich der Name eines Gerätes sowie - wenn zutreffent - die Zuordnung des Gerätes zu einer oder mehreren Gruppen anpassen. |
129
+ | ![](img/edit_grp.png) | Name / Gruppen editieren <br> Über diese Schaltfläche lässt sich die Zuordnung des Gerätes zu einer oder mehreren Gruppen anpassen. Der Button ist nur bei Geräten verfügbar die sich auch gruppieren lassen. Hinweis: Fernbedienungen werden den Gruppen nicht hinzugefügt - statt dessen müssen diese via 'binding' an die Gruppe gebunden werden. |
130
130
  | ![](img/delete.png) | Gerät löschen <br> Started den Löschvorgang für dieses Gerät. |
131
131
 
132
132
  ## Zusätzliche Informationen
package/docs/en/readme.md CHANGED
@@ -122,8 +122,8 @@ In both cases, restarting the adapter is sufficient – ​​the adapter's corr
122
122
  | ![](../de/img/reconfigure.png) | (re)configure the device. <br> This button allows to trigger a device configuration, which is used to tell the device what data to report automatically to the coordinator. The configuration items are defined in the *converter* for this device. Note that the device needs to be active for a configuration attempt to be successful. If the device is not active, the attempt will time out, and the device will be placed in a queue of devices to be configured the next time the device i sends a message. |
123
123
  | ![](../de/img/debug.png) | Debug device <br> Enables / disables the generation of extended debug messages for this device. The color of the icon indicates the current status: (Black/White: no debug messages, Green: debug messages - can be deactivated with this button. Orange: debug messages via filter under zigbee.x.info.debugmessages. |
124
124
  | ![](../de/img/on_off.png) | On/Off <br> This button can be used to activate/deactivate a device. No communication takes place with deactivated devices. |
125
- | ![](../de/img/edit_image.png) | Assign image/name <br> This button allows you to specify a custom image and/or name for the device based on the device or device type. Settings made in this way are retained even if the device is deleted. |
126
- | ![](../de/img/edit_grp.png) | Edit name/groups <br> This button can be used to change the name of a device and - if applicable - the assignment of the device to one or more groups. |
125
+ | ![](../de/img/edit_image.png) | Assign image/name <br> This button allows you to Assign a name, an icon or options for a specific device. Note that this assignment is **solely** on device level. model-level assingment is done via the settings. Settings made in this way are retained even if the device is deleted. |
126
+ | ![](../de/img/edit_grp.png) | Edit name/groups <br> This button can be used change the devices associationw ith one or more groups. This button is only available on devices which can be assigned to groups. Note: Remotes are not added to the groups - they need to be bound to the group using the 'binding' tab. |
127
127
  | ![](../de/img/delete.png) | Delete device <br> Starts the deletion process for this device. |
128
128
  ## Additional information
129
129
  The Zigbee-Adapter shares the same libraries (zigbee-herdsman, zigbee-herdsman-converters) asn the [Zigbee2mqtt](https://www.zigbee2mqtt.io/) Project ([Github Link](https://github.com/Koenkk/zigbee2mqtt)). It is possible to use zigbee2mqtt.io directly with ioBroker using MQTT or its own [Adapter](https://github.com/arteck/ioBroker.zigbee2mqtt).<br>
File without changes
File without changes
File without changes
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zigbee",
4
- "version": "3.1.6",
4
+ "version": "3.2.0",
5
5
  "news": {
6
+ "3.2.0": {
7
+ "en": "remove local overrides tab from config\nestablish local data tab in config to edit global and device level settings and options\nremove the local overrides tab\nremove the ability to set model level overrides from device tab.\nfix errors for 'polling' devices with changed poll times.\nwarning icon for devices which are not completely interviewed.\nimproved router detection for opening the network\nbugfix: open network on router\nZHC 25.x latest, ZH 6.1.3,\nrestore from in-adapter backup",
8
+ "de": "entfernen sie lokale overrides tab von config\nlokale daten tab erstellen, um globale und geräteebene einstellungen und optionen zu bearbeiten\nentfernen der lokalen overrides tab\nentfernen sie die fähigkeit, modellebene überschrieben von der geräte-tab.\nfehler für \"polling\"-geräte mit veränderten abfragezeiten beheben.\nwarnsymbol für geräte, die nicht vollständig interviewt werden.\nverbesserte routererkennung zum öffnen des netzwerks\nbugfix: offenes netzwerk auf router\nZHC 25.x neueste, ZH 6.1.3,\nwiederherstellung von in-adapter-backup",
9
+ "ru": "удалить локальную вкладку overrided из конфигураций\nустановить локальную вкладку данных в конфигурацию для редактирования глобальных настроек и параметров уровня устройства\nудалить вкладку local overrides\nудалить возможность установки переопределений уровня модели из вкладки устройства.\nисправление ошибок для «опросных» устройств с измененным временем опроса.\nиконка предупреждения для устройств, которые не были полностью опрошены.\nулучшенное обнаружение маршрутизатора для открытия сети\nbugfix: открытая сеть на маршрутизаторе\nZHC 25.x, ZH 6.1.3,\nвосстановление из in-adapter backup",
10
+ "pt": "remover a página de substituições locais da configuração\nestabelecer a página de dados locais na configuração para editar as configurações e opções globais e de nível do dispositivo\nremover a página de sobreposições locais\nremover a capacidade de definir os comandos de nível do modelo da aba do dispositivo.\ncorrigir erros para dispositivos de 'polling' com tempos de votação alterados.\nícone de aviso para dispositivos que não são completamente entrevistados.\ndetecção de roteador melhorada para abrir a rede\ncorreção de erros: abrir rede no roteador\nZHC 25.x mais recente, ZH 6.1.3,\nrestaurar a partir de backup no adaptador",
11
+ "nl": "tabblad overrides verwijderen uit config\nlokale datatabblad instellen in config om instellingen en opties voor het niveau van het apparaat en de globale instellingen te bewerken\nhet tabblad lokale overrides verwijderen\nverwijder de mogelijkheid om modelniveau overrides van apparaat tab.\nfouten te herstellen voor 'polling' apparaten met veranderde polltijden.\nwaarschuwingspictogram voor apparaten die niet volledig zijn geïnterviewd.\nverbeterde routerdetectie voor het openen van het netwerk\nbugfix: open netwerk op router\nZHC 25.x laatste, ZH 6.1.3,\nherstellen van in-adapter back-up",
12
+ "fr": "supprimer l'onglet local de la configuration\ncréer un onglet local de données dans la configuration pour modifier les paramètres et les options de niveau global et périphérique\nsupprimer l'onglet local de remplacement\nsupprimer la possibilité de définir les dépassements de niveau du modèle de l'onglet périphérique.\ncorriger les erreurs pour les dispositifs 'polling' avec des temps de sondage modifiés.\nicône d'avertissement pour les appareils qui ne sont pas complètement interviewés.\namélioration de la détection du routeur pour l'ouverture du réseau\nbugfix: ouvrir le réseau sur le routeur\nZHC 25.x dernier, ZH 6.1.3,\nrestaurer à partir de la sauvegarde dans l'adaptateur",
13
+ "it": "rimuovere la scheda override locale da config\nstabilire la scheda dati locale in configurazione per modificare le impostazioni e le opzioni del livello globale e del dispositivo\nrimuovere la scheda override locale\nrimuovere la capacità di impostare override di livello del modello dalla scheda del dispositivo.\ncorreggere gli errori per i dispositivi 'polling' con tempi di sondaggio modificati.\nicona di avviso per dispositivi che non sono completamente intervistati.\nmiglioramento del rilevamento del router per l'apertura della rete\nbugfix: aprire la rete sul router\nZHC 25.x ultimo, ZH 6.1.3,\nripristino da backup in-adapter",
14
+ "es": "eliminar la pestaña de anulaciones locales de config\nestablecer la ficha de datos local en config para editar ajustes y opciones a nivel global y de dispositivos\neliminar la ficha de anulación local\neliminar la capacidad de establecer el nivel de modelo anula de la pestaña dispositivo.\ncorrige errores para dispositivos 'polling' con tiempos de votación cambiados.\nicono de advertencia para dispositivos que no son entrevistados por completo.\nmejor detección de router para abrir la red\nbugfix: red abierta en router\nZHC 25.x más reciente, ZH 6.1.3,\nrestaurar de la copia de seguridad en el equipo",
15
+ "pl": "usuń lokalne nadjazdy z zakładki config\ntworzy lokalną kartę danych w konfigu, aby edytować globalne i na poziomie urządzenia ustawienia i opcje\nusuń kartę lokalnych nadwozi\nusuń możliwość ustawiania nadwyżek poziomu modelu z zakładki urządzenia.\nnaprawić błędy urządzeń 'sondażowych' ze zmienionymi okresami ankiety.\nikona ostrzegawcza dla urządzeń, które nie są w pełni przesłuchane.\nulepszone wykrywanie routerów w celu otwarcia sieci\nbugfix: otwarta sieć na routerze\nZHC 25.x najnowszy, ZH 6.1.3,\nprzywracanie z kopii zapasowej in- adaptera",
16
+ "uk": "видалити локальну вкладку overrides з налаштування\nвстановити локальну вкладку даних в конфігурацію для редагування параметрів рівня глобального та пристрою та параметрів\nвидалити локальну вкладку\nприбрати можливість встановити рівень моделі перенаряддя з вкладки пристрою.\nфіксувати помилки для пристроїв «запилення» з змінними термінами опитування.\nзначок попередження для пристроїв, які не повністю опитуються.\nполіпшення виявлення маршрутизатора для відкриття мережі\nвиправлення помилок: відкрита мережа на маршрутизаторі\nZHC 25.x останнє, ZH 6.1.3,\nвідновлення з резервної копії",
17
+ "zh-cn": "从配置中删除本地覆盖标签\n在配置中建立本地数据标签以编辑全局和设备级别设置和选项\n删除本地覆盖标签\n从设备标签中删除设置模型级别覆盖的能力 .\n修正“ 投票” 设备的错误, 并更改投票时间 .\n警告未完全访问设备的图标.\n为打开网络改进路由器检测\n错误修正: 在路由器上打开网络\nZHC 25.x最新版,ZH 6.1.3,\n从适应中备份恢复"
18
+ },
6
19
  "3.1.6": {
7
20
  "en": "Bugfixes\n",
8
21
  "de": "Bugfixes\n",
@@ -80,19 +93,6 @@
80
93
  "pl": "naprawić błąd 'icon' dla nieznanych urządzeń\nfix state for level.color.rgb role (hex _ color, akceptuje tylko # rrggbb values\nZH 4.4.1\nZHC 23.72.1\nprzygotowanie do złamania zmian w ZHC 24.0.0",
81
94
  "uk": "виправлено помилку 'icon' для невідомих пристроїв\nвиправити стан для рівня.color.rgb роль (hex_color, приймає тільки значення #rrggbb\nЗХ 4.4.1\nЗХК 23.72.1\nпідготовка до зміни розриву в ЗЖК 24.0.0",
82
95
  "zh-cn": "修复未知设备的“ icon” 错误\n级的固定状态.color.rgb 角色(hex_color,只接受#rrggbb值)\n兹哈4.4.1\nZHC 23.72.1 电话\n准备打破ZHC 24.0"
83
- },
84
- "3.0.2": {
85
- "en": "fix images",
86
- "de": "bilder",
87
- "ru": "фиксировать изображения",
88
- "pt": "corrigir imagens",
89
- "nl": "afbeeldingen herstellen",
90
- "fr": "réparer les images",
91
- "it": "fissare le immagini",
92
- "es": "fijar imágenes",
93
- "pl": "poprawianie obrazów",
94
- "uk": "фіксувати зображення",
95
- "zh-cn": "修正图像"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -27,7 +27,7 @@ class DeviceDebug extends EventEmitter {
27
27
  }
28
28
 
29
29
  start(statescontroller, zigbeecontroller) {
30
- this.info('--- creating device debug ---');
30
+ this.debug('--- creating device debug ---');
31
31
  statescontroller.on('device_debug', this.onDebugEvent.bind(this))
32
32
  this.adapter.on('device_debug', this.onDebugEvent.bind(this))
33
33
  zigbeecontroller.on('device_debug', this.onDebugEvent.bind(this))
package/lib/backup.js CHANGED
@@ -8,6 +8,7 @@ class Backup {
8
8
  this.adapter = adapter;
9
9
  this.adapter.on('message', this.onMessage.bind(this));
10
10
  this.inProgress = new Set();
11
+ this.options = {};
11
12
  }
12
13
 
13
14
  start(zbController, stController) {
@@ -40,10 +41,13 @@ class Backup {
40
41
  if (typeof obj === 'object' && obj.command) {
41
42
  switch (obj.command) {
42
43
  case 'listbackups':
43
- this.listbackups(obj);
44
+ this.listbackups(obj.from, obj.command, obj.message, obj.callback);
44
45
  break;
45
46
  case 'restore':
46
- this.restore(obj);
47
+ this.restore(obj.from, obj.command, obj.message, obj.callback);
48
+ break;
49
+ case 'backup':
50
+ this.backup(() => this.sendTo(obj.from, obj.command, obj.message, obj.callback));
47
51
  break;
48
52
  }
49
53
  }
@@ -51,19 +55,22 @@ class Backup {
51
55
 
52
56
  async configure(zigbeeOptions) {
53
57
  this.zigbeeOptions = zigbeeOptions;
54
- this.backup(zigbeeOptions);
55
- const allBackupFiles = this.listBackupsFiles(zigbeeOptions);
56
- this.delBackupsFiles(zigbeeOptions, allBackupFiles);
58
+ this.options = zigbeeOptions;
59
+ this.backup();
60
+ const allBackupFiles = this.listBackupsFiles();
61
+ this.delBackupsFiles(allBackupFiles);
57
62
  }
58
63
 
59
- backup(options) {
64
+ backup(callback) {
60
65
  // backup prior database and nv data before start adapter
61
66
  const files = [];
67
+ const options = this.options;
62
68
  if (options.disableBackup) {
63
69
  this.info(`internal Backups are disabled`);
64
70
  } else {
65
71
  if (fs.existsSync(pathLib.join(options.dbDir, options.backupPath))) files.push(options.backupPath);
66
72
  if (fs.existsSync(pathLib.join(options.dbDir, options.dbPath))) files.push(options.dbPath);
73
+ if (fs.existsSync(pathLib.join(options.dbDir, options.localConfigPath))) files.push(options.localConfigPath);
67
74
  if (files.length == 0) return;
68
75
 
69
76
  const d = new Date();
@@ -74,20 +81,23 @@ class Backup {
74
81
  const f = fs.createWriteStream(name);
75
82
  f.on('finish', () => {
76
83
  this.debug(`Backup ${name} success`);
84
+ if (callback) callback();
77
85
  });
78
86
  f.on('error', err => {
79
87
  this.error(`Cannot pack backup ${name}: ` + err);
88
+ if (callback) callback();
80
89
  });
81
90
  try {
82
91
  tar.create({gzip: true, p: false, cwd: options.dbDir}, files).pipe(f);
83
92
  } catch (err) {
84
93
  this.error(`Cannot pack backup ${name}: ` + err);
94
+ if (callback) callback();
85
95
  }
86
96
  }
87
97
  }
88
98
 
89
- listBackupsFiles(options) {
90
- const dir = options.dbDir;
99
+ listBackupsFiles() {
100
+ const dir = this.options.dbDir;
91
101
  const result = [];
92
102
 
93
103
  if (fs.existsSync(dir)) {
@@ -117,14 +127,14 @@ class Backup {
117
127
  }
118
128
  }
119
129
 
120
- delBackupsFiles(options, files) {
130
+ delBackupsFiles(files) {
121
131
  const arr = files.length;
122
132
  if (arr > 10) {
123
133
  this.info('delete old Backup files. keep only last 10');
124
134
  }
125
135
 
126
136
  for (let i = 10; i < files.length; i++) {
127
- const name = options.dbDir + '/' + files[i];
137
+ const name = this.options.dbDir + '/' + files[i];
128
138
  try {
129
139
  require('fs').unlinkSync(name);
130
140
  } catch (error) {
@@ -134,34 +144,53 @@ class Backup {
134
144
  }
135
145
 
136
146
 
137
- async listbackups(obj) {
138
-
147
+ async listbackups(from, command, message, callback) {
148
+ this.adapter.sendTo(from, command, {files:this.listBackupsFiles()}, callback);
139
149
  }
140
150
 
141
- async restore(options, name) {
142
- if (fs.existsSync(pathLib.join(options.dbDir, name))) {
151
+ async restore(from, command, msg, callback) {
152
+ const name = msg.name;
153
+ if (name == undefined) {
154
+ this.adapter.sendTo(from, command, {error:`cannot restore from undefined file`}, callback);
155
+ return;
156
+ }
157
+ const options = this.options;
158
+ const fn = pathLib.join(options.dbDir, name)
159
+ if (fs.existsSync(fn)) {
143
160
  try {
144
- this.log.info('Stop herdsman');
145
- if (this.reconnectTimer) clearTimeout(this.reconnectTimer);
146
- this.callPluginMethod('stop');
147
- if (this.zbController) {
148
- await this.zbController.stop();
149
- }
161
+ this.info('Stopping Zigbee subsystem');
162
+ await this.adapter.testConnect({start:false});
150
163
  const tar = require('tar');
164
+ const response = {};
151
165
  try {
152
- tar.extract({file: name, cwd: options.dbDir}, err => {
166
+ const target = this.options.dbDir;
167
+ tar.extract({file: fn, cwd: target}, async err => {
153
168
  if (err) {
154
- this.log.error(`Cannot extract from file ${name}: ${err}`);
169
+ response.error = `Cannot extract from file ${fn}: ${err}`;
170
+ this.error(response.error);
155
171
  } else {
156
- this.log.info(`Extract from file ${name} success`);
172
+ this.info(`Extract from file ${fn} success`);
173
+ }
174
+ const result = await this.adapter.testConnect({start:true});
175
+ if (!result.status) {
176
+ const errors = [];
177
+ if (response.error) errors.push(response.error);
178
+ errors.push('unable to start zigbee subsystem.');
179
+ if (result.error) errors.push(result.error);
180
+ errors.push('Please verify the configuration and the restored files');
181
+ response.error = errors.join('\n');
157
182
  }
158
- this.doConnect();
183
+ this.adapter.sendTo(from, command, response, callback);
159
184
  });
160
185
  } catch (err) {
161
- this.log.error(`Cannot extrack backup ${name}: ${err}`);
186
+ response.error = `Cannot extrack backup ${name}: ${err?.message || 'no reason given'}`
187
+ this.error(response.error);
188
+ this.adapter.sendTo(from, command, response, callback);
162
189
  }
163
190
  } catch (error) {
164
- this.log.error(`Stop herdsman error (${error.stack})`);
191
+ const errmsg = `Error stopping the zigbee subsystem: ${error?.message || 'no reason given'}`
192
+ this.error(errmsg);
193
+ this.adapter.sendTo(from, command, {error:errmsg}, callback);
165
194
  }
166
195
  }
167
196
  }