zeroconf error when protocol version not defined
See original GitHub issueCommand:
python3 -m homekit.discover
Results:
Properties: {b'ff': b'1', b'ci': b'2', b'id': b'a8:1b:6a:01:d1:bc', b'sf': b'1', b'md': b'Smart Bridge 2', b'c#': b'11', b's#': b'1'}
Name: Smart Bridge 2._hap._tcp.local.
Url: http://192.168.7.37:4548
Configuration number (c#): 11
Feature Flags (ff): Supports Pairing (Flag: 1)
Device ID (id): a8:1b:6a:01:d1:bc
Model Name (md): Smart Bridge 2
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/srv/homeassistant/lib/python3.5/site-packages/homekit/discover.py", line 32, in <module>
discover_homekit_devices()
File "/srv/homeassistant/lib/python3.5/site-packages/homekit/zeroconf.py", line 55, in discover_homekit_devices
print('Protocol Version (pv): {pv}'.format(pv=info.properties[b'pv'].decode()))
KeyError: b'pv'
I added the top print to show the entire contents of info.properties
, funny enough all the other devices that show up list a PV.
A simple if b'pv' in info.properties:
wrap around that print line solved that particular issue for me.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
mDNS resolution not working for iOS devices with app built ...
mDNS resolution is always returning 0 results and throwing an UnobservedTaskException silently for iOS devices (w/ iOS 14.5), when the app ...
Read more >python-zeroconf API reference
Exception when a service name is already registered. This module provides a framework for the use of DNS Service Discovery using IP multicast....
Read more >4. Browsing for Services - Zero Configuration Networking
This chapter introduces DNS Service Discovery (DNS-SD), the mechanism in Zeroconf that lets you discover what services are available on the network without ......
Read more >mdns — User Guide
However, that does not mean it is equally well supported on all platforms. ... Things like the protocol version should be negotiated in-band...
Read more >Zeroconf API - Spotify for Developers
If any required field is not specified, the response must be an error of ... version, No, String, Spotify client ZeroConf API version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, forgot to push to github. Pypi will follow…
I don’t see it merged into master and pushed to pypi?