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

Fix tado bridge support #130

Merged
merged 4 commits into from
Apr 14, 2019
Merged

Fix tado bridge support #130

merged 4 commits into from
Apr 14, 2019

Conversation

Jc2k
Copy link
Collaborator

@Jc2k Jc2k commented Apr 14, 2019

Have been trying to help Tado HASS users here.

There were 2 issues which need tweaks on the homekit_python side:

  • The HTTPConnection used by pairing is injecting a Accept-Encoding: identity header - tado connection hangs if this is present. A real iPhone doesn't add an Accept-Encoding header.

  • The secure http code doesn't insert a Host header. The tado drops the secure session in that case. A real iPhone does include a Host header here.

With these changes they can pair and see their thermostats.

@jlusiardi
Copy link
Owner

Well done! Is there anyway to figure this out from the spec? Do we have to include some other apple spec to make the correct REST calls?

@Jc2k
Copy link
Collaborator Author

Jc2k commented Apr 14, 2019

Not that i'm aware of - i just compared wireshark logs for pairing to demoserver.py from my iPhone with homekit.pair and worked my way through the differences.

For the problems with securehttp the encryption got in the way so i enabled this specific debug log and compared my phone and homekit_python talked to demoserver:

        if AccessoryRequestHandler.DEBUG_CRYPT:
            self.log_message('crypted request >%s<', decrypted)

that was enough to flag things up.

There are still more differences - this was enough to get the tado working.

@Jc2k Jc2k deleted the fix_tado_bridge branch April 14, 2019 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants