@homebridge-plugins/homebridge-wemo 7.7.1-beta.1 → 7.7.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/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to `@homebridge-plugins/homebridge-wemo` will be documented in this file.
4
4
 
5
- ## v7.7.1 (Pending Release)
5
+ ## v7.7.1 (2026-08-10)
6
6
 
7
7
  ### Changed
8
8
 
@@ -14,6 +14,9 @@ All notable changes to `@homebridge-plugins/homebridge-wemo` will be documented
14
14
  - fix: stop gating a few log lines on a debug setting that was never readable
15
15
  - fix: keep an accessory when a device answers without its service list
16
16
  - fix: cancel a garage door's settle timer when homebridge shuts down
17
+ - fix: wait for the manually configured devices before reporting which ones failed to connect
18
+ - fix: reject an interval so large it would make the plugin poll every millisecond
19
+ - chore(deps): dependency updates
17
20
 
18
21
  ## v7.7.0 (2026-08-02)
19
22
 
@@ -42,7 +42,8 @@
42
42
  "title": "Discovery Interval",
43
43
  "description": "An interval (in seconds) in which the plugin will broadcast on your network to initally find devices and repair connection errors. Must be 15 or more.",
44
44
  "placeholder": 30,
45
- "minimum": 15
45
+ "minimum": 15,
46
+ "maximum": 2073600
46
47
  },
47
48
  "wemoClient": {
48
49
  "title": "Discovery Settings",
@@ -87,14 +88,16 @@
87
88
  "title": "HTTP Polling Interval",
88
89
  "description": "An interval (in seconds) in which the plugin will request status updates for devices that don't support UPnP or have it manually disabled. Must be 15 or more.",
89
90
  "placeholder": 30,
90
- "minimum": 15
91
+ "minimum": 15,
92
+ "maximum": 2073600
91
93
  },
92
94
  "upnpInterval": {
93
95
  "type": "integer",
94
96
  "title": "UPnP Subscription Interval",
95
97
  "description": "An interval (in seconds) in which the plugin will resubscribe to UPnP notifications. Must be 60 or more.",
96
98
  "placeholder": 300,
97
- "minimum": 60
99
+ "minimum": 60,
100
+ "maximum": 2073600
98
101
  },
99
102
  "disableUPNP": {
100
103
  "type": "boolean",
@@ -162,6 +165,7 @@
162
165
  "description": "The time in seconds for how long it takes the garage door to open/close. Must be 1 or more.",
163
166
  "placeholder": 20,
164
167
  "minimum": 1,
168
+ "maximum": 2073600,
165
169
  "condition": {
166
170
  "functionBody": "return (model.makerTypes && model.makerTypes[arrayIndices] && model.makerTypes[arrayIndices].makerType === 'garageDoor' && !model.makerTypes[arrayIndices].ignoreDevice);"
167
171
  }
@@ -252,6 +256,7 @@
252
256
  "description": "The plugin will not log device wattage if the time difference (in seconds) from the previous value is less than this number. Must be 1 or more.",
253
257
  "placeholder": 1,
254
258
  "minimum": 1,
259
+ "maximum": 2073600,
255
260
  "condition": {
256
261
  "functionBody": "return (model.wemoInsights && model.wemoInsights[arrayIndices] && model.wemoInsights[arrayIndices].serialNumber && model.wemoInsights[arrayIndices].serialNumber.length > 0 && !model.wemoInsights[arrayIndices].ignoreDevice);"
257
262
  }
@@ -492,6 +497,7 @@
492
497
  "description": "A timer (in seconds) for how long after motion is not detected that the state is changed.",
493
498
  "placeholder": 60,
494
499
  "minimum": 0,
500
+ "maximum": 2073600,
495
501
  "condition": {
496
502
  "functionBody": "return (model.wemoMotions && model.wemoMotions[arrayIndices] && model.wemoMotions[arrayIndices].serialNumber && model.wemoMotions[arrayIndices].serialNumber.length > 0 && !model.wemoMotions[arrayIndices].ignoreDevice);"
497
503
  }
package/lib/platform.js CHANGED
@@ -100,6 +100,9 @@ export default class {
100
100
  const logIncrease = (k, min) => {
101
101
  this.log.warn('%s [%s] %s %s.', platformLang.cfgItem, k, platformLang.cfgLow, min)
102
102
  }
103
+ const logDecrease = (k, max) => {
104
+ this.log.warn('%s [%s] %s %s.', platformLang.cfgItem, k, platformLang.cfgHigh, max)
105
+ }
103
106
  const logQuotes = (k) => {
104
107
  this.log.warn('%s [%s] %s.', platformLang.cfgItem, k, platformLang.cfgQts)
105
108
  }
@@ -133,6 +136,9 @@ export default class {
133
136
  } else if (intVal < platformConsts.minValues[key]) {
134
137
  logIncrease(key, platformConsts.minValues[key])
135
138
  this.config[key] = platformConsts.minValues[key]
139
+ } else if (platformConsts.maxValues[key] !== undefined && intVal > platformConsts.maxValues[key]) {
140
+ logDecrease(key, platformConsts.maxValues[key])
141
+ this.config[key] = platformConsts.maxValues[key]
136
142
  } else {
137
143
  this.config[key] = intVal
138
144
  }
@@ -187,6 +193,9 @@ export default class {
187
193
  } else if (intVal < platformConsts.minValues[k]) {
188
194
  logIncrease(`${key}.${id}.${k}`, platformConsts.minValues[k])
189
195
  this.deviceConf[id][k] = platformConsts.minValues[k]
196
+ } else if (platformConsts.maxValues[k] !== undefined && intVal > platformConsts.maxValues[k]) {
197
+ logDecrease(`${key}.${id}.${k}`, platformConsts.maxValues[k])
198
+ this.deviceConf[id][k] = platformConsts.maxValues[k]
190
199
  } else {
191
200
  this.deviceConf[id][k] = intVal
192
201
  }
@@ -655,7 +664,15 @@ export default class {
655
664
  // *************************** \\
656
665
  // Manually Configured Devices \\
657
666
  // *************************** \\
658
- this.manualDevices.forEach(async (device) => {
667
+ // Awaited, unlike the `forEach(async ...)` this used to be, which threw the
668
+ // promises away. The "still awaiting" warning further down then ran before
669
+ // these probes had finished, so a manually configured device that was about
670
+ // to connect could be reported as one that had not.
671
+ // Still concurrent rather than a for..of loop, because each entry is an
672
+ // independent port scan and running them one after another would drag out
673
+ // discovery. Each callback keeps its own try/catch, so one failure cannot
674
+ // reject the whole batch.
675
+ await Promise.all(this.manualDevices.map(async (device) => {
659
676
  try {
660
677
  // Check to see if the entry is a full address or an IP
661
678
  let deviceIP
@@ -710,7 +727,7 @@ export default class {
710
727
  this.log.warn('[%s] %s: %s.', device, platformLang.connError, eText)
711
728
  }
712
729
  }
713
- })
730
+ }))
714
731
 
715
732
  // ************************ \\
716
733
  // Erroneous Device Logging \\
@@ -44,6 +44,20 @@ export default {
44
44
  wattDiff: 1,
45
45
  },
46
46
 
47
+ // A Node timer holds its delay in a signed 32-bit integer. Over 2147483647 ms
48
+ // it does not throw - it quietly becomes 1 ms, so any of these set past that
49
+ // point would fire a thousand times a second rather than slowly. 2073600
50
+ // seconds is 24 days, comfortably inside the limit once multiplied up.
51
+ maxValues: {
52
+ discoveryInterval: 2073600,
53
+ doorOpenTimer: 2073600,
54
+ makerTimer: 2073600,
55
+ noMotionTimer: 2073600,
56
+ pollingInterval: 2073600,
57
+ timeDiff: 2073600,
58
+ upnpInterval: 2073600,
59
+ },
60
+
47
61
  minValues: {
48
62
  adaptiveLightingShift: -1,
49
63
  discoveryInterval: 15,
@@ -12,6 +12,7 @@ export default {
12
12
  cfgIgn: 'is not configured correctly so ignoring',
13
13
  cfgIgnItem: 'has an invalid entry which will be ignored',
14
14
  cfgItem: 'Config entry',
15
+ cfgHigh: 'is set too high so reducing to',
15
16
  cfgLow: 'is set too low so increasing to',
16
17
  cfgRmv: 'is unused and can be removed',
17
18
  cfgQts: 'should not have quotes around its entry',
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@homebridge-plugins/homebridge-wemo",
3
3
  "alias": "Wemo",
4
4
  "type": "module",
5
- "version": "7.7.1-beta.1",
5
+ "version": "7.7.1",
6
6
  "description": "Homebridge plugin to integrate Wemo devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",
@@ -61,14 +61,14 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@homebridge/plugin-ui-utils": "^2.2.5",
64
- "axios": "^1.18.1",
64
+ "axios": "^1.19.0",
65
65
  "node-ssdp": "^4.0.1",
66
66
  "p-queue": "^9.3.3",
67
67
  "xml2js": "^0.6.2",
68
68
  "xmlbuilder": "^15.1.1"
69
69
  },
70
70
  "devDependencies": {
71
- "@antfu/eslint-config": "^9.2.0",
71
+ "@antfu/eslint-config": "^9.3.0",
72
72
  "@vitest/coverage-v8": "^4.1.10",
73
73
  "vitest": "^4.1.10"
74
74
  }