Skip to content
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

Homekit pairing failed #16

Closed
Neustradamus opened this issue Apr 16, 2021 · 3 comments
Closed

Homekit pairing failed #16

Neustradamus opened this issue Apr 16, 2021 · 3 comments

Comments

@Neustradamus
Copy link
Contributor

Originally: ckdo#6

@yuhengqiu commented Aug 1, 2020 •

Hi guys, when I tried to pair to HomeKit, I got "Coundn't add Accessory" error and failed.
Actually it was stucked at:

POST /pair-add Not implemented!
10.0.0.71 -- [01/Aug/2020 17:27:31] code 404, message Not Found

If I implements pair-add in hap.py, then it added pair, but got stucked at:

Exception happened during processing of request from ('10.0.0.71', 51700)
Traceback (most recent call last):
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock
self.process_request(request, client_address)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/socketserver.py", line 347, in process_request
self.finish_request(request, client_address)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/socketserver.py", line 720, in init
self.handle()
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/server.py", line 428, in handle
self.handle_one_request()
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/server.py", line 394, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/Volumes/Workspace/App/airplay2-receiver/ap2/pairing/hap.py", line 348, in recv_into
data = self.recv(nbytes, flags)
File "/Volumes/Workspace/App/airplay2-receiver/ap2/pairing/hap.py", line 366, in recv
block_length_bytes = self.socket.recv(self.LENGTH_LENGTH)
File "/Volumes/Workspace/App/airplay2-receiver/ap2/pairing/hap.py", line 357, in recv
assert not flags and buflen > self.LENGTH_LENGTH
AssertionError

Anyone has succeed in pairing to HomeKit? Did I miss something? Cheers

@systemcrash
Copy link
Member

@yuhengqiu Can you try with the latest master? We added #27 which should make it obvious which Flags are needed for HomeKit.

@TheSpookyCat
Copy link
Contributor

@yuhengqiu Can you try with the latest master? We added #27 which should make it obvious which Flags are needed for HomeKit.

#27 will not fix this problem - I don't think there is any code to implement HomeKit support.
https://developer.apple.com/homekit/specification/ The HomeKit spec does not go into detail on how we can implement this. Looks like we might need someone who has access to an MFi-enrolled account in order to get HomeKit pairing working.

@TheSpookyCat
Copy link
Contributor

Could someone please close in favour of #38?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants