homebridge-lanternic 0.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/LICENSE +21 -0
- package/README.md +260 -0
- package/config.schema.json +412 -0
- package/dist/ble/magicLanternBleManager.d.ts +78 -0
- package/dist/ble/magicLanternBleManager.js +325 -0
- package/dist/ble/magicLanternBleManager.js.map +1 -0
- package/dist/ble/magicLanternCommands.d.ts +16 -0
- package/dist/ble/magicLanternCommands.js +49 -0
- package/dist/ble/magicLanternCommands.js.map +1 -0
- package/dist/ble/nobleTypes.d.ts +33 -0
- package/dist/ble/nobleTypes.js +2 -0
- package/dist/ble/nobleTypes.js.map +1 -0
- package/dist/color.d.ts +10 -0
- package/dist/color.js +65 -0
- package/dist/color.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/platform.d.ts +23 -0
- package/dist/platform.js +150 -0
- package/dist/platform.js.map +1 -0
- package/dist/platformAccessory.d.ts +26 -0
- package/dist/platformAccessory.js +139 -0
- package/dist/platformAccessory.js.map +1 -0
- package/dist/settings.d.ts +2 -0
- package/dist/settings.js +3 -0
- package/dist/settings.js.map +1 -0
- package/dist/types.d.ts +62 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/util/async.d.ts +2 -0
- package/dist/util/async.js +24 -0
- package/dist/util/async.js.map +1 -0
- package/dist/util/bluetooth.d.ts +3 -0
- package/dist/util/bluetooth.js +15 -0
- package/dist/util/bluetooth.js.map +1 -0
- package/package.json +81 -0
- package/tools/calibrate.mjs +314 -0
- package/tools/calibrator/app.js +399 -0
- package/tools/calibrator/index.html +91 -0
- package/tools/calibrator/styles.css +302 -0
- package/tools/explore.mjs +73 -0
- package/tools/scan.mjs +88 -0
- package/tools/send-sequence.mjs +76 -0
- package/tools/send.mjs +106 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gibson Bell
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# Homebridge LanternIC
|
|
2
|
+
|
|
3
|
+
Homebridge plugin for BLE RGBIC/RGBWIC light strips controlled by the Magic Lantern app.
|
|
4
|
+
|
|
5
|
+
The goal is a reliable local-only bridge for the common unbranded Magic Lantern strips and lamps. These devices are usually BLE lights, not Magic Home Wi-Fi devices, so this plugin talks directly to the BLE service used by the Magic Lantern app.
|
|
6
|
+
|
|
7
|
+
## Status
|
|
8
|
+
|
|
9
|
+
LanternIC is a hardware-tested pre-release plugin. It is designed for production-style Homebridge use, with the important caveat that these unbranded Magic Lantern BLE strips ship with multiple firmware variants.
|
|
10
|
+
|
|
11
|
+
- HomeKit Lightbulb service
|
|
12
|
+
- On/off with RGB-black fallback plus optional native Magic Lantern power frames
|
|
13
|
+
- Brightness via RGB scaling by default, with optional native Magic Lantern brightness frames
|
|
14
|
+
- HomeKit on/off, brightness, and color control confirmed on a `MELK-OC21WCT31` strip
|
|
15
|
+
- Homebridge UI config schema
|
|
16
|
+
- BLE discovery with log snippets and optional auto-add
|
|
17
|
+
- Serialized BLE writes with timeout, retry/backoff, reconnect, and optional keep-alive
|
|
18
|
+
- Command-builder tests for the known Magic Lantern frames
|
|
19
|
+
- Package smoke tests against Homebridge 1 and 2 on Node.js 22 and 24 in CI
|
|
20
|
+
|
|
21
|
+
Effects, segment control, RGBW white-channel behavior, and startup scenes are deliberately left out until more real devices are tested.
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
Once published to npm, install it like any other Homebridge plugin:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
sudo npm install -g homebridge-lanternic
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For local development from this repository:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npm install
|
|
35
|
+
npm run build
|
|
36
|
+
sudo hb-service link
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Homebridge UI Setup
|
|
40
|
+
|
|
41
|
+
LanternIC supports Homebridge UI through `config.schema.json`.
|
|
42
|
+
|
|
43
|
+
1. Install the plugin.
|
|
44
|
+
2. Open Homebridge UI.
|
|
45
|
+
3. Go to Plugins, select LanternIC, then Settings.
|
|
46
|
+
4. Enable `Log Discovered Candidate Devices`.
|
|
47
|
+
5. Restart Homebridge and open the logs.
|
|
48
|
+
6. Copy the `LanternIC device config: {...}` line for your strip into the `Light Strips` list.
|
|
49
|
+
|
|
50
|
+
You can also use the local scanner:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
lanternic-scan
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Useful scanner filters:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
LANTERNIC_MIN_RSSI=-75 lanternic-scan
|
|
60
|
+
LANTERNIC_SCAN_SECONDS=45 lanternic-scan
|
|
61
|
+
LANTERNIC_SCAN_ALL=1 lanternic-scan
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
When working from this repository instead of a global install, use `npm run scan` in place of `lanternic-scan`.
|
|
65
|
+
|
|
66
|
+
`Auto-Add Discovered Devices` can create HomeKit accessories automatically for matching BLE candidates. Leave it off until the discovery filters only match your strips, because nearby BLE devices may advertise similar services.
|
|
67
|
+
|
|
68
|
+
## CLI Tools
|
|
69
|
+
|
|
70
|
+
LanternIC ships a few BLE helpers for setup and firmware troubleshooting:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
lanternic-scan
|
|
74
|
+
lanternic-explore <address>
|
|
75
|
+
lanternic-send <address> rgb ff0000
|
|
76
|
+
lanternic-send <address> brightness 50
|
|
77
|
+
lanternic-send-sequence <address> 7e070503ff000010ef 7e07050300ff0010ef
|
|
78
|
+
lanternic-calibrate <address>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
All tools default to Noble's cross-platform `default` binding. Override it only when needed:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
LANTERNIC_BINDING=hci lanternic-scan
|
|
85
|
+
LANTERNIC_BINDING=mac lanternic-scan
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Linux / Raspberry Pi
|
|
89
|
+
|
|
90
|
+
This plugin uses `@stoprocent/noble`, which ships Linux prebuilds for common Raspberry Pi and x64 platforms. Homebridge should run on Node.js 22 or 24.
|
|
91
|
+
|
|
92
|
+
Install Bluetooth dependencies:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
sudo apt-get update
|
|
96
|
+
sudo apt-get install -y bluetooth bluez libbluetooth-dev libudev-dev libcap2-bin
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Allow the Node binary used by Homebridge to access BLE:
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
sudo setcap cap_net_raw,cap_net_admin+eip "$(eval readlink -f "$(which node)")"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
If Homebridge runs under `hb-service`, make sure you run the `setcap` command against the same `node` binary that service uses. The safest path is to run it in the same shell/environment where Homebridge was installed, or from the Homebridge UI terminal.
|
|
106
|
+
|
|
107
|
+
Recommended Linux BLE settings:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"ble": {
|
|
112
|
+
"binding": "default",
|
|
113
|
+
"hciDriver": "native",
|
|
114
|
+
"hciDeviceId": 0,
|
|
115
|
+
"writeMode": "withoutResponse"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`binding: "default"` auto-selects Linux HCI on Linux. Set `hciDeviceId` to `1` for `hci1`, etc. If scanning sees nothing on a Raspberry Pi, try adding this to `/etc/bluetooth/main.conf`, then reboot:
|
|
121
|
+
|
|
122
|
+
```ini
|
|
123
|
+
DisablePlugins=pnat
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
If Linux discovery works from the CLI but Homebridge cannot connect, run the `setcap` command against the exact Node binary used by `hb-service`, then restart Homebridge. If `keepConnected` is enabled, expect the Magic Lantern iPhone app to fail or hang while Homebridge owns the BLE connection.
|
|
127
|
+
|
|
128
|
+
## Homebridge Config
|
|
129
|
+
|
|
130
|
+
Start with discovery enabled and no devices:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"platform": "LanternIC",
|
|
135
|
+
"name": "LanternIC",
|
|
136
|
+
"devices": [],
|
|
137
|
+
"discovery": {
|
|
138
|
+
"enabled": true,
|
|
139
|
+
"scanSeconds": 20
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Restart Homebridge and look for candidate device addresses in the logs. Then add your strip:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"platform": "LanternIC",
|
|
149
|
+
"name": "LanternIC",
|
|
150
|
+
"devices": [
|
|
151
|
+
{
|
|
152
|
+
"name": "TV Strip",
|
|
153
|
+
"address": "BE:16:70:00:08:2A",
|
|
154
|
+
"model": "Magic Lantern RGBIC",
|
|
155
|
+
"colorOrder": "rgb",
|
|
156
|
+
"powerMode": "both",
|
|
157
|
+
"brightnessMode": "rgb"
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"discovery": {
|
|
161
|
+
"enabled": true,
|
|
162
|
+
"autoAdd": false,
|
|
163
|
+
"scanSeconds": 20,
|
|
164
|
+
"minRssi": -95,
|
|
165
|
+
"namePrefixes": [
|
|
166
|
+
"MELK",
|
|
167
|
+
"Triones",
|
|
168
|
+
"ELK-BLEDOM",
|
|
169
|
+
"LED",
|
|
170
|
+
"OA"
|
|
171
|
+
],
|
|
172
|
+
"serviceUuids": [
|
|
173
|
+
"fff0"
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
"ble": {
|
|
177
|
+
"writeMode": "withoutResponse",
|
|
178
|
+
"keepConnected": true
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Test Loop With A Real Strip
|
|
184
|
+
|
|
185
|
+
1. Pair/configure the strip in the Magic Lantern app first so it is powered, reachable, and known-good.
|
|
186
|
+
2. Fully quit the Magic Lantern app before testing Homebridge. BLE devices usually allow only one active central connection.
|
|
187
|
+
3. Start Homebridge in debug mode and confirm the plugin logs your strip during discovery.
|
|
188
|
+
4. Add the address to config and restart.
|
|
189
|
+
5. Test in this order: On, Off, Brightness 10/50/100, Red, Green, Blue, White-ish.
|
|
190
|
+
6. If colors are swapped, change `colorOrder`.
|
|
191
|
+
7. If Off leaves the strip visibly on, keep `powerMode` as `both` or try `rgbBlack`.
|
|
192
|
+
8. If brightness does not change, keep `brightnessMode` as `rgb`; if it double-dims, try `native`.
|
|
193
|
+
|
|
194
|
+
## Protocol Notes
|
|
195
|
+
|
|
196
|
+
Known Magic Lantern BLE writes go to:
|
|
197
|
+
|
|
198
|
+
- Service UUID: `FFF0`
|
|
199
|
+
- Characteristic UUID: `FFF3`
|
|
200
|
+
|
|
201
|
+
Confirmed through HomeKit against a `MELK-OC21WCT31` / firmware string `WCKJ3016FV25HCV6` strip:
|
|
202
|
+
|
|
203
|
+
- RGB: `7e070503RRGGBB10ef`
|
|
204
|
+
- Off fallback: `7e07050300000010ef`
|
|
205
|
+
- Brightness: RGB scaling through the same RGB frame
|
|
206
|
+
|
|
207
|
+
The core frames available here are:
|
|
208
|
+
|
|
209
|
+
- On: `7e0404f00001ff00ef`
|
|
210
|
+
- Off: `7e0404000000ff00ef`
|
|
211
|
+
- RGB: `7e070503RRGGBB10ef`
|
|
212
|
+
- Brightness: `7e0401xx01ffff00ef`, where `xx` is 0-100 decimal encoded as one byte
|
|
213
|
+
- Effect speed: `7e0402xxffffff00ef`, where `xx` is 0-100 decimal encoded as one byte
|
|
214
|
+
- Basic effect: `7e0503xx06ffff00ef`
|
|
215
|
+
|
|
216
|
+
These protocol notes come from Home Assistant community reverse-engineering reports and BLE packet examples:
|
|
217
|
+
|
|
218
|
+
- Home Assistant Core issue: <https://github.com/home-assistant/core/issues/145934>
|
|
219
|
+
- Home Assistant community thread: <https://community.home-assistant.io/t/new-integration-for-ble-magic-lantern/454055>
|
|
220
|
+
- Magic Lantern app overview: <https://magiclantern.app/>
|
|
221
|
+
- Modern Noble fork used for BLE: <https://github.com/stoprocent/noble>
|
|
222
|
+
|
|
223
|
+
The default `powerMode` is `both`, which sends RGB black before the native off frame. The default `brightnessMode` is `rgb`, which scales RGB values instead of relying on the native brightness frame. These defaults favor the RGB command that is confirmed on real hardware.
|
|
224
|
+
|
|
225
|
+
The command builders are isolated so we can add variants if your strip uses a slightly different firmware.
|
|
226
|
+
|
|
227
|
+
## Known Hardware Notes
|
|
228
|
+
|
|
229
|
+
- HomeKit on/off, brightness, and RGB color control are confirmed on the MELK firmware above.
|
|
230
|
+
- Native power and brightness frames are implemented, but still need more real-strip validation because some Magic Lantern-family firmware appears to accept RGB frames while ignoring one or both native frames.
|
|
231
|
+
- If color works but power or brightness does not, use `lanternic-send <address> raw <hex-frame>` while testing candidate frames and open an issue with the model name, firmware string from `lanternic-explore`, and the working frame.
|
|
232
|
+
- Avoid enabling discovery `autoAdd` until your filters are tight. Some nearby BLE devices can share generic names or services and should not be bridged as lights.
|
|
233
|
+
|
|
234
|
+
## Reliability Choices
|
|
235
|
+
|
|
236
|
+
This plugin avoids the usual BLE plugin failure pattern of overlapping scans, overlapping writes, and stale connections:
|
|
237
|
+
|
|
238
|
+
- All BLE operations are serialized through a single manager queue.
|
|
239
|
+
- Every characteristic write has a timeout and is retried with exponential backoff.
|
|
240
|
+
- Failed writes force a disconnect and rediscovery.
|
|
241
|
+
- Desired HomeKit state is cached and resent after a background reconnect when `keepConnected` is enabled.
|
|
242
|
+
- Connections are closed after an idle timeout by default, so the Magic Lantern app or another controller is less likely to be locked out forever.
|
|
243
|
+
- Set `ble.keepConnected` to `true` for the most reliable HomeKit behavior. This keeps Homebridge attached to the strip and automatically reconnects after drops, but the Magic Lantern app may not be able to connect until Homebridge releases the device.
|
|
244
|
+
|
|
245
|
+
Useful reliability settings:
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"ble": {
|
|
250
|
+
"keepConnected": true,
|
|
251
|
+
"writeMode": "withoutResponse",
|
|
252
|
+
"writeTimeoutMs": 5000,
|
|
253
|
+
"retryAttempts": 4,
|
|
254
|
+
"retryDelayMs": 500,
|
|
255
|
+
"maxRetryDelayMs": 5000,
|
|
256
|
+
"reconnectDelayMs": 1000,
|
|
257
|
+
"maxReconnectDelayMs": 60000
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
```
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginAlias": "LanternIC",
|
|
3
|
+
"pluginType": "platform",
|
|
4
|
+
"singular": true,
|
|
5
|
+
"strictValidation": false,
|
|
6
|
+
"schema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": [
|
|
9
|
+
"name"
|
|
10
|
+
],
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"properties": {
|
|
13
|
+
"name": {
|
|
14
|
+
"title": "Name",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"default": "LanternIC"
|
|
17
|
+
},
|
|
18
|
+
"devices": {
|
|
19
|
+
"title": "Light Strips",
|
|
20
|
+
"type": "array",
|
|
21
|
+
"buttonText": "Add Light Strip",
|
|
22
|
+
"default": [],
|
|
23
|
+
"description": "Use discovery logs or lanternic-scan to find Magic Lantern BLE device ids. On Linux this is usually the MAC address; on macOS it may be a long CoreBluetooth id.",
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": [
|
|
27
|
+
"name",
|
|
28
|
+
"address"
|
|
29
|
+
],
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"properties": {
|
|
32
|
+
"name": {
|
|
33
|
+
"title": "Name",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"default": "LED Strip"
|
|
36
|
+
},
|
|
37
|
+
"address": {
|
|
38
|
+
"title": "Bluetooth Address / Id",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "MAC address or Noble peripheral id. Colons are optional. Use the value printed as address= in LanternIC discovery logs.",
|
|
41
|
+
"placeholder": "BE:16:70:00:08:2A"
|
|
42
|
+
},
|
|
43
|
+
"model": {
|
|
44
|
+
"title": "Model",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"default": "Magic Lantern RGBIC"
|
|
47
|
+
},
|
|
48
|
+
"manufacturer": {
|
|
49
|
+
"title": "Manufacturer",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"default": "Magic Lantern"
|
|
52
|
+
},
|
|
53
|
+
"colorOrder": {
|
|
54
|
+
"title": "Color Order",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"default": "rgb",
|
|
57
|
+
"oneOf": [
|
|
58
|
+
{
|
|
59
|
+
"title": "RGB",
|
|
60
|
+
"enum": [
|
|
61
|
+
"rgb"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"title": "RBG",
|
|
66
|
+
"enum": [
|
|
67
|
+
"rbg"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"title": "GRB",
|
|
72
|
+
"enum": [
|
|
73
|
+
"grb"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"title": "GBR",
|
|
78
|
+
"enum": [
|
|
79
|
+
"gbr"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"title": "BRG",
|
|
84
|
+
"enum": [
|
|
85
|
+
"brg"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"title": "BGR",
|
|
90
|
+
"enum": [
|
|
91
|
+
"bgr"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"powerMode": {
|
|
97
|
+
"title": "Power Mode",
|
|
98
|
+
"type": "string",
|
|
99
|
+
"default": "both",
|
|
100
|
+
"description": "Both sends RGB black before the native off frame. This is the safest default for firmware that accepts RGB colors but ignores native power frames.",
|
|
101
|
+
"oneOf": [
|
|
102
|
+
{
|
|
103
|
+
"title": "Native + RGB Black Fallback",
|
|
104
|
+
"enum": [
|
|
105
|
+
"both"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"title": "Native Power Frames Only",
|
|
110
|
+
"enum": [
|
|
111
|
+
"native"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"title": "RGB Black Only",
|
|
116
|
+
"enum": [
|
|
117
|
+
"rgbBlack"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"brightnessMode": {
|
|
123
|
+
"title": "Brightness Mode",
|
|
124
|
+
"type": "string",
|
|
125
|
+
"default": "rgb",
|
|
126
|
+
"description": "RGB scaling dims by changing RGB values, which works on strips that ignore native brightness frames.",
|
|
127
|
+
"oneOf": [
|
|
128
|
+
{
|
|
129
|
+
"title": "RGB Scaling",
|
|
130
|
+
"enum": [
|
|
131
|
+
"rgb"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"title": "Native Brightness Frame",
|
|
136
|
+
"enum": [
|
|
137
|
+
"native"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"title": "Native + RGB Scaling",
|
|
142
|
+
"enum": [
|
|
143
|
+
"both"
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"discovery": {
|
|
152
|
+
"title": "Discovery",
|
|
153
|
+
"type": "object",
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"properties": {
|
|
156
|
+
"enabled": {
|
|
157
|
+
"title": "Log Discovered Candidate Devices",
|
|
158
|
+
"type": "boolean",
|
|
159
|
+
"default": true,
|
|
160
|
+
"description": "Scan on Homebridge startup and print candidate devices plus copy/paste JSON snippets to the logs."
|
|
161
|
+
},
|
|
162
|
+
"autoAdd": {
|
|
163
|
+
"title": "Auto-Add Discovered Devices",
|
|
164
|
+
"type": "boolean",
|
|
165
|
+
"default": false,
|
|
166
|
+
"description": "Automatically create HomeKit accessories for matching discovered BLE devices. Leave off until your filters only match your strips."
|
|
167
|
+
},
|
|
168
|
+
"scanSeconds": {
|
|
169
|
+
"title": "Scan Time",
|
|
170
|
+
"type": "integer",
|
|
171
|
+
"default": 15,
|
|
172
|
+
"minimum": 3,
|
|
173
|
+
"maximum": 120
|
|
174
|
+
},
|
|
175
|
+
"minRssi": {
|
|
176
|
+
"title": "Minimum RSSI",
|
|
177
|
+
"type": "integer",
|
|
178
|
+
"default": -95,
|
|
179
|
+
"minimum": -127,
|
|
180
|
+
"maximum": 0,
|
|
181
|
+
"description": "Ignore very weak candidates. Higher values are stricter; for example -70 only finds nearby devices."
|
|
182
|
+
},
|
|
183
|
+
"namePrefixes": {
|
|
184
|
+
"title": "Candidate Name Prefixes",
|
|
185
|
+
"type": "array",
|
|
186
|
+
"default": [
|
|
187
|
+
"Triones",
|
|
188
|
+
"MELK",
|
|
189
|
+
"ELK-BLEDOM",
|
|
190
|
+
"LED",
|
|
191
|
+
"OA"
|
|
192
|
+
],
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "string"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"serviceUuids": {
|
|
198
|
+
"title": "Candidate Service UUIDs",
|
|
199
|
+
"type": "array",
|
|
200
|
+
"default": [
|
|
201
|
+
"fff0"
|
|
202
|
+
],
|
|
203
|
+
"description": "Also treat devices advertising these services as candidates.",
|
|
204
|
+
"items": {
|
|
205
|
+
"type": "string"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"ble": {
|
|
211
|
+
"title": "Bluetooth",
|
|
212
|
+
"type": "object",
|
|
213
|
+
"additionalProperties": false,
|
|
214
|
+
"properties": {
|
|
215
|
+
"binding": {
|
|
216
|
+
"title": "Noble Binding",
|
|
217
|
+
"type": "string",
|
|
218
|
+
"default": "default",
|
|
219
|
+
"description": "Default auto-selects macOS, Windows, or Linux HCI. Use Linux HCI when you need explicit HCI settings.",
|
|
220
|
+
"oneOf": [
|
|
221
|
+
{
|
|
222
|
+
"title": "Default",
|
|
223
|
+
"enum": [
|
|
224
|
+
"default"
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"title": "Linux HCI",
|
|
229
|
+
"enum": [
|
|
230
|
+
"hci"
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"title": "macOS",
|
|
235
|
+
"enum": [
|
|
236
|
+
"mac"
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"title": "Windows",
|
|
241
|
+
"enum": [
|
|
242
|
+
"win"
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
"hciDriver": {
|
|
248
|
+
"title": "Linux HCI Driver",
|
|
249
|
+
"type": "string",
|
|
250
|
+
"default": "native",
|
|
251
|
+
"description": "Native is the normal Linux/Raspberry Pi driver. USB/UART are for dedicated adapters.",
|
|
252
|
+
"oneOf": [
|
|
253
|
+
{
|
|
254
|
+
"title": "Native",
|
|
255
|
+
"enum": [
|
|
256
|
+
"native"
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"title": "Default",
|
|
261
|
+
"enum": [
|
|
262
|
+
"default"
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"title": "USB",
|
|
267
|
+
"enum": [
|
|
268
|
+
"usb"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"title": "UART",
|
|
273
|
+
"enum": [
|
|
274
|
+
"uart"
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
"hciDeviceId": {
|
|
280
|
+
"title": "Linux HCI Device Id",
|
|
281
|
+
"type": "integer",
|
|
282
|
+
"default": 0,
|
|
283
|
+
"minimum": 0,
|
|
284
|
+
"description": "For hci0 use 0, hci1 use 1, and so on."
|
|
285
|
+
},
|
|
286
|
+
"hciUserChannel": {
|
|
287
|
+
"title": "Linux HCI User Channel",
|
|
288
|
+
"type": "boolean",
|
|
289
|
+
"default": false,
|
|
290
|
+
"description": "Advanced Linux option. Usually leave off unless raw HCI permissions conflict with bluetoothd."
|
|
291
|
+
},
|
|
292
|
+
"hciExtended": {
|
|
293
|
+
"title": "BLE 5 Extended Features",
|
|
294
|
+
"type": "boolean",
|
|
295
|
+
"description": "Optional advanced setting. Leave blank/default unless your adapter needs extended feature behavior forced."
|
|
296
|
+
},
|
|
297
|
+
"serviceUuid": {
|
|
298
|
+
"title": "Service UUID",
|
|
299
|
+
"type": "string",
|
|
300
|
+
"default": "fff0"
|
|
301
|
+
},
|
|
302
|
+
"characteristicUuid": {
|
|
303
|
+
"title": "Characteristic UUID",
|
|
304
|
+
"type": "string",
|
|
305
|
+
"default": "fff3"
|
|
306
|
+
},
|
|
307
|
+
"keepConnected": {
|
|
308
|
+
"title": "Keep Connected",
|
|
309
|
+
"type": "boolean",
|
|
310
|
+
"default": false,
|
|
311
|
+
"description": "Maintain a BLE connection and automatically reconnect after disconnects. Improves HomeKit responsiveness but may prevent the Magic Lantern app from connecting at the same time."
|
|
312
|
+
},
|
|
313
|
+
"connectTimeoutMs": {
|
|
314
|
+
"title": "Connect Timeout",
|
|
315
|
+
"type": "integer",
|
|
316
|
+
"default": 15000,
|
|
317
|
+
"minimum": 1000,
|
|
318
|
+
"maximum": 60000
|
|
319
|
+
},
|
|
320
|
+
"scanTimeoutMs": {
|
|
321
|
+
"title": "Scan Timeout",
|
|
322
|
+
"type": "integer",
|
|
323
|
+
"default": 15000,
|
|
324
|
+
"minimum": 1000,
|
|
325
|
+
"maximum": 120000
|
|
326
|
+
},
|
|
327
|
+
"writeTimeoutMs": {
|
|
328
|
+
"title": "Write Timeout",
|
|
329
|
+
"type": "integer",
|
|
330
|
+
"default": 5000,
|
|
331
|
+
"minimum": 500,
|
|
332
|
+
"maximum": 60000
|
|
333
|
+
},
|
|
334
|
+
"retryAttempts": {
|
|
335
|
+
"title": "Retry Attempts",
|
|
336
|
+
"type": "integer",
|
|
337
|
+
"default": 3,
|
|
338
|
+
"minimum": 1,
|
|
339
|
+
"maximum": 10
|
|
340
|
+
},
|
|
341
|
+
"retryDelayMs": {
|
|
342
|
+
"title": "Retry Delay",
|
|
343
|
+
"type": "integer",
|
|
344
|
+
"default": 500,
|
|
345
|
+
"minimum": 0,
|
|
346
|
+
"maximum": 10000
|
|
347
|
+
},
|
|
348
|
+
"maxRetryDelayMs": {
|
|
349
|
+
"title": "Max Retry Delay",
|
|
350
|
+
"type": "integer",
|
|
351
|
+
"default": 5000,
|
|
352
|
+
"minimum": 0,
|
|
353
|
+
"maximum": 60000
|
|
354
|
+
},
|
|
355
|
+
"reconnectDelayMs": {
|
|
356
|
+
"title": "Reconnect Delay",
|
|
357
|
+
"type": "integer",
|
|
358
|
+
"default": 1000,
|
|
359
|
+
"minimum": 0,
|
|
360
|
+
"maximum": 60000
|
|
361
|
+
},
|
|
362
|
+
"maxReconnectDelayMs": {
|
|
363
|
+
"title": "Max Reconnect Delay",
|
|
364
|
+
"type": "integer",
|
|
365
|
+
"default": 60000,
|
|
366
|
+
"minimum": 1000,
|
|
367
|
+
"maximum": 600000
|
|
368
|
+
},
|
|
369
|
+
"writeDelayMs": {
|
|
370
|
+
"title": "Delay Between Writes",
|
|
371
|
+
"type": "integer",
|
|
372
|
+
"default": 120,
|
|
373
|
+
"minimum": 0,
|
|
374
|
+
"maximum": 5000
|
|
375
|
+
},
|
|
376
|
+
"idleDisconnectMs": {
|
|
377
|
+
"title": "Idle Disconnect",
|
|
378
|
+
"type": "integer",
|
|
379
|
+
"default": 30000,
|
|
380
|
+
"minimum": 0,
|
|
381
|
+
"maximum": 600000
|
|
382
|
+
},
|
|
383
|
+
"writeMode": {
|
|
384
|
+
"title": "Write Mode",
|
|
385
|
+
"type": "string",
|
|
386
|
+
"default": "auto",
|
|
387
|
+
"oneOf": [
|
|
388
|
+
{
|
|
389
|
+
"title": "Auto",
|
|
390
|
+
"enum": [
|
|
391
|
+
"auto"
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"title": "With Response",
|
|
396
|
+
"enum": [
|
|
397
|
+
"withResponse"
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"title": "Without Response",
|
|
402
|
+
"enum": [
|
|
403
|
+
"withoutResponse"
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|