@homebridge-plugins/homebridge-govee 11.32.2-beta.10 → 11.32.2-beta.11

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
@@ -21,6 +21,8 @@ All notable changes to `@homebridge-plugins/homebridge-govee` will be documented
21
21
  - feat: give every appliance type a starting handler, so a new model works for on and off and asks for the rest
22
22
  - refactor: point models that behave identically at one shared handler instead of copies of the same file
23
23
  - fix: stop shipping the test files to npm, since they are only needed in the repository
24
+ - fix: refuse to send a bluetooth command too long to fit in a packet, rather than sending a longer one the device quietly ignores
25
+ - test: record what every supported model turns into, so a change can be shown to have altered nothing
24
26
 
25
27
  ## v11.32.1 (2026-08-02)
26
28
 
@@ -22,6 +22,15 @@ const farToCen = temp => Math.round(((temp - 32) * 5) / 9)
22
22
  */
23
23
  function generateCodeFromHexValues(hexValues, returnAsHexBuffer = false) {
24
24
  const cmdSection = Buffer.from(hexValues.flat())
25
+
26
+ // More than 19 bytes leaves no room for the checksum. Without this the
27
+ // padding length goes negative, which produces an empty pad rather than an
28
+ // error, and the result is a packet longer than 20 bytes that the device
29
+ // will not understand - with nothing said about why
30
+ if (cmdSection.length > 19) {
31
+ throw new Error(`Command is ${cmdSection.length} bytes, which is longer than a packet allows`)
32
+ }
33
+
25
34
  const padSection = Buffer.from(Array.from({ length: 19 - cmdSection.length }).fill(0))
26
35
  const noXSection = Buffer.concat([cmdSection, padSection])
27
36
  let checksum = 0
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.32.2-beta.10",
5
+ "version": "11.32.2-beta.11",
6
6
  "description": "Homebridge plugin to integrate Govee devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",