node-lifx-lan-multi 1.1.5 → 1.1.7

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.
@@ -79,6 +79,7 @@ LifxLanUdp.prototype.init = function (config = {}) {
79
79
  this._receivePacket(buf, rinfo);
80
80
  });
81
81
  this._udp.bind({
82
+ address: '0.0.0.0',
82
83
  port: config.udp_receive_port ?? this._UDP_PORT,
83
84
  exclusive: false
84
85
  });
@@ -316,18 +317,24 @@ LifxLanUdp.prototype._checkRequestParams = function (params) {
316
317
  };
317
318
 
318
319
  LifxLanUdp.prototype._receivePacket = function (buf, rinfo) {
320
+ console.log("LIFX packet received");
319
321
  if (this._isNetworkInterfaceAddress(rinfo.address)) {
322
+ console.log("LIFX packet is addressed to network interface address, ignoring");
320
323
  return;
321
324
  }
322
325
  let parsed = mParser.parse(buf);
323
326
  if (!parsed) {
327
+ console.log("LIFX packet could not be parsed");
324
328
  return;
325
329
  }
326
330
  parsed['address'] = rinfo.address;
327
331
  let seq = parsed['header']['sequence'];
328
332
  let callback = this._requests[seq];
329
333
  if (callback) {
334
+ console.log("LIFX packet callback");
330
335
  callback(parsed);
336
+ } else {
337
+ console.log("LIFX packet no callback identified");
331
338
  }
332
339
  };
333
340
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-lifx-lan-multi",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
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": [