@homebridge-plugins/homebridge-govee 11.32.2-beta.8 → 11.32.2-beta.9

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,7 @@ 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
+ - docs: keep the structure notes outside the repository, since they are working notes rather than plugin documentation
24
25
 
25
26
  ## v11.32.1 (2026-08-02)
26
27
 
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.8",
5
+ "version": "11.32.2-beta.9",
6
6
  "description": "Homebridge plugin to integrate Govee devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",
@@ -1,66 +0,0 @@
1
- # How this plugin is put together, and how to extend it
2
-
3
- This is the working reference for adding models and functionality. It exists so
4
- that the next change follows the same shape as the last, whoever makes it.
5
-
6
- ## The three ways a model gets support
7
-
8
- **1. It shares behaviour with a model already handled — alias it.**
9
- Nothing new is written. `lib/device/index.js` maps the new model's key to the
10
- existing handler:
11
-
12
- ```text
13
- deviceHumidifierH7147: deviceHumidifierH7143,
14
- ```
15
-
16
- This is the common case. Several Govee models are the same device with a
17
- different name, and a handler copied per model is a handler that has to be fixed
18
- per model.
19
-
20
- **2. It is a new model of a known type, but the details are unknown — let it
21
- say so.** Add it to the model list in `lib/utils/constants.js` and nothing else.
22
- The dispatch falls back to `appliance-basic.js`, which offers on and off (that
23
- command is identical across every Govee appliance) and makes every other control
24
- report what it needs and then fail, so the owner sees it in the Home app, checks
25
- the log, and finds a line to paste into an issue.
26
-
27
- **3. It genuinely behaves differently — write a handler.**
28
- Only when the controls or their commands really differ.
29
-
30
- ## Where model knowledge lives
31
-
32
- Per-model differences belong in data, not in a copied file:
33
-
34
- | File | Holds |
35
- |---|---|
36
- | `lib/utils/constants.js` | which models are which type |
37
- | `lib/utils/device-capabilities.js` | protocol quirks — colour command, brightness scale, and firmware-dependent behaviour |
38
- | `lib/utils/appliance-capabilities.js` | which controls a model actually has |
39
-
40
- If a change means copying a file and editing two lines, it belongs in one of
41
- these instead.
42
-
43
- ## Reporting anything unknown
44
-
45
- Never log an unrecognised payload by hand. Use `lib/utils/report-unknown.js`:
46
-
47
- - `logUnknownData` — something arrived that is not understood
48
- - `reportUnsupportedControl` — the user asked for something not worked out yet
49
-
50
- Both produce one line carrying the model, firmware, hardware, connection and
51
- payload, so a single copy-paste is enough to act on. Both warn once and then
52
- drop to debug, so a device repeating itself does not flood the log.
53
-
54
- ## Things worth knowing before changing appliance code
55
-
56
- - **The power command is universal.** `33 01 01` on, `33 01 00` off, on every
57
- appliance. Safe to send for an untested model.
58
- - **Frames are 20 bytes with an XOR checksum** — byte 20 is the XOR of bytes
59
- 1–19. All 407 shipped appliance commands have been verified against this.
60
- - **A control that silently does nothing is worse than one that fails.** Failing
61
- shows up in the Home app and sends the owner to the log.
62
- - **Do not remove a control a model has offered for a long time** on evidence
63
- alone. Someone may be using it. Confirm with an owner first.
64
- - **HomeKit tiles have requirements.** A humidifier must report a current
65
- humidity, which many Govee humidifiers never send — hence the plain fan tile
66
- by default, and the richer one only when the device says it has the sensor.