mrwiwi / tydom2mqtt

Link between a Delta Dore's Tydom Hub and and a MQTT broker, unofficial of course.
MIT License
28 stars 17 forks source link

Failed to open websocket #14

Closed LudoMon closed 3 years ago

LudoMon commented 3 years ago

Hello,

First of all, thank you for your work!

Yesterday evening, my Tydom 1.0 asked me for a firmware update, it is now in version 02.05.12.

After the update, I installed your add-on in HomeAssistant, configured it (I triple checked, the MAC address and the password seem correct), and started it.

In the logs, I have the following error :

Building headers, getting 1st handshake and authentication....
Upgrading http connection to websocket....
Attempting websocket connection with tydom hub......................
ValueError: invalid HTTP header line:   realm="Protected Area",

It seems that the first HTTPS request returns a 401 response (as expected), but the websocket connection too, I don't know why.

If it is any help, here is the header of the first HTTPS response :

Digest username="XXXXXXXXXXXX", realm="Protected Area", nonce="0ab4739bd510249843a46ab73f84d846", uri="/mediation/client?mac=XXXXXXXXXXXX&appli=1", response="7102b8d00e0710ec7b5620c57f169d92", qop=auth, nc=00000001, cnonce="fd0389ed"

Thanks in advance 😉

mrwiwi commented 3 years ago

I got the same version as you, no issue whatsoever !

Waiting on expertise from mgcrea ;)

LudoMon commented 3 years ago

All right, thank you

LudoMon commented 3 years ago

@mrwiwi do you have a Tydom 1.0 or another Delta Dore box?

mrwiwi commented 3 years ago

Tydom 1.0 here, indeed 2.0 seems different...

LudoMon commented 3 years ago

For now I can't manage to sniff the websocket connection between my smartphone and the Tydom box...

But I just can't see what I could do wrong. I installed the plugin, filled the options with my box IP address, MAC address and password, and pressed start. Is there anything else to know ? Any specific operation to do with the Tydom box ?

LudoMon commented 3 years ago

@mrwiwi I made a password reset of my Tydom 1.0 (it started with a digit, I don't know if it plays any role in this), and updated your plugin to its last version, and it works!!

I can not thank you enough for your work, it's amazing ❤️

I close the issue