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

Windows 10 - No Devices Found #60

Closed
NobleBrutus opened this issue Aug 6, 2017 · 15 comments
Closed

Windows 10 - No Devices Found #60

NobleBrutus opened this issue Aug 6, 2017 · 15 comments

Comments

@NobleBrutus
Copy link
Contributor

NobleBrutus commented Aug 6, 2017

I downloaded the lifxlan repository and installed it on Win 10. https://github.com/mclarkk/lifxlan

However, when I run the hello_world it says found 0 lights.

When I use the 'sniffer' though it picks up packets from my light?

I can see the light in both the Win10 and Android apps.

Cheers.

Addendum: I also checked the IP addresses and confirmed they are on the same subnet.

@NobleBrutus
Copy link
Contributor Author

Interestingly I managed to fix this... by disabling the previous Windows 10 fix..

image

@mclarkk
Copy link
Owner

mclarkk commented Aug 6, 2017

I wish I could figure out what is up with these addresses and why sometimes one works and not the other!

MacBook Pro (third generation): Local and global addresses both work.
MacBook Pro (fourth generation): Only the global broadcast works.
Windows 10 (VM and another lifxlan user): Only the local broadcast works.
Windows 10 (colleague's laptop): Neither address works.
Windows 10 (your machine): Only the global broadcast works.

I have not been able to figure out what the determining factor is!

@NobleBrutus
Copy link
Contributor Author

Well I highly appreciate your work on this!

Do you think an RGB to HSBK converter function would be useful to have in this package? I had to write one so I could share it if you like.

@mclarkk
Copy link
Owner

mclarkk commented Aug 6, 2017

That sounds great! Where were you thinking of putting it? Maybe lifxlan.py outside of the LifxLAN class? Or in a new file?

@NobleBrutus
Copy link
Contributor Author

NobleBrutus commented Aug 6, 2017

I pushed a new 'accessory_functions.py' file. It didn't really fit with any of the existing scripts as far as I could see. Feel free to move it to wherever though. I'm not very familiar with GitHub - does it give you the option to merge it in?

@mclarkk
Copy link
Owner

mclarkk commented Aug 6, 2017

If you forked or branched the repo, you can create a pull request! You could also post a Gist or something and I can check the file in, but it would be nice to have you listed as a contributor since you're contributing :)

@ceboxsell
Copy link

ceboxsell commented Aug 6, 2017

I am probably wrong here but with the broadcast the new code selects the first network that isn't a localhost one. This is based upon the priority set by the OS.
If you have a wifi connection and a LAN connection (even if the LAN connection has used the default IP due to no DHCP etc but is live for some reason) the LAN connection then is the default connection (faster speed I guess) and this is the one that is used for the broadbast.
The ideal would be to detect all non local subnets and broadcast on each, if no response comes from a subnet discard it.

@bamzero
Copy link

bamzero commented Aug 21, 2017

Thanks for the heads up.. Had this issue on both a Win 10 and Win 7 machine.
Both machines were using Realtek devices with fixed IP's.
On Win 10 it was the sole network adapter, the Win 7 also had a bluetooth and wireless adapter (disabled wireless though)

@joezappie
Copy link

Was this ever solved? Seems like I'm running into the exact same issue. No lights are detected, broadcast all doesn't work, but I can control my lights from the LIFX windows 10 app. Their updater also discovers devices on my computer so it can definitely see it.

@NobleBrutus
Copy link
Contributor Author

AFAIK you just have to experiment with different addresses until you find one that works for you. Have you tried the change that worked for me right at the beginning of the thread?

@joezappie
Copy link

I couldn't get it to work with that change. I've since switched to using my Pi as a bridge because that worked with no problems.

@joezappie
Copy link

joezappie commented Oct 25, 2017

I'm back into trying to figure out why this isn't working for me on my desktop. Running the verbose example, I see that the mac addresses are all 00:00:00:00:00:00 and they are timing out. The IP wasn't in the list so I printed that out as well and it's coming back with 192.168.56.1. My router is 192.168.2.1 and my devices are 192.168.2.15 and 192.168.2.16. I tried the fix posted in this thread and set back to 255.255.255.255 but either way, it comes up with that same .56 subnet. If I manually set it to 192.168.2.255 it gives me multiple GetService responses, but only with 1 IP address and that IP address isn't a device connected to my router. Any ideas?

Edit Realized I had an adapter for Virtual Box which is where the .56 subnet is coming from. Still doesn't explain why I can't find any devices when set to the proper subnet.

@mclarkk
Copy link
Owner

mclarkk commented Dec 10, 2017

Can you post the modified code from device.py? That would be really helpful.

Also yes, I think a great general solution for the library would be to do what @ceboxsell suggested and send broadcast messages to ALL interfaces. That should fix a lot of these problems.

@mclarkk
Copy link
Owner

mclarkk commented Dec 10, 2017

I pushed some changes, now broadcast should send broadcast messages to all subnets. The 255.255.255.255 address is totally gone now. Can you pull the code, rebuild, and see if it works?

@ceboxsell
Copy link

Works well for me, have not tried with a 2nd nic in operation yet but going by the code I can't see a problem any more.

@mclarkk mclarkk closed this as completed Dec 15, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants