Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadcast IP addresses aren't populated properly when multiple network adapters are present #31

Open
1 of 3 tasks
casenjo opened this issue Aug 19, 2018 · 1 comment
Open
1 of 3 tasks

Comments

@casenjo
Copy link

casenjo commented Aug 19, 2018

  • I'm submitting a ...

    • bug report
    • feature request
    • feedback
  • If the current behavior is a bug, please provide the steps to reproduce
    Run the plugin in Windows 10, with Docker installed using the Win 10 Pro hypervisor.

  • What is the current behavior?
    I have an issue discovering the lights because of networking issues (I'm on Windows 10 with Docker installed). When Windows 10 has the Docker networking adapters set up there is only one broadcast IP address that is found instead of the multiple ones that should be found.

Example: My physical LAN adapter has a broadcast address of 192.168.1.255, the Docker one has 10.0.75.255, but the function lib/lifxlan/device::get_broadcast_addr() is only returning the Docker broadcast as a result.

  • What is the expected behavior?
    lib/lifxlan/device::get_broadcast_addr() should be returning all broadcast IP addresses in the host system.

  • (Important) Logs
    N/A (the current logs don't display the IP addresses found for in devices.py within the lifxlan library even when debug mode is enabled)

  • What is the motivation / use case for changing the behavior?
    Allow the use of the plugin when there's multiple networking adapters in the host system. I suspect the same might happen if you have VirtualBox set up with the adapters it brings in.

  • Please tell me about your environment:

    • Kodi Version: Krypton v17.6
    • Addon Version: develop
    • OS: Windows 10 Pro
    • Lifx Devices: 2 Lifx Z, 1 regular Lifx
  • Other information
    N/A

@sanghviharshit
Copy link
Owner

This is a known issue. The addon ships with a tweaked version of lifxlan dependency for get_broadcast_addr -

The latest version of Lifxlan finds all broadcast addresses correctly with the netifaces package - https://github.com/mclarkk/lifxlan/blob/master/lifxlan/device.py#L40.

netifaces is platform dependent and has different packages for mac, windows and linux.
Since I am trying to make this addon as platform independent as possible, I don't want to restrict the functionality limited to just those 3 platforms.
But if you really want to make it work, you can replace the lifxlan directory with the latest version of lifxlan from https://github.com/mclarkk/lifxlan and it should work. Let me know if it works for you or if you have any better suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants