@homebridge-plugins/homebridge-govee 11.32.2-beta.27 → 11.32.2-beta.28
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
|
@@ -44,7 +44,7 @@ All notable changes to `@homebridge-plugins/homebridge-govee` will be documented
|
|
|
44
44
|
- feat: recognise eleven more meat thermometers, which report what they send so their readings can be worked out, and stop the one already known printing its whole update as a warning
|
|
45
45
|
- feat: add the H5161 power strip and give the H7184 kitchen composter an on and off switch
|
|
46
46
|
- feat: recognise three more sensors, which report what they send, and say plainly in the log why a sensor has no tile yet
|
|
47
|
-
- feat: add ble encryption for the H3001 solar string lights, which silently ignore unencrypted frames (#1328)
|
|
47
|
+
- feat: add ble encryption for the H3001 solar string lights, which silently ignore unencrypted frames (#1328) (@dominick-han)
|
|
48
48
|
|
|
49
49
|
## v11.32.1 (2026-08-02)
|
|
50
50
|
|
package/lib/connection/ble.js
CHANGED
|
@@ -319,7 +319,7 @@ export default class BLEConnection {
|
|
|
319
319
|
* Unlike every other path in this client we need a reply, which arrives as a
|
|
320
320
|
* notification on UUID.NOTIFY. Note that we deliberately do NOT subscribe:
|
|
321
321
|
* these lights push notifications without the client ever writing the client
|
|
322
|
-
* characteristic configuration descriptor
|
|
322
|
+
* characteristic configuration descriptor.
|
|
323
323
|
* Calling subscribeAsync() here makes the descriptor write hang and the light
|
|
324
324
|
* then drops the connection, so listening is both sufficient and required.
|
|
325
325
|
*
|
package/lib/device/sensor-co2.js
CHANGED
|
@@ -9,7 +9,8 @@ import platformLang from '../utils/lang-en.js'
|
|
|
9
9
|
import GoveeDevice from './base.js'
|
|
10
10
|
|
|
11
11
|
// HomeKit triggers "CO2 detected" abnormal flag at this threshold (ppm).
|
|
12
|
-
//
|
|
12
|
+
// 1000 ppm is the usual warning level for these sensors; override it with
|
|
13
|
+
// deviceConf.co2AbnormalThreshold.
|
|
13
14
|
const DEFAULT_CO2_ABNORMAL_PPM = 1000
|
|
14
15
|
|
|
15
16
|
export default class extends GoveeDevice {
|
package/lib/utils/ble-crypto.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The wrapped bluetooth transport that newer Govee devices require.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Most devices take the plain 20-byte frame. These wrap it in AES-128-GCM and
|
|
5
|
+
* silently ignore anything that is not wrapped, which is why a light like the
|
|
6
|
+
* H3001 appears to accept every command and then does nothing at all.
|
|
7
7
|
*
|
|
8
8
|
* Wire format on 00010203-0405-0607-0809-0a0b0c0d2b11 (write) and ...2b10 (notify):
|
|
9
9
|
*
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
import { Buffer } from 'node:buffer'
|
|
32
32
|
import { createCipheriv, createDecipheriv, randomBytes } from 'node:crypto'
|
|
33
33
|
|
|
34
|
-
//
|
|
35
|
-
//
|
|
34
|
+
// Fixed across every device that uses this transport, rather than being tied
|
|
35
|
+
// to an account or a pairing, so no lookup is needed to talk to one.
|
|
36
36
|
const KEY_HANDSHAKE = Buffer.from('fc03783c7c42cb83e202a1643648aff6', 'hex')
|
|
37
37
|
const KEY_DEVICE = Buffer.from('ae028b630bae6ecc4bff1b249e22f955', 'hex')
|
|
38
38
|
|
|
39
|
-
const TAG_LEN = 12 // 96-bit tag
|
|
39
|
+
const TAG_LEN = 12 // 96-bit tag
|
|
40
40
|
const HDR = { MAGIC0: 0xE7, MAGIC1: 0x11, SUB_REQUEST: 0x01, STATUS_OK: 0x00 }
|
|
41
41
|
|
|
42
42
|
/** True if `data` is an e711 handshake frame rather than a data frame. */
|
|
@@ -74,8 +74,8 @@ export const BLE_STAGE_TIMEOUTS = {
|
|
|
74
74
|
connect: 10000,
|
|
75
75
|
write: 5000,
|
|
76
76
|
// Encrypted models exchange a session key before the first real command (see
|
|
77
|
-
// ble-crypto.js).
|
|
78
|
-
//
|
|
77
|
+
// ble-crypto.js). A light answers in about 30ms, so this is a generous
|
|
78
|
+
// ceiling rather than an expected cost.
|
|
79
79
|
// Models that need no handshake never spend any of it.
|
|
80
80
|
handshake: 5000,
|
|
81
81
|
settle: 100, // let the controller transmit before disconnecting
|
|
@@ -56,8 +56,8 @@ const modelOverrides = {
|
|
|
56
56
|
|
|
57
57
|
// Bluetooth-only solar string lights (#1328). Every frame is wrapped in
|
|
58
58
|
// AES-128-GCM, so this model needs the key handshake in ble-crypto.js before
|
|
59
|
-
// any command is accepted. Its colour and brightness formats
|
|
60
|
-
//
|
|
59
|
+
// any command is accepted. Its colour and brightness formats, observed on
|
|
60
|
+
// the wire:
|
|
61
61
|
// colour 33 05 15 01 RR GG BB 00 00 00 00 00 FF (then zero padding)
|
|
62
62
|
// brightness 33 04 <0-100> e.g. 0x1e for 30%, 0x64 for 100%
|
|
63
63
|
// Writes are unacknowledged, so without the wrapper the light silently
|
package/package.json
CHANGED