@homebridge-plugins/homebridge-govee 11.27.0 → 11.27.1-beta.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to `@homebridge-plugins/homebridge-govee` will be documented in this file.
4
4
 
5
+ ## v11.27.1 (Pending Release)
6
+
7
+ ### Changes
8
+
9
+ - fix: only treat fresh real-time gateway records as leak events, not periodic sync records (#1314)
10
+
5
11
  ## v11.27.0 (2026-07-13)
6
12
 
7
13
  ### Changes
package/lib/platform.js CHANGED
@@ -1843,11 +1843,25 @@ export default class {
1843
1843
  return
1844
1844
  }
1845
1845
 
1846
- // 0xEE34 is a gateway subdevice status, laid out as:
1846
+ // 0xEE34 is a gateway subdevice record, laid out as:
1847
1847
  // ee 34 [subdevice number] 02 00 64 1e 14 [seq] [unix time x4] [leak flags x4] 80 00 [checksum]
1848
1848
  if (!hexString.startsWith('ee34') || hexString.length < 36) {
1849
1849
  return
1850
1850
  }
1851
+
1852
+ // The gateway also sends batches of other ee34 records, e.g. during its
1853
+ // periodic sync, whose flag bytes are not live leak states (#1314), so
1854
+ // only accept the real-time status type (0x02) with a current timestamp
1855
+ if (hexString.substring(6, 8) !== '02') {
1856
+ this.log.debug('[AWS] %s [%s].', platformLang.gwRecordType, hexString)
1857
+ return
1858
+ }
1859
+ const recordTime = Number.parseInt(hexString.substring(18, 26), 16)
1860
+ if (Math.abs(Math.round(Date.now() / 1000) - recordTime) > 600) {
1861
+ this.log.debug('[AWS] %s [%s].', platformLang.gwRecordStale, hexString)
1862
+ return
1863
+ }
1864
+
1851
1865
  const subdeviceNo = Number.parseInt(hexString.substring(4, 6), 16)
1852
1866
  const leakDetected = hexString.substring(26, 34) !== '00000000'
1853
1867
 
@@ -83,6 +83,8 @@ export default {
83
83
  disableClient: 'disabling client as',
84
84
  disabledInConfig: 'disabled in config',
85
85
  disabling: 'Disabling plugin',
86
+ gwRecordStale: 'ignoring gateway record with a stale timestamp',
87
+ gwRecordType: 'ignoring gateway record that is not a real-time status',
86
88
  hbVersionFail: 'Your version of Homebridge is too low - please update to v1.6',
87
89
  heaterSimNoSensor: 'you must configure a device ID that provides a temperature reading',
88
90
  httpRetry: 'Unable to reach Govee, retrying in 30 seconds',
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@homebridge-plugins/homebridge-govee",
3
3
  "alias": "Govee",
4
4
  "type": "module",
5
- "version": "11.27.0",
5
+ "version": "11.27.1-beta.0",
6
6
  "description": "Homebridge plugin to integrate Govee devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",