@homebridge-plugins/homebridge-meross 10.19.1-beta.0 → 10.19.1-beta.2
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 +5 -0
- package/config.schema.json +1 -0
- package/lib/device/sensor-presence.js +9 -2
- package/lib/platform.js +6 -0
- package/lib/utils/constants.js +8 -0
- package/lib/utils/lang-en.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,11 @@ All notable changes to `@homebridge-plugins/homebridge-meross` will be documente
|
|
|
16
16
|
- fix: stop the polling timers on shutdown for a local-only setup, not just a cloud one
|
|
17
17
|
- fix: stop the garage's quick polling when the door is operated again mid-close
|
|
18
18
|
- fix: apply the smoke sensor's battery reading, instead of failing on every update
|
|
19
|
+
- fix: reject a garage opening time so large it would make the reset timer fire immediately
|
|
20
|
+
- test: record what every device handler builds, so a refactor can be shown to change nothing
|
|
21
|
+
- fix(ms600): stop writing every incoming message to the warning log
|
|
22
|
+
- fix(ms600): accept a light level of zero, so a dark room is reported as dark
|
|
23
|
+
- test: check the device handlers against payloads real devices sent
|
|
19
24
|
|
|
20
25
|
## v10.19.0 (2026-08-01)
|
|
21
26
|
|
package/config.schema.json
CHANGED
|
@@ -1486,6 +1486,7 @@
|
|
|
1486
1486
|
"type": "integer",
|
|
1487
1487
|
"placeholder": "20",
|
|
1488
1488
|
"minimum": 1,
|
|
1489
|
+
"maximum": 2073600,
|
|
1489
1490
|
"condition": {
|
|
1490
1491
|
"functionBody": "return (model.garageDevices && model.garageDevices[arrayIndices] && model.garageDevices[arrayIndices].serialNumber && model.garageDevices[arrayIndices].serialNumber.length === 32 && !model.garageDevices[arrayIndices].ignoreDevice);"
|
|
1491
1492
|
}
|
|
@@ -165,7 +165,11 @@ export default class {
|
|
|
165
165
|
receiveUpdate(params) {
|
|
166
166
|
try {
|
|
167
167
|
// Log the received data
|
|
168
|
-
|
|
168
|
+
// At debug, like every other handler. This sensor pushes a message every
|
|
169
|
+
// few seconds and the whole message is logged, including the header's
|
|
170
|
+
// `sign` - a value derived from the owner's device key - so at warn level
|
|
171
|
+
// it filled the log with traffic nobody asked to see.
|
|
172
|
+
this.accessory.logDebug(`${platformLang.incMQTT}: ${JSON.stringify(params)}`)
|
|
169
173
|
if (params.payload?.latest?.[0]?.data) {
|
|
170
174
|
this.applyUpdate(params.payload.latest[0].data)
|
|
171
175
|
}
|
|
@@ -175,7 +179,10 @@ export default class {
|
|
|
175
179
|
}
|
|
176
180
|
|
|
177
181
|
applyUpdate(data) {
|
|
178
|
-
|
|
182
|
+
// Compared against undefined rather than checked for truth: zero lux is a
|
|
183
|
+
// real reading from a dark room, and skipping it left the sensor showing
|
|
184
|
+
// whatever the light level was when the lights went out.
|
|
185
|
+
if (data.light?.[0]?.value !== undefined) {
|
|
179
186
|
// Check against the cache and update HomeKit and the cache if needed
|
|
180
187
|
const newLux = data.light[0].value
|
|
181
188
|
if (this.cacheLux !== newLux) {
|
package/lib/platform.js
CHANGED
|
@@ -90,6 +90,9 @@ export default class {
|
|
|
90
90
|
const logIncrease = (k, min) => {
|
|
91
91
|
this.log.warn('%s [%s] %s %s.', platformLang.cfgItem, k, platformLang.cfgLow, min)
|
|
92
92
|
}
|
|
93
|
+
const logDecrease = (k, max) => {
|
|
94
|
+
this.log.warn('%s [%s] %s %s.', platformLang.cfgItem, k, platformLang.cfgHigh, max)
|
|
95
|
+
}
|
|
93
96
|
const logQuotes = (k) => {
|
|
94
97
|
this.log.warn('%s [%s] %s.', platformLang.cfgItem, k, platformLang.cfgQts)
|
|
95
98
|
}
|
|
@@ -162,6 +165,9 @@ export default class {
|
|
|
162
165
|
} else if (intVal < platformConsts.minValues[k]) {
|
|
163
166
|
logIncrease(`${key}.${id}.${k}`, platformConsts.minValues[k])
|
|
164
167
|
this.deviceConf[id][k] = platformConsts.minValues[k]
|
|
168
|
+
} else if (platformConsts.maxValues[k] !== undefined && intVal > platformConsts.maxValues[k]) {
|
|
169
|
+
logDecrease(`${key}.${id}.${k}`, platformConsts.maxValues[k])
|
|
170
|
+
this.deviceConf[id][k] = platformConsts.maxValues[k]
|
|
165
171
|
} else {
|
|
166
172
|
this.deviceConf[id][k] = intVal
|
|
167
173
|
}
|
package/lib/utils/constants.js
CHANGED
|
@@ -50,6 +50,14 @@ export default {
|
|
|
50
50
|
refreshRate: 5,
|
|
51
51
|
},
|
|
52
52
|
|
|
53
|
+
// A Node timer holds its delay in a signed 32-bit integer. Over 2147483647 ms
|
|
54
|
+
// it does not throw - it quietly becomes 1 ms. refreshRate and cloudRefreshRate
|
|
55
|
+
// are already capped at 600 further down, but the garage opening time was not,
|
|
56
|
+
// so a large value made the door's reset timer fire immediately and repeatedly.
|
|
57
|
+
maxValues: {
|
|
58
|
+
garageDoorOpeningTime: 2073600,
|
|
59
|
+
},
|
|
60
|
+
|
|
53
61
|
allowed: {
|
|
54
62
|
singleDevices: [
|
|
55
63
|
'name',
|
package/lib/utils/lang-en.js
CHANGED
|
@@ -13,6 +13,7 @@ export default {
|
|
|
13
13
|
cfgIgn: 'is not configured correctly so ignoring',
|
|
14
14
|
cfgIgnItem: 'has an invalid entry which will be ignored',
|
|
15
15
|
cfgItem: 'Config entry',
|
|
16
|
+
cfgHigh: 'is set too high so reducing to',
|
|
16
17
|
cfgLow: 'is set too low so increasing to',
|
|
17
18
|
cfgMoveEntry: 'configuration entry should be moved to appropriate section in the UI',
|
|
18
19
|
cfgRmv: 'is unused and can be removed',
|
package/package.json
CHANGED