homebridge-deconz 1.0.24 → 1.0.25

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.
@@ -989,7 +989,9 @@ class Gateway extends AccessoryDelegate {
989
989
  this.vdebug('%spolling...', this.pollNext ? 'priority ' : '')
990
990
  if (this.context.fullState == null || this.pollFullState) {
991
991
  const fullState = await this.client.get('/')
992
- fullState.groups[0] = await this.client.get('/groups/0')
992
+ try {
993
+ fullState.groups[0] = await this.client.get('/groups/0')
994
+ } catch (error) {}
993
995
  this.context.fullState = fullState
994
996
  this.pollFullState = false
995
997
  } else {
@@ -1010,7 +1012,9 @@ class Gateway extends AccessoryDelegate {
1010
1012
  this.context.fullState.resourcelinks = await this.client.get('/resourcelinks')
1011
1013
  if (this.nDevicesByRtype.groups > 0) {
1012
1014
  this.context.fullState.groups = await this.client.get('/groups')
1013
- this.context.fullState.groups[0] = await this.client.get('/groups/0')
1015
+ try {
1016
+ this.context.fullState.groups[0] = await this.client.get('/groups/0')
1017
+ } catch (error) {}
1014
1018
  }
1015
1019
  if (this.values.exposeSchedules) {
1016
1020
  this.context.fullState.schedules = await this.client.get('/schedules')
@@ -1018,7 +1022,7 @@ class Gateway extends AccessoryDelegate {
1018
1022
  }
1019
1023
  await this.analyseFullState(this.context.fullState)
1020
1024
  } catch (error) {
1021
- this.error(error)
1025
+ this.error('poll error: %s', error)
1022
1026
  } finally {
1023
1027
  this.vdebug('polling done')
1024
1028
  this.pollNext = false
@@ -486,6 +486,10 @@ class Light extends DeconzService.LightsResource {
486
486
 
487
487
  updateScenes (scenes) {
488
488
  if (!this.values.exposeScenes) {
489
+ for (const id in this.scenesServices) {
490
+ this.sceneServices[id].destroy()
491
+ delete this.sceneServices[id]
492
+ }
489
493
  return
490
494
  }
491
495
  const sceneById = {}
@@ -521,8 +525,8 @@ class Light extends DeconzService.LightsResource {
521
525
  }
522
526
  for (const id in this.scenesServices) {
523
527
  if (sceneById[id] == null) {
524
- this.scenesSerices[id].destroy()
525
- delete this.scenesService[id]
528
+ this.sceneServices[id].destroy()
529
+ delete this.sceneServices[id]
526
530
  }
527
531
  }
528
532
  }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "ebaauw"
8
8
  ],
9
9
  "license": "Apache-2.0",
10
- "version": "1.0.24",
10
+ "version": "1.0.25",
11
11
  "keywords": [
12
12
  "homebridge-plugin",
13
13
  "homekit",
@@ -31,8 +31,8 @@
31
31
  "node": "^22||^20||^18"
32
32
  },
33
33
  "dependencies": {
34
- "hb-deconz-tools": "~2.0.6",
35
- "homebridge-lib": "~7.1.2"
34
+ "hb-deconz-tools": "~2.0.7",
35
+ "homebridge-lib": "~7.1.3"
36
36
  },
37
37
  "scripts": {
38
38
  "prepare": "standard && rm -rf out && jsdoc -c jsdoc.json",