discoverhue
Discovery of hue bridges per the Philips design guide.
Use discoverhue to find the IP addresses of all hue bridges on the LAN. If previously known bridge serial numbers are provided then the returned info will be filtered. Alternatively, serial numbers and last known IP addresses pairs may be provided. In this case, the provided addresses will be checked first and the discovery methods will only be executed if unmatched bridges remain.
Currently, discoverhue implements options one,two, and three of the Hue Bridge Discovery Guide available with registration at MeetHue.
Installation
pip install discoverhue
Examples
Execute discovery and return a dictionary of all found bridges:
import discoverhue
found = discoverhue.find_bridges()
for bridge in found:
print(' Bridge ID {br} at {ip}'.format(br=bridge, ip=found[bridge]))
Execute discovery and return a filtered list of bridges:
# using a list, matches will be removed from search_id
search_id = ['0017884e7dad', '001788102201']
found = discoverhue.find_bridges(search_id)
# using a set, matches will be removed from search_id
search_id = {'0017884e7dad', '001788102201'}
found = discoverhue.find_bridges(search_id)
# using a tuple, immutable so matches will not be removed
search_id = ('0017884e7dad', '001788102201')
found = discoverhue.find_bridges(search_id)
Execute discovery and return single IP address as string:
>>> found = discoverhue.find_bridges('001788102201')
>>> found.lower()
'http://192.168.0.1:80/'
Validate provided IP’s and execute discovery only if necessary:
>>> discoverhue.find_bridges({'0017884e7dad':'192.168.0.1',
'001788102201':'192.168.0.2'})
{'0017884e7dad': 'http://192.168.0.27:80/'}
Contributions
Welcome at https://github.com/Overboard/discoverhue
Status
Released.
SSDP Attribution
Original compliments of @dankrause at
Python3 support from @voltagex at
https://github.com/voltagex/junkcode/blob/master/Python/dlna_downloader/ssdp.py
Server field addition and Win32 @Overboard at
https://github.com/Overboard/discoverhue/blob/master/discoverhue/ssdp.py
Metadata
Release files for discoverhue 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| discoverhue-1.0.2.tar.gz | 13.2 kB | Without provenance | Details for discoverhue-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| discoverhue-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for discoverhue-1.0.2-py3-none-any.whl |
Total release size: 23.5 kB
Release files / discoverhue-1.0.2.tar.gz
| Download URL | discoverhue-1.0.2.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
855c691e686191f9b25728732fec6e8129f74d02995e2a7ae56404185a2cafac
|
|
BLAKE2b-256 checksum How to use checksums |
f43f2bcc41c7f754d37d55febae6293322eeaea28f2b0ff226aea5c39a88382a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / discoverhue-1.0.2-py3-none-any.whl
| Download URL | discoverhue-1.0.2-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54452e5a3d580878086da64639b73a3414e91fd5ab77314457e81f7a2b432aff
|
|
BLAKE2b-256 checksum How to use checksums |
5e591a33d391c50c6a6ac587f8a40724c05384bec95ccce3ebe90b00c0440e66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for discoverhue 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.