You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After monkey patching http.client to avoid #12 I can successfully pair my Tradfri, but any packet sent after switching to SecureHttp never receives a response.
Oh right the response is just the ack, ignore me. I've also tried adding a Host: header to the request, since that seemed to be the only difference to what an iOS device seems to be sending at this point.
I'm using Hue bulbs, and it turns out that the Tradfri will only expose Ikea bulbs over Homekit :( I suspect it'd work fine now, I'm able to read the accessory-info characteristics.
Activity
jlusiardi commentedon Mar 12, 2018
can you attach the dump? afair the stuff was pretty picky about keeping the connection open...
mjg59 commentedon Mar 17, 2018
get_accessories.zip
Interesting - there does seem to be a response, but we're never doing anything with it. I'll dig further.
mjg59 commentedon Mar 17, 2018
Oh right the response is just the ack, ignore me. I've also tried adding a Host: header to the request, since that seemed to be the only difference to what an iOS device seems to be sending at this point.
jlusiardi commentedon Mar 17, 2018
The get_accessories dump seems odd. This should contain 0x06 for kTLVType_State somewhere?
mjg59 commentedon Mar 17, 2018
It looks like there's an 0x06 TLV at the end of each POST to pair-verify, and one at the end of each response?
mjg59 commentedon Mar 17, 2018
Ah - SecureHttp isn't changing \n to \r\n
mjg59 commentedon Mar 17, 2018
Yes, adding
data = data.replace("\n", "\r\n")
to the top of _handle_request() makes this work
mjg59 commentedon Mar 17, 2018
#14
jlusiardi commentedon Mar 18, 2018
so you get progress on the tradfri, any success in switching it on and off?
mjg59 commentedon Mar 18, 2018
I'm using Hue bulbs, and it turns out that the Tradfri will only expose Ikea bulbs over Homekit :( I suspect it'd work fine now, I'm able to read the accessory-info characteristics.