Fix Lifx plugin crash if cannot get local ip
Fix Lifx plugin crash if cannot get local ip

The LIFX LAN protocol has a 32-bit source identifier as a part of the packet header — when a request packet is sent with a source, the response will include that source. As the LAN protocol works over UDP, this is how a device interacting with a LIFX bulb may know that the LIFX is responding to a request that it sent. The convention appears to be to use the device IP Address as the identifier as it should be unique on the network (this is what the 1st -party app uses).

The plugin code was getting the array of usable IPs and using the first one to use as a source; however, in some environments, there would be no IPs it is picking up at plugin init time as thus would crash on picking out the first IP of none.

The code was updated to account for the scenario where the IP is not available at time of init. It will now attempt to fix the IP when it needs to use it in such a scenario.

droplit/droplit.io-edge,droplit/droplit.io-edge,droplit/droplit.io-edge