You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,36 @@
1
1
# Logitech Litra Glow
2
2
3
-
This JavaScript library allows you to control your [Logitech Litra Glow](https://www.logitech.com/en-gb/products/lighting/litra-glow.946-000002.html) light programatically.
3
+
This JavaScript driver allows you to control your [Logitech Litra Glow](https://www.logitech.com/en-gb/products/lighting/litra-glow.946-000002.html) light using a CLI and from your JavaScript code.
4
4
5
5
With this driver, you can:
6
6
7
7
* Turn your light on and off
8
8
* Set the brightness of your light
9
9
* Set the temperature of your light
10
10
11
-
## Compatability
11
+
## Compatibility
12
12
13
13
This library is only tested on macOS Monterey (12.5). It's powered by [`node-hid`](https://github.com/node-hid/node-hid), which is compatible with other macOS versions, Windows and Linux, so it would be expected to work there too, but your milage may vary 🙏
14
14
15
-
## Installation
15
+
## Using as a command line tool
16
16
17
-
Simply add the `litra-glow` Node.js package to your `package.json`:
17
+
Make sure you have Node.js available on your machine, and then install the package with `npm install -g litra-glow`.
18
+
19
+
With the package installed, use the `litra-on` and `litra-off` commands to turn your light on and off.
20
+
21
+
## Using as a JavaScript library
22
+
23
+
### Installation
24
+
25
+
Simply add the `litra-glow` Node.js package to your `package.json` and install it:
18
26
19
27
```sh
20
28
npm install --save litra-glow
21
29
```
22
30
23
-
## Usage
31
+
###Usage
24
32
25
-
### Checking if a Litra Glow is plugged in
33
+
####Checking if a Litra Glow is plugged in
26
34
27
35
The `findDevice` function checks your computer to find whether a Logitech Litra Glow is plugged in.
28
36
@@ -36,7 +44,7 @@ const device = findDevice();
36
44
37
45
If you're a *huge* fan of the Litra Glow and you have multipled plugged in at the same time, it'll return whatever one it happens to find first.
38
46
39
-
### Turning your Litra Glow on or off
47
+
####Turning your Litra Glow on or off
40
48
41
49
Find your device with `findDevice`, and then use the simple `turnOn` and `turnOff` functions. They just take one parameter: the device.
42
50
@@ -50,7 +58,7 @@ turnOn(device);
50
58
setTimeout(() =>turnOff(device), 5000));
51
59
```
52
60
53
-
### Setting the brightness of your Litra Glow
61
+
####Setting the brightness of your Litra Glow
54
62
55
63
You can set the brightness of your Litra Glow, measured in Lumen, using the `setBrightnessInLumen` function. The Litra Glow supports brightness between 20 and 250 Lumen:
56
64
@@ -72,7 +80,7 @@ const device = findDevice();
72
80
setBrightnessPercentage(device, 75);
73
81
```
74
82
75
-
### Setting the temperature of your Litra Glow
83
+
####Setting the temperature of your Litra Glow
76
84
77
85
You can set the temperature of your Litra Glow, measured in Kelvin, using the `setTemperatureInKelvin` function. The Litra Glow supports temperature between 2700 and 6500 Kelvin:
0 commit comments