@homebridge-plugins/homebridge-resideo 3.0.3-beta.8 → 3.1.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/.github/ISSUE_TEMPLATE/config.yml +1 -1
- package/.github/copilot-instructions.md +239 -183
- package/.github/labeler.yml +3 -14
- package/.github/scripts/npm-version-script-esm-auto.js +201 -0
- package/.github/scripts/resolve-version-bump-esm.js +118 -0
- package/.github/workflows/release.yml +147 -13
- package/CHANGELOG.md +10 -30
- package/README.md +7 -21
- package/config.schema.json +111 -2
- package/dist/{platform.d.ts → Platform.HAP.d.ts} +7 -5
- package/dist/Platform.HAP.d.ts.map +1 -0
- package/dist/{platform.js → Platform.HAP.js} +30 -28
- package/dist/Platform.HAP.js.map +1 -0
- package/dist/Platform.HAP.test.d.ts +2 -0
- package/dist/Platform.HAP.test.d.ts.map +1 -0
- package/dist/{platform.test.js → Platform.HAP.test.js} +7 -7
- package/dist/Platform.HAP.test.js.map +1 -0
- package/dist/Platform.Matter.d.ts +50 -0
- package/dist/Platform.Matter.d.ts.map +1 -0
- package/dist/Platform.Matter.js +125 -0
- package/dist/Platform.Matter.js.map +1 -0
- package/dist/devices/device.d.ts +1 -1
- package/dist/devices/device.d.ts.map +1 -1
- package/dist/devices/device.js +2 -2
- package/dist/devices/device.js.map +1 -1
- package/dist/devices/leaksensors.d.ts +1 -1
- package/dist/devices/leaksensors.d.ts.map +1 -1
- package/dist/devices/leaksensors.js +2 -2
- package/dist/devices/leaksensors.js.map +1 -1
- package/dist/devices/roomsensors.d.ts +1 -1
- package/dist/devices/roomsensors.d.ts.map +1 -1
- package/dist/devices/roomsensors.js +2 -2
- package/dist/devices/roomsensors.js.map +1 -1
- package/dist/devices/roomsensorthermostats.d.ts +1 -1
- package/dist/devices/roomsensorthermostats.d.ts.map +1 -1
- package/dist/devices/roomsensorthermostats.js +14 -14
- package/dist/devices/roomsensorthermostats.js.map +1 -1
- package/dist/devices/thermostats.d.ts +1 -1
- package/dist/devices/thermostats.d.ts.map +1 -1
- package/dist/devices/thermostats.js +61 -94
- package/dist/devices/thermostats.js.map +1 -1
- package/dist/devices/valve.d.ts +1 -1
- package/dist/devices/valve.d.ts.map +1 -1
- package/dist/devices/valve.js +4 -6
- package/dist/devices/valve.js.map +1 -1
- package/dist/homebridge-ui/public/index.html +248 -226
- package/dist/homebridge-ui/server.d.ts.map +1 -1
- package/dist/homebridge-ui/server.js +0 -217
- package/dist/homebridge-ui/server.js.map +1 -1
- package/dist/http-client.d.ts +30 -0
- package/dist/http-client.d.ts.map +1 -0
- package/dist/http-client.js +109 -0
- package/dist/http-client.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.test.js +2 -3
- package/dist/index.test.js.map +1 -1
- package/dist/settings.d.ts +11 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/utils.d.ts +12 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +36 -4
- package/dist/utils.js.map +1 -1
- package/dist/utils.test.js +74 -3
- package/dist/utils.test.js.map +1 -1
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +3 -3
- package/docs/assets/style.css +3 -3
- package/docs/index.html +16 -20
- package/docs/variables/default.html +1 -1
- package/eslint.config.js +7 -8
- package/package.json +20 -22
- package/.github/npm-version-script-esm.js +0 -97
- package/.github/workflows/beta-release.yml +0 -55
- package/.github/workflows/build.yml +0 -18
- package/.github/workflows/changerelease.yml +0 -11
- package/.github/workflows/labeler.yml +0 -9
- package/.github/workflows/release-drafter.yml +0 -14
- package/dist/homebridge-ui/public/lib/featureoptions.js +0 -455
- package/dist/homebridge-ui/public/lib/featureoptions.js.map +0 -1
- package/dist/homebridge-ui/public/lib/webUi-featureoptions.mjs +0 -3765
- package/dist/homebridge-ui/public/lib/webUi.mjs +0 -189
- package/dist/platform.d.ts.map +0 -1
- package/dist/platform.js.map +0 -1
- package/dist/platform.test.d.ts +0 -2
- package/dist/platform.test.d.ts.map +0 -1
- package/dist/platform.test.js.map +0 -1
- package/dist/resideo-options.d.ts +0 -24
- package/dist/resideo-options.d.ts.map +0 -1
- package/dist/resideo-options.js +0 -215
- package/dist/resideo-options.js.map +0 -1
|
@@ -1,204 +1,260 @@
|
|
|
1
1
|
# Homebridge Resideo Plugin
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
|
|
6
|
-
|
|
7
|
-
## Branching and Release Strategy
|
|
8
|
-
|
|
9
|
-
### Beta Branch Targeting
|
|
10
|
-
**IMPORTANT**: All pull requests must be directed at a branch that starts with "beta-" first, never directly to the main/latest branch.
|
|
11
|
-
|
|
12
|
-
#### Branch Creation Rules
|
|
13
|
-
- If no appropriate beta branch exists, create one based on the semantic versioning type:
|
|
14
|
-
- **patch** (bug fixes): Create `beta-X.Y.Z+1` (e.g., `beta-3.0.3` from current `3.0.2`)
|
|
15
|
-
- **minor** (new features): Create `beta-X.Y+1.0` (e.g., `beta-3.1.0` from current `3.0.2`)
|
|
16
|
-
- **major** (breaking changes): Create `beta-X+1.0.0` (e.g., `beta-4.0.0` from current `3.0.2`)
|
|
17
|
-
|
|
18
|
-
#### Required Labels
|
|
19
|
-
Before assigning any issue to Copilot, the following labels **must** be set to determine the change type:
|
|
20
|
-
- `patch` - for bug fixes and small improvements (no API changes)
|
|
21
|
-
- `minor` - for new features (backward compatible API additions)
|
|
22
|
-
- `major` - for breaking changes (incompatible API changes)
|
|
23
|
-
|
|
24
|
-
#### Workflow
|
|
25
|
-
1. Check issue has required semantic versioning label (`patch`, `minor`, or `major`)
|
|
26
|
-
2. Identify or create appropriate beta branch based on the label
|
|
27
|
-
3. Target all work to the beta branch, not main/latest
|
|
28
|
-
4. Beta branches will be merged to main/latest after testing and validation
|
|
29
|
-
|
|
30
|
-
#### Examples
|
|
31
|
-
- Current version: `3.0.2`
|
|
32
|
-
- Existing beta branch: `beta-3.0.3` (for patch releases)
|
|
33
|
-
- For a **bug fix** with `patch` label: Use existing `beta-3.0.3` or create `beta-3.0.4`
|
|
34
|
-
- For a **new feature** with `minor` label: Create `beta-3.1.0`
|
|
35
|
-
- For a **breaking change** with `major` label: Create `beta-4.0.0`
|
|
36
|
-
|
|
37
|
-
#### Creating Beta Branches
|
|
38
|
-
If no appropriate beta branch exists, create one using:
|
|
39
|
-
```bash
|
|
40
|
-
git checkout latest # Start from latest stable
|
|
41
|
-
git checkout -b beta-X.Y.Z # Create new beta branch
|
|
42
|
-
git push -u origin beta-X.Y.Z # Push to remote
|
|
43
|
-
```
|
|
3
|
+
Always reference these instructions first and fall back to search only when the repo contents do not answer the question.
|
|
44
4
|
|
|
45
|
-
|
|
46
|
-
**Before assigning any issue to Copilot:**
|
|
47
|
-
1. Verify the issue has one of the required semantic versioning labels (`patch`, `minor`, `major`)
|
|
48
|
-
2. If missing, add the appropriate label based on the change type
|
|
49
|
-
3. Confirm the target beta branch exists or needs to be created
|
|
50
|
-
4. Only then assign the issue to Copilot for implementation
|
|
5
|
+
This is a Homebridge platform plugin for Resideo and Honeywell Home devices. The plugin is written in TypeScript, talks to the Resideo cloud API over OAuth, and exposes supported devices to HomeKit through Homebridge.
|
|
51
6
|
|
|
52
|
-
|
|
7
|
+
Current focus: keep the HAP integration stable, keep the Homebridge UI account-linking flow working, and preserve existing thermostat, room sensor, leak sensor, and shutoff valve behavior.
|
|
53
8
|
|
|
54
|
-
|
|
55
|
-
- Ensure Node.js 20+ or 22+ is installed (current requirement from package.json engines field)
|
|
56
|
-
- Use npm 10+ for package management
|
|
9
|
+
## Device Support
|
|
57
10
|
|
|
58
|
-
###
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
11
|
+
### Currently Supported Devices
|
|
12
|
+
- Thermostats with HomeKit exposure through the main accessory flow
|
|
13
|
+
- T9 and T10 room sensors exposed as separate accessories when enabled
|
|
14
|
+
- T9 and T10 room-priority virtual thermostat accessories when configured
|
|
15
|
+
- Leak detectors
|
|
16
|
+
- Shutoff valves
|
|
64
17
|
|
|
65
|
-
###
|
|
66
|
-
- `
|
|
67
|
-
- `
|
|
68
|
-
- `
|
|
69
|
-
- `npx vitest run` -- runs actual unit tests. Takes ~1 second. **NOTE**: Some tests currently fail due to pre-existing mocking issues in platform.test.ts and a rounding issue in utils.test.ts. These failures are unrelated to code changes and should be ignored.
|
|
18
|
+
### Device Classes Seen In Code
|
|
19
|
+
- `Thermostat`
|
|
20
|
+
- `LeakDetector`
|
|
21
|
+
- `ShutoffValve`
|
|
70
22
|
|
|
71
|
-
###
|
|
72
|
-
-
|
|
73
|
-
-
|
|
23
|
+
### Important Notes
|
|
24
|
+
- This repository is currently HAP-only. There is no Matter platform implementation in this codebase.
|
|
25
|
+
- Room sensors are discovered from thermostat group data, not as top-level standalone devices.
|
|
26
|
+
- Unsupported devices are logged from `src/platform.ts` and should be added through the platform discovery switch plus a dedicated device class.
|
|
74
27
|
|
|
75
|
-
|
|
76
|
-
- `npm run watch` -- development mode with nodemon for auto-rebuilding during development.
|
|
77
|
-
- Build output is in `dist/` directory and mirrors `src/` structure.
|
|
78
|
-
- The main plugin entry point is `dist/index.js` which exports the platform registration function.
|
|
79
|
-
- **Always work on beta branches**: PRs should target beta branches, never main/latest directly.
|
|
80
|
-
- **Use semantic versioning**: Ensure the target beta branch matches the change type (patch/minor/major).
|
|
28
|
+
## Homebridge and API Integration
|
|
81
29
|
|
|
82
|
-
|
|
30
|
+
### Platform Model
|
|
31
|
+
- The plugin registers a single dynamic platform through `ResideoPlatform` in `src/platform.ts`.
|
|
32
|
+
- `src/index.ts` only registers the platform and contains no business logic.
|
|
33
|
+
- Device discovery happens after `didFinishLaunching`, once an access token is refreshed.
|
|
83
34
|
|
|
84
|
-
|
|
35
|
+
### OAuth Flow
|
|
36
|
+
- The Homebridge UI custom server in `src/homebridge-ui/server.ts` starts a temporary local HTTP server on port `8585`.
|
|
37
|
+
- The UI redirects the user to the Resideo authorize endpoint, receives the authorization code, and exchanges it for tokens.
|
|
38
|
+
- The platform refreshes the access token at runtime and writes back a new refresh token into Homebridge `config.json` when it changes.
|
|
85
39
|
|
|
86
|
-
###
|
|
87
|
-
-
|
|
88
|
-
-
|
|
40
|
+
### Authoritative References
|
|
41
|
+
- Resideo developer setup in `README.md`
|
|
42
|
+
- OAuth and API endpoints in `src/settings.ts`
|
|
43
|
+
- Homebridge schema and UI behavior in `config.schema.json` and `src/homebridge-ui/server.ts`
|
|
89
44
|
|
|
90
|
-
|
|
91
|
-
- ALWAYS run `npm run lint` before committing changes or the CI will fail.
|
|
92
|
-
- Run `npm run lint:fix` to automatically fix style issues.
|
|
93
|
-
- Optionally run `npx vitest run` but ignore pre-existing test failures in platform.test.ts and utils.test.ts.
|
|
45
|
+
## Changelog Format Requirements
|
|
94
46
|
|
|
95
|
-
|
|
96
|
-
Since this is a Homebridge plugin that requires real Resideo devices and API credentials:
|
|
97
|
-
- **Cannot fully test device functionality** without valid Resideo developer account and actual devices.
|
|
98
|
-
- **Cannot test OAuth flow** without proper Resideo API credentials.
|
|
99
|
-
- **Can test**: Plugin loading, configuration schema validation, and basic TypeScript compilation.
|
|
100
|
-
- **Plugin Architecture Validation**: The built plugin should export a default function that accepts an API parameter for Homebridge platform registration.
|
|
47
|
+
When generating a changelog entry for this repository, always use the homebridge-resideo compare URLs, not another plugin's URLs.
|
|
101
48
|
|
|
102
|
-
|
|
49
|
+
Use this release header format:
|
|
103
50
|
|
|
104
|
-
|
|
51
|
+
```md
|
|
52
|
+
## [X.Y.Z](https://github.com/homebridge-plugins/homebridge-resideo/compare/vX.Y.(Z-1)...vX.Y.Z) (YYYY-MM-DD)
|
|
105
53
|
```
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
│ ├── thermostats.ts # Thermostat device implementation
|
|
114
|
-
│ ├── leaksensors.ts # Leak sensor device implementation
|
|
115
|
-
│ ├── roomsensors.ts # Room sensor device implementation
|
|
116
|
-
│ ├── roomsensorthermostats.ts # Room sensor thermostat combo
|
|
117
|
-
│ └── valve.ts # Valve device implementation
|
|
118
|
-
└── homebridge-ui/ # Web UI for plugin configuration
|
|
119
|
-
├── server.ts # UI server for OAuth setup
|
|
120
|
-
└── public/index.html # UI frontend
|
|
54
|
+
|
|
55
|
+
Use standard sections as needed, such as `### Bug Fixes`, `### Enhancements`, or `### Documentation`.
|
|
56
|
+
|
|
57
|
+
End each release entry with:
|
|
58
|
+
|
|
59
|
+
```md
|
|
60
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-resideo/compare/vX.Y.(Z-1)...vX.Y.Z
|
|
121
61
|
```
|
|
122
62
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
63
|
+
If the previous version is not known, inspect `CHANGELOG.md` before drafting the entry.
|
|
64
|
+
|
|
65
|
+
## Working Effectively
|
|
66
|
+
|
|
67
|
+
### Bootstrap and Build
|
|
68
|
+
- Install dependencies: `npm install`
|
|
69
|
+
- Build the project: `npm run build`
|
|
70
|
+
- Clean build artifacts: `npm run clean`
|
|
71
|
+
- Copy the Homebridge UI file into `dist`: `npm run plugin-ui`
|
|
72
|
+
- Full publish pipeline: `npm run prepublishOnly`
|
|
73
|
+
|
|
74
|
+
### Testing and Quality Assurance
|
|
75
|
+
- Lint code: `npm run lint`
|
|
76
|
+
- Fix lint issues: `npm run lint:fix`
|
|
77
|
+
- Package `test` currently aliases lint: `npm run test` runs `npm run lint`
|
|
78
|
+
- Vitest is installed and test files exist under `src/`, but there is no dedicated `package.json` script for them right now
|
|
79
|
+
- Generate docs: `npm run docs`
|
|
80
|
+
- Validate docs: `npm run lint-docs`
|
|
81
|
+
|
|
82
|
+
### Development Workflow
|
|
83
|
+
- Development mode: `npm run watch`
|
|
84
|
+
- `npm run watch` builds, copies the UI file, links the plugin locally, and starts `nodemon`
|
|
85
|
+
- The Homebridge UI is backed by a single static file at `src/homebridge-ui/public/index.html`
|
|
86
|
+
- Always run `npm run build` after source changes
|
|
87
|
+
- Always run `npm run lint` before finishing a code change
|
|
88
|
+
|
|
89
|
+
## Validation
|
|
90
|
+
|
|
91
|
+
After making code changes, validate with:
|
|
92
|
+
1. `npm run build`
|
|
93
|
+
2. `npm run lint`
|
|
94
|
+
3. `npm run test`
|
|
95
|
+
|
|
96
|
+
If you changed generated-doc comments or documentation-sensitive types, also run:
|
|
97
|
+
4. `npm run docs`
|
|
98
|
+
5. `npm run lint-docs`
|
|
99
|
+
|
|
100
|
+
If you changed the UI login flow, also validate the Homebridge UI account-linking path.
|
|
101
|
+
|
|
102
|
+
## Important Directories and Files
|
|
103
|
+
|
|
104
|
+
### Source Code Structure
|
|
105
|
+
- `src/index.ts` - Homebridge entry point
|
|
106
|
+
- `src/platform.ts` - Main platform, OAuth refresh, discovery, accessory registration, retry and logging behavior
|
|
107
|
+
- `src/settings.ts` - Plugin constants, config types, API URLs, and device-related TypeScript interfaces
|
|
108
|
+
- `src/utils.ts` - Utility helpers such as temperature conversion
|
|
109
|
+
- `src/devices/thermostats.ts` - Thermostat accessory implementation
|
|
110
|
+
- `src/devices/roomsensors.ts` - Room sensor accessory implementation
|
|
111
|
+
- `src/devices/roomsensorthermostats.ts` - Virtual thermostat accessory for room-priority flows
|
|
112
|
+
- `src/devices/leaksensors.ts` - Leak sensor accessory implementation
|
|
113
|
+
- `src/devices/valve.ts` - Shutoff valve accessory implementation
|
|
114
|
+
- `src/homebridge-ui/server.ts` - Custom Homebridge UI backend server for OAuth login
|
|
115
|
+
- `src/homebridge-ui/public/index.html` - Custom Homebridge UI frontend
|
|
116
|
+
|
|
117
|
+
### Tests
|
|
118
|
+
- `src/index.test.ts`
|
|
119
|
+
- `src/platform.test.ts`
|
|
120
|
+
- `src/settings.test.ts`
|
|
121
|
+
- `src/utils.test.ts`
|
|
122
|
+
|
|
123
|
+
### Configuration and Build
|
|
124
|
+
- `package.json`
|
|
125
|
+
- `config.schema.json`
|
|
126
|
+
- `eslint.config.js`
|
|
127
|
+
- `tsconfig.json`
|
|
128
|
+
- `typedoc.json`
|
|
129
|
+
- `nodemon.json`
|
|
130
|
+
- `.github/copilot-instructions.md`
|
|
131
|
+
|
|
132
|
+
### Generated Output
|
|
133
|
+
- `dist/`
|
|
134
|
+
- `docs/`
|
|
135
|
+
|
|
136
|
+
## Dependencies and Requirements
|
|
137
|
+
|
|
138
|
+
### Runtime Requirements
|
|
139
|
+
- Node.js `^20 || ^22`
|
|
140
|
+
- Homebridge `^1.9.0 || ^2.0.0 || ^2.0.0-beta.26 || ^2.0.0-alpha.37`
|
|
141
|
+
|
|
142
|
+
### Key Runtime Dependencies
|
|
143
|
+
- `axios` for Resideo API requests
|
|
144
|
+
- `rxjs` for reactive flows used by device code
|
|
145
|
+
- `@homebridge/plugin-ui-utils` for the Homebridge settings UI server
|
|
146
|
+
|
|
147
|
+
### Key Development Dependencies
|
|
148
|
+
- `typescript`
|
|
149
|
+
- `eslint`
|
|
150
|
+
- `@antfu/eslint-config`
|
|
151
|
+
- `typedoc`
|
|
152
|
+
- `vitest`
|
|
153
|
+
- `nodemon`
|
|
154
|
+
|
|
155
|
+
## Common Development Tasks
|
|
156
|
+
|
|
157
|
+
### Adding New Device Support
|
|
158
|
+
1. Add the device class handling in the discovery switch in `src/platform.ts`.
|
|
159
|
+
2. Create a new implementation under `src/devices/` following the existing accessory classes.
|
|
160
|
+
3. Update `config.schema.json` if the new device requires user-configurable options.
|
|
161
|
+
4. Add or update TypeScript types in `src/settings.ts`.
|
|
162
|
+
5. Make sure cached accessories use a stable UUID pattern.
|
|
163
|
+
6. Validate with `npm run build`, `npm run lint`, and `npm run test`.
|
|
164
|
+
|
|
165
|
+
### Changing Thermostat or Sensor Behavior
|
|
166
|
+
1. Start in `src/platform.ts` to find the controlling discovery and refresh path.
|
|
167
|
+
2. Move into the owning class in `src/devices/thermostats.ts`, `src/devices/roomsensors.ts`, or `src/devices/roomsensorthermostats.ts`.
|
|
168
|
+
3. Keep room sensor logic aligned with the thermostat group APIs used by `getCurrentSensorData()`.
|
|
169
|
+
4. Preserve per-device config overrides from `options.devices`.
|
|
170
|
+
|
|
171
|
+
### Changing the OAuth or UI Flow
|
|
172
|
+
1. Update the frontend in `src/homebridge-ui/public/index.html`.
|
|
173
|
+
2. Update the backend server in `src/homebridge-ui/server.ts`.
|
|
174
|
+
3. Keep the callback path and port handling aligned with the README and schema.
|
|
175
|
+
4. Rebuild so the UI file is copied to `dist`.
|
|
176
|
+
|
|
177
|
+
## Common Issues and Solutions
|
|
178
|
+
|
|
179
|
+
### Build Failures
|
|
180
|
+
- Verify dependencies are installed with `npm install`.
|
|
181
|
+
- Rebuild from clean state with `npm run clean && npm run build`.
|
|
182
|
+
- Remember this project is ESM and local imports use `.js` extensions.
|
|
183
|
+
|
|
184
|
+
### Test Confusion
|
|
185
|
+
- `npm run test` is not a separate unit-test command in this repo; it currently runs lint.
|
|
186
|
+
- If you need to execute Vitest directly, use the local toolchain already present in the repo rather than inventing a new workflow.
|
|
187
|
+
|
|
188
|
+
### OAuth and Login Failures
|
|
189
|
+
- Re-check the Resideo developer app callback URL and credentials.
|
|
190
|
+
- Confirm the temporary local server can bind to port `8585`.
|
|
191
|
+
- If token refresh fails, inspect the stored credentials in Homebridge config and the refresh-token update path in `src/platform.ts`.
|
|
192
|
+
|
|
193
|
+
### Device Discovery Gaps
|
|
194
|
+
- Discovery is location-based through the Resideo API.
|
|
195
|
+
- Room sensors depend on thermostat groups and will not appear unless the thermostat and group data support them.
|
|
196
|
+
- Unsupported `deviceClass` values require new platform handling and a dedicated accessory implementation.
|
|
197
|
+
|
|
198
|
+
Never describe this repository as a Lutron plugin, never mention Matter support as if it exists today, and never reference files such as `Platform.Matter.ts`, `WallDimmer.ts`, `PicoRemote.ts`, or other artifacts that are not present in this workspace.
|
|
199
|
+
|
|
200
|
+
## Matter and HomeKit Integration
|
|
201
|
+
|
|
202
|
+
### Matter Implementation
|
|
203
|
+
The plugin implements dual-mode device registration:
|
|
204
|
+
- **HAP mode** (HomeKit Accessory Protocol): Base implementation via `LutronCasetaLeap` class
|
|
205
|
+
- **Matter mode**: Extended via `LutronCasetaLeapMatterPlatform` class that overrides `processDevice()`
|
|
206
|
+
|
|
207
|
+
When Homebridge's Matter API is available, `LutronCasetaLeapMatterPlatform.processDevice()` registers accessories with both HAP and Matter simultaneously. If Matter API is not available, the plugin transparently falls back to HAP-only mode.
|
|
208
|
+
|
|
209
|
+
### Matter Device Type Mapping
|
|
210
|
+
All Matter device types use `api.matter.deviceTypes.*` objects from the homebridge-matter API:
|
|
211
|
+
|
|
212
|
+
| Device Type | HAP Service | Matter DeviceType | Matter Clusters |
|
|
213
|
+
|---|---|---|---|
|
|
214
|
+
| WallDimmer | Lightbulb | `DimmableLight` | onOff, levelControl |
|
|
215
|
+
| WallSwitch | Switch | `OnOffLight` | onOff |
|
|
216
|
+
| SerenaTiltOnlyWoodBlind | WindowCovering | `WindowCovering` | windowCovering |
|
|
217
|
+
| RPSOccupancySensor | OccupancySensor | `OccupancySensor` | occupancySensing |
|
|
218
|
+
| Pico Remotes | StatelessProgrammableSwitch | `GenericSwitch` | switch |
|
|
219
|
+
|
|
220
|
+
### Authoritative Matter References
|
|
221
|
+
|
|
222
|
+
1. https://matter-js.github.io/docs/index.html
|
|
223
|
+
2. https://github.com/homebridge-plugins/homebridge-matter: Official Homebridge Matter plugin repository with extensive documentation and examples
|
|
224
|
+
- For all Matter cluster, attribute, and device type specifications, use the official homebridge-matter wiki:
|
|
225
|
+
- [Introduction](https://github.com/homebridge-plugins/homebridge-matter/wiki/Introduction)
|
|
226
|
+
- [Core Concepts](https://github.com/homebridge-plugins/homebridge-matter/wiki/Core-Concepts)
|
|
227
|
+
- [Getting Started](https://github.com/homebridge-plugins/homebridge-matter/wiki/Getting-Started)
|
|
228
|
+
- [State Management](https://github.com/homebridge-plugins/homebridge-matter/wiki/State-Management)
|
|
229
|
+
- [Monitoring External Changes](https://github.com/homebridge-plugins/homebridge-matter/wiki/Monitoring-External-Changes)
|
|
230
|
+
- [Best Practices](https://github.com/homebridge-plugins/homebridge-matter/wiki/Best-Practices)
|
|
231
|
+
- [Advanced Patterns](https://github.com/homebridge-plugins/homebridge-matter/wiki/Advanced-Patterns)
|
|
232
|
+
- [API Reference](https://github.com/homebridge-plugins/homebridge-matter/wiki/API-Reference)
|
|
233
|
+
- [Matter Types](https://github.com/homebridge-plugins/homebridge-matter/wiki/Matter-Types)
|
|
234
|
+
- [Value Conversions](https://github.com/homebridge-plugins/homebridge-matter/wiki/Value-Conversions)
|
|
235
|
+
|
|
236
|
+
- **Device References:**
|
|
237
|
+
- [Lighting Devices (§4)](https://github.com/homebridge-plugins/homebridge-matter/wiki/Section-4-Lighting) — DimmableLight, OnOffLight
|
|
238
|
+
- [Switches (§6)](https://github.com/homebridge-plugins/homebridge-matter/wiki/Section-6-Switches) — OnOffSwitch
|
|
239
|
+
- [Sensors (§7)](https://github.com/homebridge-plugins/homebridge-matter/wiki/Section-7-Sensors) — OccupancySensor
|
|
240
|
+
- [Closure Devices (§8)](https://github.com/homebridge-plugins/homebridge-matter/wiki/Section-8-Closure) — WindowCovering
|
|
241
|
+
|
|
242
|
+
## Changelog Format Requirements
|
|
243
|
+
|
|
244
|
+
When generating a changelog release entry, always use this exact structure:
|
|
245
|
+
|
|
246
|
+
1. Release header with compare URL using `compare/tag/vX.Y.Z`:
|
|
247
|
+
|
|
248
|
+
```md
|
|
249
|
+
## [X.Y.Z](https://github.com/homebridge-plugins/homebridge-updater/compare/tag/vX.Y.Z) (YYYY-MM-DD)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
2. Standard sections as needed (`### Bug Fixes`, `### Enhancements`, `### Documentation`, etc.).
|
|
253
|
+
|
|
254
|
+
3. End each release entry with a full changelog comparison URL to the previous version:
|
|
255
|
+
|
|
256
|
+
```md
|
|
257
|
+
**Full Changelog**: https://github.com/homebridge-plugins/homebridge-updater/compare/vX.Y.(Z-1)...vX.Y.Z
|
|
197
258
|
```
|
|
198
259
|
|
|
199
|
-
|
|
200
|
-
- **NEVER CANCEL** any build commands - let them complete fully
|
|
201
|
-
- **ALWAYS** run `npm run lint` before pushing changes to avoid CI failures
|
|
202
|
-
- **DO NOT** attempt to fix pre-existing test failures unrelated to your changes
|
|
203
|
-
- **VALIDATE** that your changes can be built and the plugin can be loaded
|
|
204
|
-
- Use `.js` extensions in TypeScript imports for ES module compatibility
|
|
260
|
+
Do not omit either URL line when creating a new release entry.
|
package/.github/labeler.yml
CHANGED
|
@@ -20,9 +20,9 @@ dependencies:
|
|
|
20
20
|
- any-glob-to-any-file: 'package.json'
|
|
21
21
|
- any-glob-to-any-file: 'package-lock.json'
|
|
22
22
|
|
|
23
|
-
# Add 'beta' label to any PR that is opened against
|
|
23
|
+
# Add 'beta' label to any PR that is opened against the `beta` branch
|
|
24
24
|
beta:
|
|
25
|
-
- base-branch: 'beta
|
|
25
|
+
- base-branch: 'beta*'
|
|
26
26
|
|
|
27
27
|
# Add 'alpha' label to any PR that is opened against the `alpha` branch
|
|
28
28
|
alpha:
|
|
@@ -35,15 +35,4 @@ latest:
|
|
|
35
35
|
# Add 'workflow' to any changes within 'workflow' folder or any subfolders
|
|
36
36
|
workflow:
|
|
37
37
|
- changed-files:
|
|
38
|
-
- any-glob-to-any-file: .github/**
|
|
39
|
-
|
|
40
|
-
# Semantic versioning labels for automated release management
|
|
41
|
-
# These labels should be manually applied before assigning issues to Copilot
|
|
42
|
-
patch:
|
|
43
|
-
- any: [] # Manual assignment only
|
|
44
|
-
|
|
45
|
-
minor:
|
|
46
|
-
- any: [] # Manual assignment only
|
|
47
|
-
|
|
48
|
-
major:
|
|
49
|
-
- any: [] # Manual assignment only
|
|
38
|
+
- any-glob-to-any-file: .github/**
|