Integrating New (2023) TyDom Deltadore X3D Zigbee gateway with Home Assistant (Solved)

Continuing the discussion from tydom2MQTT addon :smiley: - Delta Dore Tydom to MQTT Broker:

Integrating New (2023) TyDom with Home Assistant (Done but a bit complex)

Integrating the new version of TyDom to control Delta Dore products via Home Assistant is not simple but feasible :frowning:
My shutters are controlled via X3D. Living facing the Atlantic in Brittany (60m above see level), I need to open them as soon as the wind reaches 100km/h, I had no real alternatives as to fix the integration. Necessity is a strong motivation.
With the new version of TyDom device, the trick, given in various forum, to change the password using the older TyDom App (V3.x) or using the K-Lines App does not work, you need to hack the system to find the TyDom device password (this is not the same as your TyDom login).

A post from Solverj in Dec 2022 opened the path to success, the trick is to use Charles Proxy to extract the Password at initialisation. Thanks for that hint.

Charles Proxy configuration
You can do it with the free demo version of Charles Proxy (just adds some delay in action and 30mn auto stop). Charles Proxy runs under Linux, Windows and MacOS. I used Linux (OpenSuse). It can be downloaded from here:
https://www.charlesproxy.com/download/latest-release/
On Linux just untaring and run it from your home directory will do (no need to be root or to install anything).
I used the HTTP proxy mode (default mode).

Then you need to activate the ssl proxy for all host (simple options).
Note: from CharlyProxy 3.4 you must do this as the proxy works in opt-in by default.
The default certificates will do the trick (it will use default Charles Proxy Certificates)
Screenshot_SSL-ProxySettings

Charles proxy can do a lot and I have just taken the minimum that I required to do that job. The documentation can be useful.

Configure the proxy on tablet or phone running TyDom V.4 App

  1. Add Charles Proxy CA certificate
    Please follow the procedure to add the certificate to your tablet. This is mandatory as TyDom device uses an ssl web socket.
    Charles Proxy Certificates download is easy and well documented but allowing their installation of you tablet or phone depends of your devices. A pain but a must do.
  2. Setting the proxy
    Now that you have the proxy ready and running, you need to configure your device (tablet or phone) running TyDom V4 to use that proxy.
    Depending of your device the method will change but you need to setup the proxy for all application not only for your browser.
    This is to be done via a manual configuration.
    I use an Android tablet and the setting is hidden under the edit logo of the used network connection.
    The proxy setting IP=hostIP-RunningCharlesProxy Port=8888

Capture the password

  1. Start a session from scratch. The simplest, for me, was to power off the TyDom Pro device and force a stop on the TyDom App.
  2. Start recording on Charles Proxy (start & clean current recording - Broom and Red Button icons). A lot easier to see what to look at if there is little noise internet traffic when doing so.
  3. Start TyDom App and connect to your TyDom device. Your could be asked for its MAC address.
  4. Stop recording once the TyDom App shows your 3XD installation.

Find the password in the web socket traffic
You need to find the websocket capture entry. The source will be the IP address of the TyDom device. In my case 192.168.1.9 (I use the DHCP server to provide fixed address to special devices).
You need to find the web socket capture (should be the biggest sent by your TyDom device after connecting the TyDom App).
The need to select the “Content” tab as the next step cannot be done from the “WebSocket” tab :frowning:
You need to select the option as shown in the image bellow.

You then need to scroll the websocket traffic to find the password (the Find does not seem to do what I would expect). Once you have spot the message corresponding to the Websocket dialogue, you must scroll on that message as shown in the image just above. Once on the message activate the web socket tab to read the web socket dialogue in clear. The part corresponding to the password will look as the image bellow.
Mine is long and typical of random generated password.

> HTTP/1.1 200 OK
> Server-Tydom-001A25xxxxxx
> Uri-Origin: /configs/gateway/password
> Content-Type: Application/json
> Transfer-Encoding: chanked
> Transac-ID: xxxxxxxxxxxxxxxx
> 
> 1E
> {'current':"YourPassword"}

Write it somewhere safe.
Note : I do not know if that password is stable over the time, but it remained unchanged after several power cut for at least one year.
Todo: find and describe a simpler method to extract the TyDom Device password

Configuration of Home Assistant
You need to install two adds-on:

Configuring Mosquitto
You just need to add a user in Home assistant that will by used by Mosquitto. So you do not need to change the add-on configuration.
yourHomeAssistantIP:8123/config/users

Configuring tydom2MQTT

  1. Bug with Alarm PIN (should be corrected one day)
    The option is not initially visible from the WebUI, and the default value makes the parsing fail :frowning:
    You need to go in the HA Config tab and select from the extra menu (3 vertical points), the facility to change config via the Yalm.
    add the following line even if you do not have an alarm. You add any 6 digits value:
    TYDOM_ALARM_PIN: "123456"

  2. Add what is really needed

   - MAC address of the TyDom
   - IP address of the TyDom
   - IP address of the MQTT broker (homeassisant will do when run as add-on)
   - a valid user and password previously declared in HomeAssistant.
It should look something like this.

Check your logs
Everything should run and you should be able to play with the equipment configured with TyDom App.

ZigBee equipment
I could not see any Zigbee device paired with the TyDom2 device from HA even those configured via TyDom App.
My advise buy a USB Zigbee stick.

Enjoy

5 Likes

On my side, everything works fine as well but the latest release doesn’t recognize the Easy Plug with energy meter.

Any information ?

Hello Dominig,
K-Lines use DVI device from DeltaDore to have the status of a windows. This information is only availaible with TYDOM.
With HA is it possible to extract this information?

Thanks for your help,

You need to check that an MQTT message is associated with the device of interest.
If yes a variable should be available but it’s name might not be what you expected.
A direct control of the service might missing in the TyDom code for your use case. But patches are in general welcome as maintainer cannot have all the device to reverse engineer all the features :slight_smile:

Thanks for the documentation !

The Charles Proxy documentation says it’s not possible to install a root certificate on a phone with Android N and above …
I’ve thought about pushing it through an MDM not the easiest way if you’re not an IT admin with access to such professional tools.
Intunes documentation says it’s no more supported either by android, thought samsung with know does still allow it.

Before trying that I just exported the certificate, and found I could install it in my Galaxy S23 straight away. with no sofisticated tools…

I think the option to add Root CA to Android is not available in all manufacturers of Android devices.
however probably it is possible in any samsung.

In Charles Proxy > Help > SSL Proxiing > Export certificate (*.cer)

Put that in your phone, it won’t open/install straight away…

Tools > Security > other parameters > Install from local device > CA Certificate > Install anyway > Select your certificate

you’re done.

Follow the given instructions, the password is under “current” as shown in the screenshot.

Mine was the one setup by the technician when installing the boiler …

the gateway is Tydom 1.0 (uptodate) (not pro)
Tydom App 4.13.11 (latest)

TIP: if you erase the app data you will be thrown an internal error from the Tydom app when login to your cloud account. Register through mobile network to get to your installation.there’s finally no need to “reset” the app. Exit (force exit) the app. Reconnect, it will connect automatically to your installation. And then you get the trafic in Charles Proxy. I first thougt I would not find it as the login phase was done before, and the app could have exchange a kind of token… But it does not and I had to scroll a lot to find it !

Thanks.