Closed henryruhs closed 2 years ago
In this line:
response = requests.get('https://discovery.meethue.com')
The link appears to be broken or incompatible for me to scrape from. When I visit on my machine that's used to run this HUE server for my home, it simply returns an empty list, thought It's currently connected to my bridge. This is a feature I want too, and it looks like a fail-proof way would be to use a N-UPnP protocol.
The result would return a list of stuff including this:
{ "id":"001788fffe16c18f", "internalipaddress":"192.168.2.20", "macaddress":"00:17:88:16:c1:8f", "name":"Philips Hue" }
Then, all we'd have to do is search and filter name to start with %ph and end in $Hue encase not all bridges are named with the same caps. Or compare the name to "Philips Hue" literally and once there is a match check the IP and throw it in a variable to call the connect() function with.
I see the potential to increase the customer experience when running this library so I will see what I can come up with.
In the meanwhile I wrote an independent discovery to get around networks that have a strong firewall.
Hello,
I stumbled upon this awesome project. What about providing automated IP discovery?
Method
discover_ip()
looks like that:Best regards