@homebridge-plugins/homebridge-govee 11.32.2-beta.28 → 11.32.2-beta.29
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 +1 -0
- package/lib/connection/ble.js +12 -7
- package/lib/platform.js +17 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -45,6 +45,7 @@ All notable changes to `@homebridge-plugins/homebridge-govee` will be documented
|
|
|
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
47
|
- feat: add ble encryption for the H3001 solar string lights, which silently ignore unencrypted frames (#1328) (@dominick-han)
|
|
48
|
+
- fix: only mention an unrecognised bluetooth broadcast when the device is on your own account, since a scan also hears the neighbours
|
|
48
49
|
|
|
49
50
|
## v11.32.1 (2026-08-02)
|
|
50
51
|
|
package/lib/connection/ble.js
CHANGED
|
@@ -124,17 +124,22 @@ export default class BLEConnection {
|
|
|
124
124
|
try {
|
|
125
125
|
const { uuid, address, rssi, advertisement } = peripheral
|
|
126
126
|
|
|
127
|
-
//
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
// for an owner to get hold of it.
|
|
127
|
+
// A broadcast this plugin cannot decode is worth reporting rather than
|
|
128
|
+
// dropping in silence, since the hex is the one thing needed to add a
|
|
129
|
+
// model and an owner has no other way to get hold of it.
|
|
131
130
|
if (!isValidPeripheral(peripheral)) {
|
|
132
131
|
const unknownName = advertisement?.localName
|
|
133
132
|
if (unknownName && unknownName.toLowerCase().startsWith('govee')) {
|
|
134
133
|
const raw = advertisement.manufacturerData
|
|
135
134
|
? advertisement.manufacturerData.toString('hex')
|
|
136
135
|
: 'no manufacturer data'
|
|
137
|
-
|
|
136
|
+
|
|
137
|
+
// Bluetooth is a broadcast medium, so this scan hears every Govee
|
|
138
|
+
// device in range - including a neighbour's, which is not something
|
|
139
|
+
// the owner can do anything about. Only a device on this account is
|
|
140
|
+
// worth putting in front of them.
|
|
141
|
+
const isOurs = this.platform.hasBleDevice(address)
|
|
142
|
+
const line = `[BLE] unrecognised broadcast from a govee device - please include this line if you report it: ${JSON.stringify({
|
|
138
143
|
name: unknownName,
|
|
139
144
|
address,
|
|
140
145
|
source: 'BLE',
|
|
@@ -143,8 +148,8 @@ export default class BLEConnection {
|
|
|
143
148
|
})}`
|
|
144
149
|
|
|
145
150
|
// Say it once so it is actually noticed, then stay quiet about this
|
|
146
|
-
//
|
|
147
|
-
if (isFirstReport(`ble|${address}|${raw}`)) {
|
|
151
|
+
// device for the rest of the session - it rebroadcasts constantly.
|
|
152
|
+
if (isOurs && isFirstReport(`ble|${address}|${raw}`)) {
|
|
148
153
|
this.log.warn(line)
|
|
149
154
|
} else {
|
|
150
155
|
this.log.debug(line)
|
package/lib/platform.js
CHANGED
|
@@ -1060,6 +1060,23 @@ export default class {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
|
+
/**
|
|
1064
|
+
* Whether a bluetooth address belongs to one of this account's devices.
|
|
1065
|
+
*
|
|
1066
|
+
* Bluetooth is a broadcast medium: a scan hears every Govee device in range,
|
|
1067
|
+
* including a neighbour's. Without this the plugin cannot tell the two apart,
|
|
1068
|
+
* and asking someone to report a device that is not theirs is noise.
|
|
1069
|
+
*/
|
|
1070
|
+
hasBleDevice(address) {
|
|
1071
|
+
if (!address) {
|
|
1072
|
+
return false
|
|
1073
|
+
}
|
|
1074
|
+
const wanted = String(address).toLowerCase()
|
|
1075
|
+
return [...devicesInHB.values()].some(
|
|
1076
|
+
accessory => String(accessory.context.bleAddress || '').toLowerCase() === wanted,
|
|
1077
|
+
)
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1063
1080
|
configureAccessory(accessory) {
|
|
1064
1081
|
// Set the correct firmware version if we can
|
|
1065
1082
|
if (this.api && accessory.context.firmware) {
|
package/package.json
CHANGED