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 :)
import asyncio
from kasa import Discover
async def discover_devices() -> None:
devices = await Discover.discover()
print('Device Count: ', len(devices.keys()))
asyncio.run(discover_devices)