node-lifx-lan-multi 1.3.1 → 2.0.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 +9 -9
- package/package.json +21 -15
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
node-lifx-lan
|
|
1
|
+
node-lifx-lan-multi
|
|
2
2
|
===============
|
|
3
3
|
|
|
4
|
-
The node-lifx-lan is a Node.js module which allows you to communicate with the Wi-Fi LED smart light products "[LIFX](https://www.lifx.com/)" using the [LAN protocol](https://lan.developer.lifx.com/).
|
|
4
|
+
The node-lifx-lan-multi (forked from [node-lifx-lan](https://github.com/futomi/node-lifx-lan) by [Futomi Hatano](https://github.com/futomi)) is a Node.js module which allows you to communicate with the Wi-Fi LED smart light products "[LIFX](https://www.lifx.com/)" using the [LAN protocol](https://lan.developer.lifx.com/).
|
|
5
5
|
|
|
6
6
|
## Dependencies
|
|
7
7
|
|
|
8
8
|
- [Node.js](https://nodejs.org/en/) 12 +
|
|
9
|
-
- Though the node-lifx-lan may work on older version of Node for now, it is strongly recommended to use Node 12 or newer. The node-lifx-lan will not support old versions of Node in the future.
|
|
9
|
+
- Though the node-lifx-lan-multi may work on older version of Node for now, it is strongly recommended to use Node 12 or newer. The node-lifx-lan-multi will not support old versions of Node in the future.
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
$ cd ~
|
|
15
|
-
$ npm install node-lifx-lan
|
|
15
|
+
$ npm install node-lifx-lan-multi
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
---------------------------------------
|
|
@@ -92,7 +92,7 @@ The code below turns on all LIFX bulbs in the local network.
|
|
|
92
92
|
|
|
93
93
|
```JavaScript
|
|
94
94
|
// Create a LifxLan object
|
|
95
|
-
const Lifx = require('node-lifx-lan');
|
|
95
|
+
const Lifx = require('node-lifx-lan-multi');
|
|
96
96
|
|
|
97
97
|
// Turn on all LIFX bulbs in the local network
|
|
98
98
|
Lifx.turnOnBroadcast({
|
|
@@ -111,7 +111,7 @@ The code blow turns on LIFX bulbs whose group is `Room 1` in blue.
|
|
|
111
111
|
|
|
112
112
|
```JavaScript
|
|
113
113
|
// Create a LifxLan object
|
|
114
|
-
const Lifx = require('node-lifx-lan');
|
|
114
|
+
const Lifx = require('node-lifx-lan-multi');
|
|
115
115
|
|
|
116
116
|
// Discover LIFX bulbs in the local network
|
|
117
117
|
Lifx.discover().then(() => {
|
|
@@ -135,7 +135,7 @@ The code below turns on a LIFX bulb found first in yellow.
|
|
|
135
135
|
|
|
136
136
|
```JavaScript
|
|
137
137
|
// Create a LifxLan object
|
|
138
|
-
const Lifx = require('node-lifx-lan');
|
|
138
|
+
const Lifx = require('node-lifx-lan-multi');
|
|
139
139
|
|
|
140
140
|
// Discover LIFX bulbs in the local network
|
|
141
141
|
Lifx.discover().then((device_list) => {
|
|
@@ -160,7 +160,7 @@ Lifx.discover().then((device_list) => {
|
|
|
160
160
|
In order to use the node-lifx-lan, you have to load the node-lifx-lan module as follows:
|
|
161
161
|
|
|
162
162
|
```JavaScript
|
|
163
|
-
const Lifx = require('node-lifx-lan');
|
|
163
|
+
const Lifx = require('node-lifx-lan-multi');
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
In the code snippet above, the variable `Lifx` is a `LifxLan` object. The `LifxLan` object has methods as described in the sections below.
|
|
@@ -434,7 +434,7 @@ While the [`turnOffBroadcast()`](#LifxLan-turnOffBroadcast-method) method just s
|
|
|
434
434
|
|
|
435
435
|
The `destroy()` method closes the UDP socket, then disables the `LifxLan` object.
|
|
436
436
|
|
|
437
|
-
Once the node-lifx-lan module is loaded, the script can not finish automatically because UDP socket keeps to be open. Calling this method, the script can finish as expected.
|
|
437
|
+
Once the node-lifx-lan-multi module is loaded, the script can not finish automatically because UDP socket keeps to be open. Calling this method, the script can finish as expected.
|
|
438
438
|
|
|
439
439
|
```JavaScript
|
|
440
440
|
Lifx.destroy().then(() => {
|
package/package.json
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-lifx-lan-multi",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"main": "./lib/lifx-lan.js",
|
|
6
|
-
"files": [
|
|
7
|
-
"lib"
|
|
8
|
-
],
|
|
9
|
-
"directories": {
|
|
10
|
-
"lib": "./lib"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
|
-
},
|
|
3
|
+
"description": "Client library for interacting with LIFX smart home products",
|
|
4
|
+
"version": "2.0.0",
|
|
15
5
|
"keywords": [
|
|
16
6
|
"LIFX",
|
|
17
7
|
"Smart Home",
|
|
@@ -19,13 +9,29 @@
|
|
|
19
9
|
"Smart Light",
|
|
20
10
|
"Smart Bulb"
|
|
21
11
|
],
|
|
22
|
-
"homepage": "https://github.com/futomi",
|
|
23
|
-
"author": "Futomi Hatano <futomi.hatano@gmail.com> (https://github.com/futomi)",
|
|
24
12
|
"license": "MIT",
|
|
13
|
+
"author": "Samuel Goodell <sam@mangane.se> (https://samuelgoodell.com)",
|
|
14
|
+
"homepage": "https://gitlab.com/manganese/home/node-lifx-lan-multi",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://gitlab.com/manganese/home/node-lifx-lan-multi/-/issues"
|
|
17
|
+
},
|
|
25
18
|
"repository": {
|
|
26
19
|
"type": "git",
|
|
27
|
-
"url": "
|
|
20
|
+
"url": "git+ssh://git@gitlab.com/manganese/home/node-lifx-lan-multi.git"
|
|
28
21
|
},
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": "^18.17.0 || ^20 || ^22"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
27
|
+
},
|
|
28
|
+
"main": "./lib/lifx-lan.js",
|
|
29
29
|
"readmeFilename": "README.md",
|
|
30
|
+
"files": [
|
|
31
|
+
"lib"
|
|
32
|
+
],
|
|
33
|
+
"directories": {
|
|
34
|
+
"lib": "./lib"
|
|
35
|
+
},
|
|
30
36
|
"dependencies": {}
|
|
31
37
|
}
|