optional param interfaces at discover which can define the scannable network interfaces #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I installed a WireGuard VPN Server a few days ago at my pi zero and the lifx script didn't work any more. By default the lifx module try a broadcast to every non internal network interface and this results in an error at the WireGuard network interface wg0.
$ ip a
wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
link/none
inet 10.6.0.1/24 scope global wg0
valid_lft forever preferred_lft forever
inet6 fd08::1/64 scope global
valid_lft forever preferred_lft forever
Unknown system error -126 10.6.0.255:56700
I added an optional param interfaces to the method Lifx.discover(). With this I can define the network interfaces which could contain an active bulb. This fixed my problem.
I decided to take an array for this parameter that more than one interface could be used for the discover. If none interface is set it loops through all available like before.
Lifx.discover({ interfaces: [ 'eth0' ] })Hopefully I used the right documentation syntax and followed your code conventions ;)