iobroker.zigbee 3.3.1-alpha.0 → 3.3.1

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/main.js CHANGED
@@ -130,15 +130,13 @@ class Zigbee extends utils.Adapter {
130
130
  const Sentry = sentryInstance.getSentryObject();
131
131
  if (Sentry) {
132
132
  if (message) {
133
- Sentry.configureScope(scope =>
134
- scope.addBreadcrumb({
135
- type: 'error', // predefined types
136
- category: 'error message',
137
- level: 'error',
138
- message
139
- }));
133
+ Sentry && Sentry.withScope(scope => scope.addBreadcrumb({
134
+ type: 'error', // predefined types
135
+ category: 'error message',
136
+ level: 'error',
137
+ message
138
+ }));
140
139
  }
141
-
142
140
  if (typeof error == 'string') {
143
141
  Sentry.captureException(new Error(error));
144
142
  } else {
@@ -641,13 +639,13 @@ class Zigbee extends utils.Adapter {
641
639
  await this.callPluginMethod('start', [this.zbController, this.stController]);
642
640
  }
643
641
 
644
- async syncAllDeviceStates(resetRoles) {
642
+ async syncAllDeviceStates(rebuildStates) {
645
643
  this.stController.CleanupRequired(false);
646
- if (resetRoles) this.stController.clearModelDefinitions();
644
+ if (rebuildStates) this.stController.clearModelDefinitions();
647
645
  const devicesFromObjects = (await this.getDevicesAsync()).filter(item => item.native.id.length ==16).map((item) => `0x${item.native.id}`);
648
646
  const devicesFromDB = this.zbController.getClientIterator(false);
649
647
  for (const device of devicesFromDB) {
650
- if (resetRoles) {
648
+ if (rebuildStates) {
651
649
  const hM = await zigbeeHerdsmanConverters.findByDevice(device);
652
650
  await this.stController.AddModelFromHerdsman(device, hM ? hM.model : device.modelID);
653
651
  }
@@ -660,7 +658,7 @@ class Zigbee extends utils.Adapter {
660
658
  if (entity) {
661
659
  const model = entity.mapped ? entity.mapped.model : entity.device.modelID;
662
660
  this.stController.updateDev(zbIdorIeeetoAdId(this, device.ieeeAddr, false), model, model, () =>
663
- this.stController.syncDevStates(device, model, resetRoles));
661
+ this.stController.syncDevStates(device, model));
664
662
  }
665
663
  else (this.log.debug('resolveEntity returned no entity'));
666
664
  }
@@ -705,15 +703,12 @@ class Zigbee extends utils.Adapter {
705
703
  await this.stController.AddModelFromHerdsman(entity.device, model)
706
704
  if (device) {
707
705
  this.getObject(zbIdorIeeetoAdId(this, device.ieeeAddr, false), (err, obj) => {
708
- if (!obj) {
709
- const model = (entity.mapped) ? entity.mapped.model : entity.device.modelID;
710
- if (this.debugActive) this.log.debug(`new device ${device.ieeeAddr} ${device.networkAddress} ${model} `);
706
+ const model = (entity.mapped) ? entity.mapped.model : entity.device.modelID;
707
+ if (this.debugActive) this.log.debug(`new device ${device.ieeeAddr} ${device.networkAddress} ${model} `);
711
708
 
712
- this.logToPairing(`New device joined '${device.ieeeAddr}' model ${model}`, true);
713
- this.stController.updateDev(zbIdorIeeetoAdId(this, device.ieeeAddr, false), model, model, () =>
714
- this.stController.syncDevStates(device, model, false));
715
- }
716
- else if (this.debugActive) this.log.debug(`Device ${safeJsonStringify(entity)} rejoined, no new device`);
709
+ this.logToPairing(`New device joined '${device.ieeeAddr}' model ${model}`, true);
710
+ this.stController.updateDev(zbIdorIeeetoAdId(this, device.ieeeAddr, false), model, model, () =>
711
+ this.stController.syncDevStates(device, model));
717
712
  });
718
713
  }
719
714
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zigbee",
3
- "version": "3.3.1-alpha.0",
3
+ "version": "3.3.1",
4
4
  "author": {
5
5
  "name": "Kirov Ilya",
6
6
  "email": "kirovilya@gmail.com"
@@ -23,13 +23,13 @@
23
23
  "dependencies": {
24
24
  "@iobroker/adapter-core": "^3.3.2",
25
25
  "@iobroker/dm-utils": "^1.0.13",
26
- "humanize-duration": "^3.33.1",
26
+ "humanize-duration": "^3.33.2",
27
27
  "tar": "^7.5.2",
28
28
  "ajv": "^8.17.1",
29
29
  "uri-js": "^4.4.1",
30
30
  "typescript": "^5.9.3",
31
- "zigbee-herdsman": "^7.0.0",
32
- "zigbee-herdsman-converters": "25.84.0"
31
+ "zigbee-herdsman": "^8.0.0",
32
+ "zigbee-herdsman-converters": "^25.85.0"
33
33
  },
34
34
  "description": "Zigbee devices",
35
35
  "devDependencies": {
@@ -38,7 +38,7 @@
38
38
  "@alcalzone/release-script-plugin-license": "^4.0.0",
39
39
  "@alcalzone/release-script-plugin-manual-review": "^4.0.0",
40
40
  "@iobroker/testing": "^5.2.2",
41
- "eslint": "^9.39.1",
41
+ "eslint": "^9.39.2",
42
42
  "eslint-config-prettier": "^9.1.0",
43
43
  "eslint-plugin-prettier": "^5.5.4",
44
44
  "mixin-deep": "^2.0.1",