I'm using Python 3.12.5 on Windows, and trying to discover supported clocks always results in: No supported clocks found.
I have a couple of LYWSD02 and an MJWSD05MMC with PVVX firmware.
Digging further, I see two separate issues:
- When scanning, I noticed that sometimes, the advertisement data comes through multiple times, and subsequent ones have more info (like the local name.)
[2026-03-30 12:02:20] DEBUG:bleak.backends.winrt.scanner:Received 3F:59:C8:71:B0:F9: .
[2026-03-30 12:02:20] DEBUG:bleak.backends.winrt.scanner:Received 3F:59:C8:71:B0:F9: LYWSD02.
This is mentioned in the bleak docs:
The first received advertisement in detection_callback may or may not include scan response data if the remote device supports it. Be sure to take this into account when handing the callback. For example, the scan response often contains the local name of the device so if you are matching a device based on other data but want to display the local name to the user, be sure to wait for adv_data.local_name is not None.
The simple fix would be to add an entry to found_addresses on if the detection succeeds. With that fix, the detection works fine.
- When setting the time, the scan duration is not taken into consideration when constructing BleakClient. So sometimes, the detection succeeds (I need to set 60s to 90s for some of my clocks which are farther away or with low advertisement intervals), but setting doesn't, because it just uses the default timeout when doing so.
I have made some small changes to test that these changes actually fix the issues, so can contribute a PR if you would like. Let me know.
Thanks for the great work!
I'm using Python 3.12.5 on Windows, and trying to discover supported clocks always results in:
No supported clocks found.I have a couple of LYWSD02 and an MJWSD05MMC with PVVX firmware.
Digging further, I see two separate issues:
This is mentioned in the bleak docs:
The simple fix would be to add an entry to found_addresses on if the detection succeeds. With that fix, the detection works fine.
I have made some small changes to test that these changes actually fix the issues, so can contribute a PR if you would like. Let me know.
Thanks for the great work!