-
-
Notifications
You must be signed in to change notification settings - Fork 223
Unable to Discover KL125 Smart Bulbs with kasa.Discover.discover() if they've been off or not queried for a few minutes #320
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
Comments
Hi Elias and thanks for the nice words! It is always nice to hear some positive feedback now and then :-) I have seen similar behavior on my KL* bulb earlier (and I haven't seen it with any other device types by myself), and someone somewhere suggested that it might be caused by power saving feature of the wifi chips which do periodical sleeps in-between. If you wish to help debug this, you could try modifying https://github.com/python-kasa/python-kasa/blob/master/kasa/discover.py#L69-L70 to sleep for some period (0.05s, 0.1s, 0.3s, 0.5s, 1s) after each The cloud connectivity may have different means to "wake up" the device, so it's not really something we can do in this library. I suppose the cloud commands will awake the device from this wifi sleep mode. |
Hey rytilahti, Thanks for getting back to me! I'll try tweaking the discover function to sleep in between the calls. If it works for me, I'll make a PR. Thanks! |
#229 might be related. |
I confirm that the discovery of KL125 did not work for me too. After 1-3 that failed, I just went with a direct connection to the default ip address and it worked to configure/pair a new device. |
@timemaster67 When you say "direct connection", what exactly do you mean? Just pinging that IP over LAN with a TCP request? Or did you just pass the default IP into the SmartBulb initializer? Thanks! |
@eliasdefaria
to join my new KL125 bulb to my network. Those two commands worked without issue.
I never flashed a new firmware on them and never allowed them access to the public internet. So they are exactly as shipped. bought 1 week and 3 weeks ago. Let me know if you need the full sysinfo. Now, all the bulbs have been added to my IOT network. If I try to discover from my laptop connected to the same network, discover will not find anything. Don't worry because it's more likely because I firewalled them pretty tight. Broadcast to 255.255.255.255 is not enabled and it's a drop by default policy. Tried to enable it but I would probably need to inspect the packets to make a rule to allow them to test properly. I might not be the best to test this scenario, but will help if needed. |
@timemaster67 Ahh got it. I'll give that direct "join" command ago with the Python interface and report back. Thanks for your help! |
There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs. |
Uh oh!
There was an error while loading. Please reload this page.
Hey there,
Firstly, I've been super excited about building on top of python-kasa and have really enjoyed the experience thus far. However, I've run into an issue recently with the KL125 Smart Bulbs. Upon logging the response from the discover function (see code below), oftentimes the response does not include all the Smart Bulbs functioning on the network. I've noticed a pattern where if I wait a few minutes, all of the Smart Bulbs end up not being discoverable by this function. However, if I then interact with the Kasa iOS app and just toggle off and on a single Smart Bulb, they all become discoverable again by calling this function.
The other funny part is this behavior does not reproduce with my KP303 Smart Plug Power Strip. No matter how long I wait, this device is always discoverable on the network.
Is there a sleep function with the Smart Bulbs that I've missed? Do they need a constant source of power like the Power Strip to always be Discoverable?
Thanks so much for your help! Love this team's work :)
The text was updated successfully, but these errors were encountered: