sanghviharshit / script.kodi.lifx.ambilight

💡📺🌈Kodi add-on for Lifx lights with ambilight support.
https://bit.ly/kodilifx
GNU General Public License v2.0
32 stars 13 forks source link

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

Open casenjo opened 5 years ago

casenjo commented 5 years ago

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.

sanghviharshit commented 5 years ago

This is a known issue. The addon ships with a tweaked version of lifxlan dependency for get_broadcast_addr -https://github.com/sanghviharshit/script.kodi.lifx.ambilight/blob/28f758ac67fa676ecd4622f9e9592b8e123bb5b2/resources/lib/lifxlan/device.py#L38

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.