namacha / python-magichue

Control Magic Hue(Magichome) in Python.
MIT License
60 stars 14 forks source link

Cannot discover bulb using discover_bulbs() #40

Open kevonfernando opened 2 years ago

kevonfernando commented 2 years ago

Describe the bug I cannot discover my led strip using discover_bulbs. It always returns an empty list regardless of how long the timeout is set. But I can still use the bulb if provide the IP address manually.

To Reproduce Code to reproduce the behavior:

import magichue
from magichue import discover_bulbs, LocalLight

discover_bulbs()

Device

Additional context

namacha commented 2 years ago

I can't say for sure but divice firmware/protocol may differ so that discover_bulbs() won't work.

If you are using MagicHue(Magic Home) App and able to control bulbs over internet, remote API is another option:

from magichue import RemoteAPI
api = magichue.RemoteAPI.login_with_user_password(user='xxx', password='xxx')  # same as App id/password
online_bulbs = api.get_online_bulbs()
print(online_bulbs)