-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list_accessories_and_characteristics doesnt work over a secure session #80
Comments
Hi, i guess this fragment serves as reproducible test for this issue? import json
import argparse
from homekit.controller import Controller
from homekit.log_support import setup_logging, add_log_arguments
def setup_args_parser():
parser = argparse.ArgumentParser(description='HomeKit get accessories app')
parser.add_argument('-f', action='store', required=True, dest='file', help='File with the pairing data')
parser.add_argument('-a', action='store', required=True, dest='alias', help='alias for the pairing')
parser.add_argument('-o', action='store', dest='output', default='compact', choices=['json', 'compact'],
help='Specify output format')
parser.add_argument('--adapter', action='store', dest='adapter', default='hci0',
help='the bluetooth adapter to be used (defaults to hci0)')
add_log_arguments(parser)
return parser.parse_args()
if __name__ == '__main__':
args = setup_args_parser()
controller = Controller(args.adapter)
controller.load_data(args.file)
pairing = controller.get_pairings()[args.alias]
r = pairing.get_characteristics([(1, 4)])
del pairing.pairing_data['accessories']
setup_logging(args.loglevel)
data = pairing.list_accessories_and_characteristics()
print(json.dumps(data, indent=4)) The issue is, that
|
Exactly on both counts. Although as Apple advise to do this over a secure session after pairing and we already have a pairing to use this method, I wonder if it should be updated to always create a secure session if one doesn't exist like the other methods on pairing? |
made some little progress. but this tends to render the accessory to a state were I have to factory reset :/ |
A bug, but not the most critical.
It only works now if its called before something that establishes a secure session. Thankfully thats the case with our current pairing code.
The spec says we should call this over secure session after pairing.
The text was updated successfully, but these errors were encountered: