homebridge-lanternic 0.1.3 → 0.2.1
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/README.md +17 -3
- package/config.schema.json +61 -12
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,6 +40,14 @@ npm install
|
|
|
40
40
|
npm run build
|
|
41
41
|
sudo hb-service link
|
|
42
42
|
```
|
|
43
|
+
> [!CAUTION]
|
|
44
|
+
>
|
|
45
|
+
> Only the following platforms are supported:
|
|
46
|
+
>
|
|
47
|
+
> - **macOS**
|
|
48
|
+
> - If using macOS, you'll need to give Node.js permission to use Bluetooth in **System Settings → Privacy & Security → Bluetooth**.
|
|
49
|
+
> - **Linux**
|
|
50
|
+
> - 64-bit, not tested on 32-bit systems
|
|
43
51
|
|
|
44
52
|
## Homebridge UI Setup
|
|
45
53
|
|
|
@@ -48,9 +56,12 @@ LanternIC supports Homebridge UI through `config.schema.json`.
|
|
|
48
56
|
1. Install the plugin.
|
|
49
57
|
2. Open Homebridge UI.
|
|
50
58
|
3. Go to Plugins, select LanternIC, then Settings.
|
|
51
|
-
4.
|
|
59
|
+
4. Leave `Scan For Light Strips On Startup` enabled.
|
|
52
60
|
5. Restart Homebridge and open the logs.
|
|
53
|
-
6. Copy the `LanternIC device config: {...}` line for your strip into
|
|
61
|
+
6. Copy the `LanternIC device config: {...}` line for your strip into `Configured Light Strips`.
|
|
62
|
+
7. Save and restart Homebridge again.
|
|
63
|
+
|
|
64
|
+
Most setups only need a strip name and Bluetooth address. Use `Show Advanced Settings` only for Bluetooth adapter options, discovery filters, or protocol fallback tuning.
|
|
54
65
|
|
|
55
66
|
You can also use the local scanner:
|
|
56
67
|
|
|
@@ -68,7 +79,7 @@ LANTERNIC_SCAN_ALL=1 lanternic-scan
|
|
|
68
79
|
|
|
69
80
|
When working from this repository instead of a global install, use `npm run scan` in place of `lanternic-scan`.
|
|
70
81
|
|
|
71
|
-
`
|
|
82
|
+
`Automatically Add Discovered Strips` can create HomeKit accessories for matching BLE candidates. Leave it off until you are nearby and ready to test, because nearby BLE devices may advertise similar services.
|
|
72
83
|
|
|
73
84
|
## CLI Tools
|
|
74
85
|
|
|
@@ -138,6 +149,7 @@ Start with discovery enabled and no devices:
|
|
|
138
149
|
{
|
|
139
150
|
"platform": "LanternIC",
|
|
140
151
|
"name": "LanternIC",
|
|
152
|
+
"showAdvanced": false,
|
|
141
153
|
"devices": [],
|
|
142
154
|
"discovery": {
|
|
143
155
|
"enabled": true,
|
|
@@ -156,6 +168,7 @@ Restart Homebridge and look for candidate device addresses in the logs. Then add
|
|
|
156
168
|
{
|
|
157
169
|
"name": "TV Strip",
|
|
158
170
|
"address": "BE:16:70:00:08:2A",
|
|
171
|
+
"showAdvanced": false,
|
|
159
172
|
"model": "Magic Lantern RGBIC",
|
|
160
173
|
"colorOrder": "rgb",
|
|
161
174
|
"powerMode": "both",
|
|
@@ -165,6 +178,7 @@ Restart Homebridge and look for candidate device addresses in the logs. Then add
|
|
|
165
178
|
"discovery": {
|
|
166
179
|
"enabled": true,
|
|
167
180
|
"autoAdd": false,
|
|
181
|
+
"showAdvanced": false,
|
|
168
182
|
"scanSeconds": 20,
|
|
169
183
|
"minRssi": -95,
|
|
170
184
|
"namePrefixes": [
|
package/config.schema.json
CHANGED
|
@@ -15,12 +15,18 @@
|
|
|
15
15
|
"type": "string",
|
|
16
16
|
"default": "LanternIC"
|
|
17
17
|
},
|
|
18
|
+
"showAdvanced": {
|
|
19
|
+
"title": "Show Advanced Settings",
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"default": false,
|
|
22
|
+
"description": "Show Bluetooth transport, discovery filters, and protocol tuning options. Most users can leave this off."
|
|
23
|
+
},
|
|
18
24
|
"devices": {
|
|
19
|
-
"title": "Light Strips",
|
|
25
|
+
"title": "Configured Light Strips",
|
|
20
26
|
"type": "array",
|
|
21
27
|
"buttonText": "Add Light Strip",
|
|
22
28
|
"default": [],
|
|
23
|
-
"description": "
|
|
29
|
+
"description": "Add strips discovered in the logs. Usually only Name and Bluetooth Address are needed.",
|
|
24
30
|
"items": {
|
|
25
31
|
"type": "object",
|
|
26
32
|
"required": [
|
|
@@ -37,23 +43,39 @@
|
|
|
37
43
|
"address": {
|
|
38
44
|
"title": "Bluetooth Address / Id",
|
|
39
45
|
"type": "string",
|
|
40
|
-
"description": "
|
|
46
|
+
"description": "Use the address printed in LanternIC discovery logs. Colons are optional.",
|
|
41
47
|
"placeholder": "BE:16:70:00:08:2A"
|
|
42
48
|
},
|
|
49
|
+
"showAdvanced": {
|
|
50
|
+
"title": "Show Advanced Strip Settings",
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"default": false,
|
|
53
|
+
"description": "Show color order and protocol fallback settings for this strip."
|
|
54
|
+
},
|
|
43
55
|
"model": {
|
|
44
56
|
"title": "Model",
|
|
45
57
|
"type": "string",
|
|
46
|
-
"default": "Magic Lantern RGBIC"
|
|
58
|
+
"default": "Magic Lantern RGBIC",
|
|
59
|
+
"condition": {
|
|
60
|
+
"functionBody": "return model.devices && model.devices.showAdvanced === true;"
|
|
61
|
+
}
|
|
47
62
|
},
|
|
48
63
|
"manufacturer": {
|
|
49
64
|
"title": "Manufacturer",
|
|
50
65
|
"type": "string",
|
|
51
|
-
"default": "Magic Lantern"
|
|
66
|
+
"default": "Magic Lantern",
|
|
67
|
+
"condition": {
|
|
68
|
+
"functionBody": "return model.devices && model.devices.showAdvanced === true;"
|
|
69
|
+
}
|
|
52
70
|
},
|
|
53
71
|
"colorOrder": {
|
|
54
72
|
"title": "Color Order",
|
|
55
73
|
"type": "string",
|
|
56
74
|
"default": "rgb",
|
|
75
|
+
"description": "Change this only if red, green, and blue appear swapped in HomeKit.",
|
|
76
|
+
"condition": {
|
|
77
|
+
"functionBody": "return model.devices && model.devices.showAdvanced === true;"
|
|
78
|
+
},
|
|
57
79
|
"oneOf": [
|
|
58
80
|
{
|
|
59
81
|
"title": "RGB",
|
|
@@ -98,6 +120,9 @@
|
|
|
98
120
|
"type": "string",
|
|
99
121
|
"default": "both",
|
|
100
122
|
"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.",
|
|
123
|
+
"condition": {
|
|
124
|
+
"functionBody": "return model.devices && model.devices.showAdvanced === true;"
|
|
125
|
+
},
|
|
101
126
|
"oneOf": [
|
|
102
127
|
{
|
|
103
128
|
"title": "Native + RGB Black Fallback",
|
|
@@ -124,6 +149,9 @@
|
|
|
124
149
|
"type": "string",
|
|
125
150
|
"default": "rgb",
|
|
126
151
|
"description": "RGB scaling dims by changing RGB values, which works on strips that ignore native brightness frames.",
|
|
152
|
+
"condition": {
|
|
153
|
+
"functionBody": "return model.devices && model.devices.showAdvanced === true;"
|
|
154
|
+
},
|
|
127
155
|
"oneOf": [
|
|
128
156
|
{
|
|
129
157
|
"title": "RGB Scaling",
|
|
@@ -149,28 +177,37 @@
|
|
|
149
177
|
}
|
|
150
178
|
},
|
|
151
179
|
"discovery": {
|
|
152
|
-
"title": "Discovery",
|
|
180
|
+
"title": "Setup & Discovery",
|
|
153
181
|
"type": "object",
|
|
154
182
|
"additionalProperties": false,
|
|
155
183
|
"properties": {
|
|
156
184
|
"enabled": {
|
|
157
|
-
"title": "
|
|
185
|
+
"title": "Scan For Light Strips On Startup",
|
|
158
186
|
"type": "boolean",
|
|
159
187
|
"default": true,
|
|
160
|
-
"description": "
|
|
188
|
+
"description": "Print nearby Magic Lantern candidates in the Homebridge logs with copy/paste device snippets."
|
|
161
189
|
},
|
|
162
190
|
"autoAdd": {
|
|
163
|
-
"title": "
|
|
191
|
+
"title": "Automatically Add Discovered Strips",
|
|
164
192
|
"type": "boolean",
|
|
165
193
|
"default": false,
|
|
166
|
-
"description": "
|
|
194
|
+
"description": "Create HomeKit accessories for matching candidates. Leave off unless you are nearby and ready to test."
|
|
195
|
+
},
|
|
196
|
+
"showAdvanced": {
|
|
197
|
+
"title": "Show Advanced Discovery Filters",
|
|
198
|
+
"type": "boolean",
|
|
199
|
+
"default": false,
|
|
200
|
+
"description": "Show scan duration, RSSI, name prefix, and service UUID filters."
|
|
167
201
|
},
|
|
168
202
|
"scanSeconds": {
|
|
169
203
|
"title": "Scan Time",
|
|
170
204
|
"type": "integer",
|
|
171
205
|
"default": 15,
|
|
172
206
|
"minimum": 3,
|
|
173
|
-
"maximum": 120
|
|
207
|
+
"maximum": 120,
|
|
208
|
+
"condition": {
|
|
209
|
+
"functionBody": "return model.showAdvanced === true || (model.discovery && model.discovery.showAdvanced === true);"
|
|
210
|
+
}
|
|
174
211
|
},
|
|
175
212
|
"minRssi": {
|
|
176
213
|
"title": "Minimum RSSI",
|
|
@@ -178,7 +215,10 @@
|
|
|
178
215
|
"default": -95,
|
|
179
216
|
"minimum": -127,
|
|
180
217
|
"maximum": 0,
|
|
181
|
-
"description": "Ignore very weak candidates. Higher values are stricter; for example -70 only finds nearby devices."
|
|
218
|
+
"description": "Ignore very weak candidates. Higher values are stricter; for example -70 only finds nearby devices.",
|
|
219
|
+
"condition": {
|
|
220
|
+
"functionBody": "return model.showAdvanced === true || (model.discovery && model.discovery.showAdvanced === true);"
|
|
221
|
+
}
|
|
182
222
|
},
|
|
183
223
|
"namePrefixes": {
|
|
184
224
|
"title": "Candidate Name Prefixes",
|
|
@@ -192,6 +232,9 @@
|
|
|
192
232
|
],
|
|
193
233
|
"items": {
|
|
194
234
|
"type": "string"
|
|
235
|
+
},
|
|
236
|
+
"condition": {
|
|
237
|
+
"functionBody": "return model.showAdvanced === true || (model.discovery && model.discovery.showAdvanced === true);"
|
|
195
238
|
}
|
|
196
239
|
},
|
|
197
240
|
"serviceUuids": {
|
|
@@ -203,6 +246,9 @@
|
|
|
203
246
|
"description": "Also treat devices advertising these services as candidates.",
|
|
204
247
|
"items": {
|
|
205
248
|
"type": "string"
|
|
249
|
+
},
|
|
250
|
+
"condition": {
|
|
251
|
+
"functionBody": "return model.showAdvanced === true || (model.discovery && model.discovery.showAdvanced === true);"
|
|
206
252
|
}
|
|
207
253
|
}
|
|
208
254
|
}
|
|
@@ -211,6 +257,9 @@
|
|
|
211
257
|
"title": "Bluetooth",
|
|
212
258
|
"type": "object",
|
|
213
259
|
"additionalProperties": false,
|
|
260
|
+
"condition": {
|
|
261
|
+
"functionBody": "return model.showAdvanced === true;"
|
|
262
|
+
},
|
|
214
263
|
"properties": {
|
|
215
264
|
"binding": {
|
|
216
265
|
"title": "Noble Binding",
|
package/dist/types.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type WriteMode = 'auto' | 'withResponse' | 'withoutResponse';
|
|
|
8
8
|
export interface LanternIcDeviceConfig {
|
|
9
9
|
name: string;
|
|
10
10
|
address: string;
|
|
11
|
+
showAdvanced?: boolean;
|
|
11
12
|
manufacturer?: string;
|
|
12
13
|
model?: string;
|
|
13
14
|
colorOrder?: ColorOrder;
|
|
@@ -17,6 +18,7 @@ export interface LanternIcDeviceConfig {
|
|
|
17
18
|
export interface LanternIcDiscoveryConfig {
|
|
18
19
|
enabled?: boolean;
|
|
19
20
|
autoAdd?: boolean;
|
|
21
|
+
showAdvanced?: boolean;
|
|
20
22
|
scanSeconds?: number;
|
|
21
23
|
minRssi?: number;
|
|
22
24
|
namePrefixes?: string[];
|
|
@@ -45,6 +47,7 @@ export interface LanternIcBleConfig {
|
|
|
45
47
|
}
|
|
46
48
|
export interface LanternIcPlatformConfig extends PlatformConfig {
|
|
47
49
|
name?: string;
|
|
50
|
+
showAdvanced?: boolean;
|
|
48
51
|
devices?: LanternIcDeviceConfig[];
|
|
49
52
|
discovery?: LanternIcDiscoveryConfig;
|
|
50
53
|
ble?: LanternIcBleConfig;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "homebridge-lanternic",
|
|
3
3
|
"displayName": "LanternIC",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.1
|
|
5
|
+
"version": "0.2.1",
|
|
6
6
|
"description": "Homebridge plugin for BLE RGBIC/RGBWIC light strips controlled by the Magic Lantern app.",
|
|
7
7
|
"author": "Gibson Bell",
|
|
8
8
|
"license": "MIT",
|