node-lifx-lan-multi 1.1.9 → 1.2.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/lib/lifx-lan-udp.js +3 -0
- package/lib/lifx-lan.js +1 -0
- package/package.json +1 -1
package/lib/lifx-lan-udp.js
CHANGED
|
@@ -56,6 +56,9 @@ LifxLanUdp.prototype.init = function (config = {}) {
|
|
|
56
56
|
let promise = new Promise((resolve, reject) => {
|
|
57
57
|
this._source_id = Math.floor(Math.random() * 0xffffffff);
|
|
58
58
|
let netif_list = mAddress.getNetworkInterfaces();
|
|
59
|
+
if (config.network_interfaces && config.network_interfaces.length > 0) {
|
|
60
|
+
netif_list = (netif_list ?? []).filter(netif => config.network_interfaces.indexOf(netif.address) >= 0);
|
|
61
|
+
}
|
|
59
62
|
if (!netif_list || netif_list.length === 0) {
|
|
60
63
|
reject(new Error('No available network interface was found.'));
|
|
61
64
|
return;
|
package/lib/lifx-lan.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-lifx-lan-multi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "The node-lifx-lan is a Node.js module which allows you to communicate with the Wi-Fi LED smart light products \"LIFX\" using the LAN protocol.",
|
|
5
5
|
"main": "./lib/lifx-lan.js",
|
|
6
6
|
"files": [
|