homebridge-http-advanced-platform 2.0.0-alpha.6
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/LICENSE +176 -0
- package/README.md +175 -0
- package/config.schema.json +449 -0
- package/dist/accessory.d.ts +27 -0
- package/dist/accessory.js +164 -0
- package/dist/accessory.js.map +1 -0
- package/dist/actions.d.ts +8 -0
- package/dist/actions.js +47 -0
- package/dist/actions.js.map +1 -0
- package/dist/compatibility.d.ts +3 -0
- package/dist/compatibility.js +26 -0
- package/dist/compatibility.js.map +1 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +81 -0
- package/dist/config.js.map +1 -0
- package/dist/coordinator.d.ts +51 -0
- package/dist/coordinator.js +145 -0
- package/dist/coordinator.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/mappers.d.ts +3 -0
- package/dist/mappers.js +116 -0
- package/dist/mappers.js.map +1 -0
- package/dist/metadata.d.ts +5 -0
- package/dist/metadata.js +8 -0
- package/dist/metadata.js.map +1 -0
- package/dist/platform.d.ts +18 -0
- package/dist/platform.js +129 -0
- package/dist/platform.js.map +1 -0
- package/dist/runtime.d.ts +54 -0
- package/dist/runtime.js +376 -0
- package/dist/runtime.js.map +1 -0
- package/dist/settings.d.ts +21 -0
- package/dist/settings.js +51 -0
- package/dist/settings.js.map +1 -0
- package/dist/transport.d.ts +25 -0
- package/dist/transport.js +139 -0
- package/dist/transport.js.map +1 -0
- package/dist/types.d.ts +106 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/dist/ui-config.d.ts +27 -0
- package/dist/ui-config.js +208 -0
- package/dist/ui-config.js.map +1 -0
- package/docs/alpha-release-notes.md +19 -0
- package/docs/legacy-reference.md +678 -0
- package/docs/migration.md +43 -0
- package/docs/modernization.md +211 -0
- package/docs/performance.md +37 -0
- package/docs/service-support.md +47 -0
- package/homebridge-ui/public/index.html +74 -0
- package/homebridge-ui/public/settings.js +132 -0
- package/homebridge-ui/server.js +17 -0
- package/package.json +83 -0
- package/sample-config.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
package/README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Homebridge HTTP Advanced Platform
|
|
2
|
+
|
|
3
|
+
A platform conversion of [staromeste's homebridge-http-advanced-accessory](https://github.com/staromeste/homebridge-http-advanced-accessory), connecting HTTP-controlled devices and web services to Apple Home through Homebridge. The project retains the original Apache-2.0 license, Git history and contributor credit, including the earlier [tasict/homebridge-http-accessory](https://github.com/tasict/homebridge-http-accessory) lineage.
|
|
4
|
+
|
|
5
|
+
**Use platform devices, retain existing accessory configurations, or migrate manually at your own pace.** Keep your `HttpAdvancedAccessory` entries, encoded command URLs, request bodies, hand-written mappings and other settings. The improvements apply to existing accessories without converting them to a platform or upgrading their web server.
|
|
6
|
+
|
|
7
|
+
- **Faster HomeKit reads:** shared cached state lets Apple Home read device status promptly while HTTP refreshes run in the background.
|
|
8
|
+
- **More resilient HTTP handling:** bounded requests, background recovery and quieter logs accommodate slow or temporarily unavailable servers, including older systems you cannot change.
|
|
9
|
+
- **Migration at your pace:** maintain existing accessories through JSON Config, and add platform devices alongside them when useful. The plugin also keeps a requested switch state visible while the server catches up, avoiding a brief reversal caused by stale reads.
|
|
10
|
+
|
|
11
|
+
**Release channel: `2.0.0-alpha.6` is an opt-in Alpha based on preserved Alpha.5.** It changes public package identity and branding while retaining Alpha.5 device behavior. Source checks, isolated installations and Homebridge UI replacement/rollback acceptance have passed; paired Apple Home and live-device soak remain pending. Compatibility applies on the supported runtimes below. Refresh timing changes, and voluntarily converting a device to the platform creates a new HomeKit identity. [Compatibility details](docs/modernization.md#what-non-breaking-means-here) explain those boundaries.
|
|
12
|
+
|
|
13
|
+
[User guide](#user-guide) · [Modernization details](#modernization-details) · [Developer reference](docs/modernization.md#development-and-release-policy)
|
|
14
|
+
|
|
15
|
+
## User guide
|
|
16
|
+
|
|
17
|
+
### Requirements
|
|
18
|
+
|
|
19
|
+
| Component | Supported versions |
|
|
20
|
+
|---|---|
|
|
21
|
+
| Node.js | 22.13 or later in the 22.x line, or 24.x |
|
|
22
|
+
| Homebridge | 1.11.4 or later in the 1.x line, or 2.4 or later in the 2.x line |
|
|
23
|
+
|
|
24
|
+
Older environments need a runtime upgrade before testing this Alpha. Plugin 1.3.0 is the stable compatibility baseline. If you also upgrade Homebridge itself, check the [service compatibility list](docs/service-support.md) for historical services removed by newer HAP versions.
|
|
25
|
+
|
|
26
|
+
### Install or upgrade
|
|
27
|
+
|
|
28
|
+
Back up Homebridge first, including configuration, cached accessories and pairing data. This is a separate npm package, not an automatic update to the original accessory package. Follow the [replacement and rollback guide](docs/migration.md) before changing an existing installation.
|
|
29
|
+
|
|
30
|
+
Check the [npm version list](https://www.npmjs.com/package/homebridge-http-advanced-platform?activeTab=versions) and matching [GitHub prerelease](https://github.com/shanemcw/homebridge-http-advanced-platform/releases) before installing. The registry instructions below apply once the Alpha is published; a local candidate archive alone does not establish public availability.
|
|
31
|
+
|
|
32
|
+
In **Homebridge UI 5.29.0**, open **Plugins** and search for `homebridge-http-advanced-platform`. Choose its install icon, then select **alpha / v2.0.0-alpha.6** in the version chooser. After installation, use **Manage Version** to select a later Alpha deliberately. Descriptive searches such as **HTTP Advanced** or **HTTP accessory** depend on npm indexing; searching the exact original package name still finds the original accessory package. The exact new-package card may show an empty default-version label while this package has only an `alpha` tag; select the tagged version in the chooser.
|
|
33
|
+
|
|
34
|
+
For command-line installation, use `homebridge-http-advanced-platform@alpha`, or pin the reviewed version as shown below. Use the same plugin location and account your Homebridge installation already uses; `/var/lib/homebridge` is an example prefix:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
npm install --prefix /var/lib/homebridge --omit=dev --ignore-scripts homebridge-http-advanced-platform@2.0.0-alpha.6
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Before publication, install the locally reviewed archive instead:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
npm install --prefix /var/lib/homebridge --omit=dev --ignore-scripts /path/to/homebridge-http-advanced-platform-2.0.0-alpha.6.tgz
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This package has no stable release or `latest` tag yet. An install without an explicit tag/version is not the Alpha installation path. Its release tags are separate from the original accessory package's tags. Public registry indexing and the complete UI-to-registry install flow will be checked at launch; the Alpha-only version selection was rehearsed with isolated registry data and Homebridge UI 5.29.0's actual service and version-chooser logic.
|
|
47
|
+
|
|
48
|
+
Preserve Homebridge storage and bridge identity. Remove the old plugin package as part of the backed-up replacement before starting Homebridge with the new package; loading both would make their shared configuration aliases ambiguous. See the migration guide for package-qualified entries and plugin allowlists. Restart Homebridge and its UI, then verify devices, state updates, controls and existing automations. Installed UI and managed-child-bridge acceptance passed in an isolated Node 24/Homebridge 2 fixture with HAP disabled; paired Apple Home identity and live controls still need acceptance.
|
|
49
|
+
|
|
50
|
+
### Keep using existing accessories
|
|
51
|
+
|
|
52
|
+
Existing devices stay in `accessories[]`. Unqualified aliases remain unchanged; update any explicit old package prefixes as described in the migration guide. A basic definition looks like this:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"accessory": "HttpAdvancedAccessory",
|
|
57
|
+
"name": "Example Switch",
|
|
58
|
+
"service": "Switch",
|
|
59
|
+
"urls": {
|
|
60
|
+
"getOn": { "url": "http://device.example/state" },
|
|
61
|
+
"setOn": { "url": "http://device.example/set/{value}" }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Keep each existing accessory's name, alias and service definition unchanged when upgrading to preserve its identity. Your existing GET/POST methods, bodies, encoded strings, mapper chains, optional characteristics and property settings remain supported. See the [action and HTTP reference](docs/modernization.md#actions-and-http), [mapper reference](docs/modernization.md#mappers) and [legacy examples](docs/legacy-reference.md) for more elaborate configurations.
|
|
67
|
+
|
|
68
|
+
### Maintain configuration in the UI or JSON
|
|
69
|
+
|
|
70
|
+
The plugin settings screen brings three areas together:
|
|
71
|
+
|
|
72
|
+
| Area | What you maintain |
|
|
73
|
+
|---|---|
|
|
74
|
+
| **Legacy accessories** | An accessory count and expandable name list, with directions to **JSON Config** for individual editing. |
|
|
75
|
+
| **Shared settings** | Timing, request limits and recovery defaults for both accessories and platforms. |
|
|
76
|
+
| **Optional platforms** | Separate platform definitions, with an enable checkbox for each. |
|
|
77
|
+
|
|
78
|
+
To edit, add or delete a legacy accessory, choose **JSON Config** from the plugin menu. Each accessory has its own bounded JSON editor, including custom fields, encoded commands and mappings. **Back to plugin menu** closes Plugin Config after you save any pending changes.
|
|
79
|
+
|
|
80
|
+
Choose **Save all settings** inside Plugin Config to save shared settings and optional platforms, then restart Homebridge to apply changes. Legacy accessory definitions stay unchanged. A changed save keeps a private configuration backup and preserves unrelated plugins and bridge settings. Avoid editing the same configuration from multiple windows at once.
|
|
81
|
+
|
|
82
|
+
You can also maintain `config.json` directly through Homebridge's JSON editor. Existing entries remain in `accessories[]`; platform entries use `platforms[]`; shared defaults use the top-level `httpAdvanced` object. Simply opening the UI or starting the plugin does not migrate or rewrite your configuration.
|
|
83
|
+
|
|
84
|
+
### Add a platform when you choose
|
|
85
|
+
|
|
86
|
+
Use **Also use as a platform** in the settings screen, or add an `HttpAdvanced` entry to `platforms[]`. You can start with a new device while keeping all existing accessories as they are:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"platform": "HttpAdvanced",
|
|
91
|
+
"name": "HTTP Advanced",
|
|
92
|
+
"enabled": true,
|
|
93
|
+
"devices": [
|
|
94
|
+
{
|
|
95
|
+
"id": "new-platform-light",
|
|
96
|
+
"name": "New Platform Light",
|
|
97
|
+
"service": "Switch",
|
|
98
|
+
"urls": {
|
|
99
|
+
"getOn": { "url": "http://another-device.example/state" },
|
|
100
|
+
"setOn": { "url": "http://another-device.example/set/{value}" }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Choose a permanent device `id` before pairing, and keep the platform name stable. The device's display name can then change without changing its platform identity. Disabling a platform keeps its definitions and cached identities but stops device updates.
|
|
108
|
+
|
|
109
|
+
**Accessories and platforms can coexist for different devices.** Do not define the same physical device in both places. Moving an existing accessory into a platform is an optional, deliberate conversion: it creates a different HomeKit identity and may require reassigning rooms, scenes and automations. There is no automatic identity-preserving migration tool in this Alpha. Follow the [migration guide](docs/migration.md) if you choose to convert devices.
|
|
110
|
+
|
|
111
|
+
### Tune shared settings
|
|
112
|
+
|
|
113
|
+
The built-in defaults work with either configuration style; no platform is required. Leave UI fields blank to use them, or add the following top-level object to your existing `config.json`:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"httpAdvanced": {
|
|
118
|
+
"requestTimeout": 10000,
|
|
119
|
+
"uriCallsDelay": 0,
|
|
120
|
+
"setterDelay": 0,
|
|
121
|
+
"writeConfirmationTimeout": 10000,
|
|
122
|
+
"refresh": { "activeInterval": 5, "idleInterval": 60, "idleAfter": 60 },
|
|
123
|
+
"coordinator": { "concurrency": 4, "perOrigin": 2, "maxQueue": 256 },
|
|
124
|
+
"recovery": { "retryInterval": 5, "maxRetryInterval": 30, "quietPeriod": 90, "reminderInterval": 300 }
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Request timeout, request spacing, debounce and write confirmation are **milliseconds**. Refresh and recovery intervals are **seconds**. Existing device/action overrides take precedence over their shared defaults; positive legacy `forceRefreshDelay` still controls the normal polling interval.
|
|
130
|
+
|
|
131
|
+
| If you need to… | Setting to consider |
|
|
132
|
+
|---|---|
|
|
133
|
+
| Allow a slow background HTTP response more time | Increase `requestTimeout`; an individual action's `timeout` overrides it. This does not extend HomeKit's own request budget. |
|
|
134
|
+
| Space requests to an older server | Increase `uriCallsDelay`, or reduce the shared `coordinator.perOrigin` limit. |
|
|
135
|
+
| Allow the server more time to reflect a successful command | Adjust `writeConfirmationTimeout`; the default is 10000 ms after HTTP success. |
|
|
136
|
+
| Combine a burst of changes into the last command | Set `setterDelay` to a positive debounce delay. |
|
|
137
|
+
| Balance freshness with background traffic | Adjust `refresh.activeInterval` and `refresh.idleInterval`, or retain a device's explicit `forceRefreshDelay`. |
|
|
138
|
+
|
|
139
|
+
Shared defaults also apply to legacy child bridges. [The technical reference](docs/modernization.md#shared-settings-and-precedence) covers precedence, units and scheduling boundaries.
|
|
140
|
+
|
|
141
|
+
### What to expect in Apple Home
|
|
142
|
+
|
|
143
|
+
Device reads return the latest known state promptly. Background HTTP requests refresh it independently, so a fast HomeKit response can still contain an older observation. On startup, a device without saved or newly acquired state reports a communication error until its first usable response.
|
|
144
|
+
|
|
145
|
+
When you change a value, the plugin keeps the requested value visible during debounce and the HTTP request, then for up to ten seconds by default while waiting for confirmation. A matching getter response ends that window early. If the command fails or the window expires, HomeKit returns to the latest observed state, or an error if none is known. This handles servers that acknowledge a command before reporting its new state. Failed commands are never automatically replayed.
|
|
146
|
+
|
|
147
|
+
During a temporary outage, the plugin retries background reads with backoff and keeps known state available, unless your configuration explicitly supplies an error fallback. Short interruptions stay quiet in normal logs. Default outage warnings start after 90 seconds, with reminders at most every five minutes. Recovery can continue beyond 30 seconds; the plugin does not require a gateway upgrade or special retry headers.
|
|
148
|
+
|
|
149
|
+
### Troubleshooting and rollback
|
|
150
|
+
|
|
151
|
+
| Symptom | Check first |
|
|
152
|
+
|---|---|
|
|
153
|
+
| Unknown state after startup | Endpoint reachability and getter mapper output. |
|
|
154
|
+
| State is older than expected | Refresh interval, cache age, queue depth and outage backoff. |
|
|
155
|
+
| A toggle returns to its old state | Whether the write failed, the server applied it, or the confirmation window expired. |
|
|
156
|
+
| Busy/error text becomes an unexpected value | The mapper chain and optional `responsePattern`, `requireResponseMatch` or `strictHTTP` settings. See [servers you cannot change](docs/modernization.md#servers-you-cannot-change). |
|
|
157
|
+
| Configuration does not load | Service support, action names, mapper syntax and duplicate platform IDs. |
|
|
158
|
+
|
|
159
|
+
Set `debug: true` on one device to enable a shared diagnostic snapshot every 30 seconds. It includes request timing, queue usage, cache ages and recovery status. Shared messages use **HTTP Advanced** as their log prefix; device-specific messages retain their accessory name. Diagnostics omit URLs, credentials, request bodies and device values, and are not sent externally.
|
|
160
|
+
|
|
161
|
+
For a report, include plugin, Homebridge and Node versions plus sanitized diagnostics. The [measurement guide](docs/performance.md) explains how to compare responsiveness and freshness together.
|
|
162
|
+
|
|
163
|
+
To roll back, reinstall the 1.3.0 baseline through the same plugin-management path and restart Homebridge. Legacy-only users retain their definitions and storage. If you introduced platform devices, follow the [rollback instructions](docs/migration.md#rollback) and use the relevant backup. Preserve pairing and identifier storage during an ordinary plugin rollback.
|
|
164
|
+
|
|
165
|
+
## Modernization details
|
|
166
|
+
|
|
167
|
+
The [modernization and developer reference](docs/modernization.md) contains the fine print:
|
|
168
|
+
|
|
169
|
+
- What compatibility preserves, and which runtime behaviors change.
|
|
170
|
+
- Shared caching, persistence, polling, request scheduling and outage recovery.
|
|
171
|
+
- HTTP actions, older-server response handling, writes, templates and all five mapper types.
|
|
172
|
+
- Service support, optional characteristics, configuration editing and platform lifecycle.
|
|
173
|
+
- Benchmark interpretation, development commands, test coverage and release policy.
|
|
174
|
+
|
|
175
|
+
The [Alpha release notes](docs/alpha-release-notes.md) summarize this candidate and its remaining release gates. The project retains its existing [Apache-2.0 license](LICENSE) and historical authorship.
|