govee-toolkit 1.9.0 → 1.10.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/README.md CHANGED
@@ -18,15 +18,19 @@ wire.
18
18
  [![govee-toolkit on PyPI](https://img.shields.io/pypi/v/govee-toolkit?logo=python&logoColor=white&label=govee-toolkit)](https://pypi.org/project/govee-toolkit/)
19
19
  [![govee-toolkit on npm](https://img.shields.io/npm/v/govee-toolkit?logo=npm&logoColor=white&label=govee-toolkit)](https://www.npmjs.com/package/govee-toolkit)
20
20
 
21
- <!-- TODO: demo GIF here — a strip running per-segment colors. -->
21
+ <!-- TODO: demo GIF here: a strip running per-segment colors. -->
22
22
 
23
23
  ## What it does
24
24
 
25
25
  - Switch a device on and off, and set the brightness, the color and the white
26
26
  temperature.
27
27
  - Address every segment of a strip on its own, not only the preset effects.
28
- - Drive a strip frame by frame in real time: music reactive, screen ambilight,
29
- or your own source.
28
+ - Drive a strip frame by frame in real time over `lan`: music reactive, screen
29
+ ambilight, or your own source.
30
+ - Play a scene of the scene library by name or code: `fetchScenes(sku)` stores
31
+ the library of a model, and `device.scene("Aurora")` plays from it.
32
+ - Store a drawing of the LEDs with `device.draw({ cells, colors })`. The device
33
+ keeps playing it on its own.
30
34
  - Put a device out of the box on your Wi-Fi over Bluetooth, which is what makes
31
35
  it reachable over `lan`.
32
36
 
@@ -49,7 +53,7 @@ than taking a slower path in silence.
49
53
 
50
54
  The engine works over `lan`, over `ble` and over `cloud`, verified on real
51
55
  hardware: discovery, on/off, brightness, color, per-segment color, and live
52
- animation over the two local modes. It is usable today from Rust, from Python
56
+ animation over `lan`. It is usable today from Rust, from Python
53
57
  and from Node.js.
54
58
 
55
59
  Next come a desktop app, then Home Assistant, Homebridge and Matter.
package/binding.cjs CHANGED
@@ -94,8 +94,8 @@ function requireNative() {
94
94
  try {
95
95
  const binding = require('govee-toolkit-android-arm64')
96
96
  const bindingPackageVersion = require('govee-toolkit-android-arm64/package.json').version
97
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
98
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
97
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
98
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
99
99
  }
100
100
  return binding
101
101
  } catch (e) {
@@ -110,8 +110,8 @@ function requireNative() {
110
110
  try {
111
111
  const binding = require('govee-toolkit-android-arm-eabi')
112
112
  const bindingPackageVersion = require('govee-toolkit-android-arm-eabi/package.json').version
113
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
114
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
113
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
114
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
115
115
  }
116
116
  return binding
117
117
  } catch (e) {
@@ -131,8 +131,8 @@ function requireNative() {
131
131
  try {
132
132
  const binding = require('govee-toolkit-win32-x64-gnu')
133
133
  const bindingPackageVersion = require('govee-toolkit-win32-x64-gnu/package.json').version
134
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
135
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
134
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
135
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
136
136
  }
137
137
  return binding
138
138
  } catch (e) {
@@ -147,8 +147,8 @@ function requireNative() {
147
147
  try {
148
148
  const binding = require('govee-toolkit-win32-x64-msvc')
149
149
  const bindingPackageVersion = require('govee-toolkit-win32-x64-msvc/package.json').version
150
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -164,8 +164,8 @@ function requireNative() {
164
164
  try {
165
165
  const binding = require('govee-toolkit-win32-ia32-msvc')
166
166
  const bindingPackageVersion = require('govee-toolkit-win32-ia32-msvc/package.json').version
167
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
168
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
167
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
168
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
169
169
  }
170
170
  return binding
171
171
  } catch (e) {
@@ -180,8 +180,8 @@ function requireNative() {
180
180
  try {
181
181
  const binding = require('govee-toolkit-win32-arm64-msvc')
182
182
  const bindingPackageVersion = require('govee-toolkit-win32-arm64-msvc/package.json').version
183
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
184
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
183
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
184
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
185
  }
186
186
  return binding
187
187
  } catch (e) {
@@ -199,8 +199,8 @@ function requireNative() {
199
199
  try {
200
200
  const binding = require('govee-toolkit-darwin-universal')
201
201
  const bindingPackageVersion = require('govee-toolkit-darwin-universal/package.json').version
202
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
203
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
202
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
203
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
204
204
  }
205
205
  return binding
206
206
  } catch (e) {
@@ -215,8 +215,8 @@ function requireNative() {
215
215
  try {
216
216
  const binding = require('govee-toolkit-darwin-x64')
217
217
  const bindingPackageVersion = require('govee-toolkit-darwin-x64/package.json').version
218
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
219
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
218
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
219
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
220
220
  }
221
221
  return binding
222
222
  } catch (e) {
@@ -231,8 +231,8 @@ function requireNative() {
231
231
  try {
232
232
  const binding = require('govee-toolkit-darwin-arm64')
233
233
  const bindingPackageVersion = require('govee-toolkit-darwin-arm64/package.json').version
234
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
235
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
234
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
235
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
236
236
  }
237
237
  return binding
238
238
  } catch (e) {
@@ -251,8 +251,8 @@ function requireNative() {
251
251
  try {
252
252
  const binding = require('govee-toolkit-freebsd-x64')
253
253
  const bindingPackageVersion = require('govee-toolkit-freebsd-x64/package.json').version
254
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
255
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
254
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
255
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
256
256
  }
257
257
  return binding
258
258
  } catch (e) {
@@ -267,8 +267,8 @@ function requireNative() {
267
267
  try {
268
268
  const binding = require('govee-toolkit-freebsd-arm64')
269
269
  const bindingPackageVersion = require('govee-toolkit-freebsd-arm64/package.json').version
270
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
271
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
270
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
271
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
272
272
  }
273
273
  return binding
274
274
  } catch (e) {
@@ -283,8 +283,8 @@ function requireNative() {
283
283
  try {
284
284
  const binding = require('govee-toolkit-freebsd-ppc64')
285
285
  const bindingPackageVersion = require('govee-toolkit-freebsd-ppc64/package.json').version
286
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
286
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
288
288
  }
289
289
  return binding
290
290
  } catch (e) {
@@ -304,8 +304,8 @@ function requireNative() {
304
304
  try {
305
305
  const binding = require('govee-toolkit-linux-x64-musl')
306
306
  const bindingPackageVersion = require('govee-toolkit-linux-x64-musl/package.json').version
307
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
308
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
307
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
308
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
309
309
  }
310
310
  return binding
311
311
  } catch (e) {
@@ -320,8 +320,8 @@ function requireNative() {
320
320
  try {
321
321
  const binding = require('govee-toolkit-linux-x64-gnu')
322
322
  const bindingPackageVersion = require('govee-toolkit-linux-x64-gnu/package.json').version
323
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
324
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
323
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
324
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
325
325
  }
326
326
  return binding
327
327
  } catch (e) {
@@ -338,8 +338,8 @@ function requireNative() {
338
338
  try {
339
339
  const binding = require('govee-toolkit-linux-arm64-musl')
340
340
  const bindingPackageVersion = require('govee-toolkit-linux-arm64-musl/package.json').version
341
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
342
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
341
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
342
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
343
343
  }
344
344
  return binding
345
345
  } catch (e) {
@@ -354,8 +354,8 @@ function requireNative() {
354
354
  try {
355
355
  const binding = require('govee-toolkit-linux-arm64-gnu')
356
356
  const bindingPackageVersion = require('govee-toolkit-linux-arm64-gnu/package.json').version
357
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
358
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
357
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
358
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
359
359
  }
360
360
  return binding
361
361
  } catch (e) {
@@ -372,8 +372,8 @@ function requireNative() {
372
372
  try {
373
373
  const binding = require('govee-toolkit-linux-arm-musleabihf')
374
374
  const bindingPackageVersion = require('govee-toolkit-linux-arm-musleabihf/package.json').version
375
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
376
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
375
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
376
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
377
377
  }
378
378
  return binding
379
379
  } catch (e) {
@@ -388,8 +388,8 @@ function requireNative() {
388
388
  try {
389
389
  const binding = require('govee-toolkit-linux-arm-gnueabihf')
390
390
  const bindingPackageVersion = require('govee-toolkit-linux-arm-gnueabihf/package.json').version
391
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
392
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
391
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
392
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
393
393
  }
394
394
  return binding
395
395
  } catch (e) {
@@ -406,8 +406,8 @@ function requireNative() {
406
406
  try {
407
407
  const binding = require('govee-toolkit-linux-loong64-musl')
408
408
  const bindingPackageVersion = require('govee-toolkit-linux-loong64-musl/package.json').version
409
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
410
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
409
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
410
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
411
411
  }
412
412
  return binding
413
413
  } catch (e) {
@@ -422,8 +422,8 @@ function requireNative() {
422
422
  try {
423
423
  const binding = require('govee-toolkit-linux-loong64-gnu')
424
424
  const bindingPackageVersion = require('govee-toolkit-linux-loong64-gnu/package.json').version
425
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
426
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
425
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
426
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
427
427
  }
428
428
  return binding
429
429
  } catch (e) {
@@ -440,8 +440,8 @@ function requireNative() {
440
440
  try {
441
441
  const binding = require('govee-toolkit-linux-riscv64-musl')
442
442
  const bindingPackageVersion = require('govee-toolkit-linux-riscv64-musl/package.json').version
443
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -456,8 +456,8 @@ function requireNative() {
456
456
  try {
457
457
  const binding = require('govee-toolkit-linux-riscv64-gnu')
458
458
  const bindingPackageVersion = require('govee-toolkit-linux-riscv64-gnu/package.json').version
459
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -473,8 +473,8 @@ function requireNative() {
473
473
  try {
474
474
  const binding = require('govee-toolkit-linux-ppc64-gnu')
475
475
  const bindingPackageVersion = require('govee-toolkit-linux-ppc64-gnu/package.json').version
476
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
477
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
476
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
477
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
478
478
  }
479
479
  return binding
480
480
  } catch (e) {
@@ -489,8 +489,8 @@ function requireNative() {
489
489
  try {
490
490
  const binding = require('govee-toolkit-linux-s390x-gnu')
491
491
  const bindingPackageVersion = require('govee-toolkit-linux-s390x-gnu/package.json').version
492
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
493
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
492
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
493
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
494
494
  }
495
495
  return binding
496
496
  } catch (e) {
@@ -509,8 +509,8 @@ function requireNative() {
509
509
  try {
510
510
  const binding = require('govee-toolkit-openharmony-arm64')
511
511
  const bindingPackageVersion = require('govee-toolkit-openharmony-arm64/package.json').version
512
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
513
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
512
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
513
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
514
514
  }
515
515
  return binding
516
516
  } catch (e) {
@@ -525,8 +525,8 @@ function requireNative() {
525
525
  try {
526
526
  const binding = require('govee-toolkit-openharmony-x64')
527
527
  const bindingPackageVersion = require('govee-toolkit-openharmony-x64/package.json').version
528
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
529
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
528
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
529
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
530
530
  }
531
531
  return binding
532
532
  } catch (e) {
@@ -541,8 +541,8 @@ function requireNative() {
541
541
  try {
542
542
  const binding = require('govee-toolkit-openharmony-arm')
543
543
  const bindingPackageVersion = require('govee-toolkit-openharmony-arm/package.json').version
544
- if (bindingPackageVersion !== '1.9.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
545
- throw new Error(`Native binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
544
+ if (bindingPackageVersion !== '1.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
545
+ throw new Error(`Native binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
546
546
  }
547
547
  return binding
548
548
  } catch (e) {
@@ -683,8 +683,8 @@ if (!nativeBinding || forceWasi) {
683
683
  if (!candidateFailed) {
684
684
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
685
685
  const bindingPackageVersion = require('govee-toolkit-wasm32-wasi/package.json').version
686
- if (bindingPackageVersion !== '1.9.0') {
687
- throw new Error(`WASI binding package version mismatch, expected 1.9.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
686
+ if (bindingPackageVersion !== '1.10.0') {
687
+ throw new Error(`WASI binding package version mismatch, expected 1.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
688
688
  }
689
689
  }
690
690
  wasiBinding = require('govee-toolkit-wasm32-wasi')
@@ -854,7 +854,9 @@ module.exports.Served = nativeBinding.Served
854
854
  module.exports.StatusStream = nativeBinding.StatusStream
855
855
  module.exports.WalkReport = nativeBinding.WalkReport
856
856
  module.exports.CORE_VERSION = nativeBinding.CORE_VERSION
857
+ module.exports.fetchScenes = nativeBinding.fetchScenes
857
858
  module.exports.legacyWarning = nativeBinding.legacyWarning
859
+ module.exports.loadScenes = nativeBinding.loadScenes
858
860
  module.exports.modes = nativeBinding.modes
859
861
  module.exports.personalities = nativeBinding.personalities
860
862
  module.exports.supportLevels = nativeBinding.supportLevels
package/binding.d.cts CHANGED
@@ -201,7 +201,8 @@ export declare class DeviceHandle {
201
201
  */
202
202
  provisionWifi(network: string, password: string, utcOffsetHours?: number | undefined | null, utcOffsetMinutes?: number | undefined | null): Promise<string>
203
203
  /**
204
- * Open the raw segment channel and paint it frame by frame.
204
+ * Open the raw segment channel and paint it frame by frame, over `lan`
205
+ * alone: another mode fails with `no_segment_command`.
205
206
  *
206
207
  * Power the device on first: arming a dark strip paints nothing. The
207
208
  * channel holds the colors only while it is armed, and the device goes
@@ -253,6 +254,8 @@ export declare class DeviceHandle {
253
254
  *
254
255
  * One color fills every zone. An array of colors, or a `Uint8Array` of
255
256
  * three bytes per zone, states them all. A zone list takes one color.
257
+ * The paint arms no channel, and the colors stay. `'native'` throws
258
+ * `native_zones_unreachable`: stream instead.
256
259
  *
257
260
  * @param [resolution='app']
258
261
  * @param [gradient=false]
@@ -263,6 +266,19 @@ export declare class DeviceHandle {
263
266
  * last zone back to the first.
264
267
  */
265
268
  gradient(on: boolean): Promise<Served>
269
+ /**
270
+ * Play a scene. A name or a code reads the library that `fetchScenes()`
271
+ * stored for the model. Over `lan` the device answers nothing: a scene
272
+ * that it does not play looks like one that it plays.
273
+ */
274
+ scene(scene: string | number | Scene): Promise<Served>
275
+ /**
276
+ * Store a drawing of the LEDs, which the device keeps playing. `colors`
277
+ * holds one color, or one per cell of `cells` (the other LEDs show the
278
+ * background), or one per zone of `resolution` without `cells`. `args`
279
+ * names the other arguments of the entry.
280
+ */
281
+ draw(drawing: { cells?: Array<number>, colors: [number, number, number] | Array<[number, number, number]> | Uint8Array, resolution?: number | 'app' | 'native' | 'groups', args?: Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>> }): Promise<Served>
266
282
  }
267
283
 
268
284
  /**
@@ -275,7 +291,7 @@ export declare class Devices {
275
291
  * Scan for the members, then send the verbs, power on first and power
276
292
  * off last. A member that fails takes no later step.
277
293
  */
278
- apply(verbs: { power?: boolean, brightness?: number, color?: [number, number, number] | Uint8Array, colorTemp?: number, segment?: { colors: [number, number, number] | Array<[number, number, number]> | Uint8Array, zones?: Array<number>, resolution?: number | 'app' | 'native' | 'groups', gradient?: boolean }, music?: { effect: number, sensitivity?: number, soft?: boolean, color?: [number, number, number] | Uint8Array }, gradient?: boolean }): Promise<Applied>
294
+ apply(verbs: { power?: boolean, brightness?: number, color?: [number, number, number] | Uint8Array, colorTemp?: number, segment?: { colors: [number, number, number] | Array<[number, number, number]> | Uint8Array, zones?: Array<number>, resolution?: number | 'app' | 'native' | 'groups', gradient?: boolean }, music?: { effect: number, sensitivity?: number, soft?: boolean, color?: [number, number, number] | Uint8Array }, gradient?: boolean, scene?: string | number }): Promise<Applied>
279
295
  /**
280
296
  * One handle per member, in outcome order, with the mode that
281
297
  * `Govee.devices()` pins.
@@ -311,6 +327,11 @@ export declare class Devices {
311
327
  * @param [gradient=false]
312
328
  */
313
329
  segment(colors: [number, number, number] | Array<[number, number, number]> | Uint8Array, zones?: Array<number> | undefined | null, resolution?: number | 'app' | 'native' | 'groups', gradient?: boolean | undefined | null): Promise<Array<Outcome>>
330
+ /**
331
+ * `DeviceHandle.scene()` on every member, by name or code. Each model has
332
+ * its own library, where one name can carry another code.
333
+ */
334
+ scene(query: string | number): Promise<Array<Outcome>>
314
335
  /** Set the interpolation between zones on every member. */
315
336
  gradient(on: boolean): Promise<Array<Outcome>>
316
337
  toString(): string
@@ -584,18 +605,44 @@ export declare class WalkReport {
584
605
  /** The version of the core this binding was built from. */
585
606
  export declare const CORE_VERSION: string
586
607
 
608
+ /**
609
+ * Fetch the scene library of `sku` over `cloud`, with no key, and cache it.
610
+ * Rejects with `scene_fetch_failed`, `scene_list_unreadable` or `bad_sku`.
611
+ */
612
+ export declare function fetchScenes(sku: string): Promise<Array<Scene>>
613
+
587
614
  /** The warning for the deprecated configuration folder, or `null`. */
588
615
  export declare function legacyWarning(): string | null
589
616
 
617
+ /**
618
+ * The scene library of `sku` that `fetchScenes()` stored. Throws
619
+ * `scene_list_missing`, `scene_list_unreadable` or `bad_sku`.
620
+ */
621
+ export declare function loadScenes(sku: string): Array<Scene>
622
+
590
623
  /**
591
624
  * Every mode name the core knows. A build carries a transport for those its
592
- * features name — `Govee.modes()` answers which.
625
+ * features name. `Govee.modes()` answers which.
593
626
  */
594
627
  export declare function modes(): Array<string>
595
628
 
596
629
  /** Every DMX personality the bridge knows. */
597
630
  export declare function personalities(): Array<string>
598
631
 
632
+ /** One scene that a model plays. */
633
+ export interface Scene {
634
+ /** Each effect of a scene has its own entry: `Aurora A`, `Aurora B`. */
635
+ name: string
636
+ /** The library's category. */
637
+ category: string
638
+ /** The code that the device reports back for the scene. */
639
+ code: number
640
+ /** The library's type for the parameters. */
641
+ sceneType: number
642
+ /** Empty for a scene that the firmware stores. */
643
+ param: Uint8Array
644
+ }
645
+
599
646
  /** Every support level a device file gives a mode. */
600
647
  export declare function supportLevels(): Array<string>
601
648
 
package/dist/index.d.ts CHANGED
@@ -5,8 +5,8 @@
5
5
  * `govee-toolkit` core. What is added here is what an addon cannot declare:
6
6
  * the asynchronous iterators, and the disposer a segment stream closes on.
7
7
  */
8
- import { Applied, AppliedStep, Catalog, Config, CORE_VERSION, Device, DeviceHandle, Devices, DeviceStatus, EventStream, Govee, Health, Invoked, Outcome, Reply, SegmentStream, Served, StatusStream, VERSION, WalkReport } from "../binding.cjs";
9
- export { Applied, AppliedStep, Catalog, Config, CORE_VERSION, Device, DeviceHandle, Devices, DeviceStatus, EventStream, Govee, Health, Invoked, Outcome, Reply, SegmentStream, Served, StatusStream, VERSION, WalkReport, };
8
+ import { Applied, AppliedStep, Catalog, Config, CORE_VERSION, Device, DeviceHandle, Devices, DeviceStatus, EventStream, fetchScenes, Govee, Health, Invoked, loadScenes, Outcome, Reply, type Scene, SegmentStream, Served, StatusStream, VERSION, WalkReport } from "../binding.cjs";
9
+ export { Applied, AppliedStep, Catalog, Config, CORE_VERSION, Device, DeviceHandle, Devices, DeviceStatus, EventStream, fetchScenes, Govee, Health, Invoked, loadScenes, Outcome, Reply, Scene, SegmentStream, Served, StatusStream, VERSION, WalkReport, };
10
10
  /** One RGB triple, each channel 0-255. */
11
11
  export type Color = [number, number, number];
12
12
  /** A value a device file's command takes as an argument. */
package/dist/index.js CHANGED
@@ -5,12 +5,12 @@
5
5
  * `govee-toolkit` core. What is added here is what an addon cannot declare:
6
6
  * the asynchronous iterators, and the disposer a segment stream closes on.
7
7
  */
8
- import { Applied, AppliedStep, Catalog, Config, CORE_VERSION, Device, legacyWarning, DeviceHandle, Devices, DeviceStatus, EventStream, Govee, Health, Invoked, modes, Outcome, personalities, Reply, SegmentStream, Served, StatusStream, supportLevels, VERSION, WalkReport, } from "../binding.cjs";
8
+ import { Applied, AppliedStep, Catalog, Config, CORE_VERSION, Device, legacyWarning, DeviceHandle, Devices, DeviceStatus, EventStream, fetchScenes, Govee, Health, Invoked, loadScenes, modes, Outcome, personalities, Reply, SegmentStream, Served, StatusStream, supportLevels, VERSION, WalkReport, } from "../binding.cjs";
9
9
  const legacy = legacyWarning();
10
10
  if (legacy !== null) {
11
11
  process.emitWarning(legacy, "DeprecationWarning");
12
12
  }
13
- export { Applied, AppliedStep, Catalog, Config, CORE_VERSION, Device, DeviceHandle, Devices, DeviceStatus, EventStream, Govee, Health, Invoked, Outcome, Reply, SegmentStream, Served, StatusStream, VERSION, WalkReport, };
13
+ export { Applied, AppliedStep, Catalog, Config, CORE_VERSION, Device, DeviceHandle, Devices, DeviceStatus, EventStream, fetchScenes, Govee, Health, Invoked, loadScenes, Outcome, Reply, SegmentStream, Served, StatusStream, VERSION, WalkReport, };
14
14
  /** Every mode name the core knows, in the order the core lists them. */
15
15
  export const MODES = Object.freeze(modes());
16
16
  /** Every support level a device file gives a mode, in the order the core lists them. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "govee-toolkit",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Take full control of your Govee lights from Node.js and TypeScript.",
5
5
  "license": "MIT",
6
6
  "author": "damient",
@@ -52,14 +52,14 @@
52
52
  "test": "node --test --test-concurrency=1"
53
53
  },
54
54
  "devDependencies": {
55
- "@napi-rs/cli": "^3.10.3",
55
+ "@napi-rs/cli": "^3.11.1",
56
56
  "typescript": "^7.0.2"
57
57
  },
58
58
  "optionalDependencies": {
59
- "govee-toolkit-linux-x64-gnu": "1.9.0",
60
- "govee-toolkit-linux-arm64-gnu": "1.9.0",
61
- "govee-toolkit-darwin-arm64": "1.9.0",
62
- "govee-toolkit-win32-x64-msvc": "1.9.0",
63
- "govee-toolkit-win32-arm64-msvc": "1.9.0"
59
+ "govee-toolkit-linux-x64-gnu": "1.10.0",
60
+ "govee-toolkit-linux-arm64-gnu": "1.10.0",
61
+ "govee-toolkit-darwin-arm64": "1.10.0",
62
+ "govee-toolkit-win32-x64-msvc": "1.10.0",
63
+ "govee-toolkit-win32-arm64-msvc": "1.10.0"
64
64
  }
65
65
  }