BAXI TXM / RXM 10c OpenTherm thermostat - HA integration

Hi,

I have changed my boiler by a Baxi Compact Platinum which supports OpenTherm (OT). Additionally, for power eficiency, I bought the modular thermostat TXM 10c which can connect with the Baxi phone app to control and monitoring remotely.

This is the TXM 10c thermostat and comes with a OpenTherm gateway (GTW-16):
BAXI_TXM

and connects to the boiler as follows:

Baxi_connection

As you can see, there is a Gateway (GTW-16) to conver from R-BUS to OpenTherm. The Thermostat “talks” R-BUS and the Boiler “talks” OpenTherm.

Moreover, the thermostat has the option to connect to Baxi App, Google Home and IFTTT.

My question is, ¿there is any way to integrate it into Home Assistant? These are the options I see:

  • OpenTherm: I tried the integration that already exists in HA but doesn’t work. Maybe I need additional hardware or I am doing something wrong…

  • Google Home: There is any way to show the google home devices into Home Assistant (I know how to do it in the reverse way)

  • IFTTT: Can I integrate into HA? I only need to show the temperature and change the setpoint. I don’t need IFTTT features because I prefer to do automations directly in HA. This is the link to use IFTTT provided by Baxi: https://ifttt.com/bdrthermeagroup

  • Other options?: I fear there is not MQTT nor ModBus or others available.

Thanks in advance

Hi @Domaray,

There is an API that you can interact and with GET, POST and PUT request you can play with it:
First of all you need an user/password (witch you have registered with the baxi connect APP) and the token code from the QR code from the screen of the thermostat.

I think the header Authorization: Basic cnVhcHA6V25AW1tjJF1QfjghM2AoW35BZiUnSDI/bEh3XWNpaXE6cn1MT3pqTGsueTVNSCtfcT0=
is hardcoded on the APP but I don’t know if is always the same (if is only mine, please don’t hack me).

I have no idea how to integrate this with home assistant, But I hope this helps to some one who does :slight_smile:

Also I have the baxi connect APK withdout certificate pinning if some body whants to sniff the dialog easily using ZAP proxy or remote pcap.

POST /user/baxi/login HTTP/1.1
Host: remoteapp.bdrthermea.com
Connection: keep-alive
Content-Length: 63
Accept: application/json, text/plain, */*
Accept-Language: ca-ES
Content-Type: application/json;charset=UTF-8
X-Requested-With: com.bdrthermea.roomunitapplication.baxi
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate

{
  "username": "yourusername",
  "password": "your password
}

HTTP/1.1 200 OK
Date: Thu, 02 Dec 2021 20:53:32 GMT
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: *, amdatu_token
Content-Type: application/json
amdatu_token: one of the token for the get request to put at the header amdatu_token
Transfer-Encoding: chunked

{"username":"your user","surname":"smith","name":"george","honorific":"male","postalCode":"08021","country":"ES"}



POST /v1.0/pairings HTTP/1.1
Host: ruapi.remoteapp.bdrthermea.com
Connection: keep-alive
Content-Length: 107
Accept: application/json, text/plain, */*
Authorization: Basic cnVhcHA6V25AW1tjJF1QfjghM2AoW35BZiUnSDI/bEh3XWNpaXE6cn1MT3pqTGsueTVNSCtfcT0=
Content-Type: application/json
X-Requested-With: com.bdrthermea.roomunitapplication.baxi
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: ca-ES,ca;q=0.9,en-US;q=0.8,en;q=0.7

{"account":"[email protected]","brand":"baxi","password":"mypassword","device":"device name","otp":"QrFromThermostat"}

Response:
Date: Thu, 02 Dec 2021 21:00:35 GMT
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: *, amdatu_token
Content-Type: application/json
Transfer-Encoding: chunked

{"id":"1","token":"here is a large code to put on the header X-Bdr-Pairing-Token","gatewayUUID":"here the id of your thermostat i gues..."}


To see if connected ok:
GET /v1.0/system/gateway/connection HTTP/1.1
Host: ruapi.remoteapp.bdrthermea.com
Connection: keep-alive
Accept: application/json, text/plain, */*
X-Bdr-Pairing-Token: the large code
Authorization: Basic cnVhcHA6V25AW1tjJF1QfjghM2AoW35BZiUnSDI/bEh3XWNpaXE6cn1MT3pqTGsueTVNSCtfcT0=
X-Requested-With: com.bdrthermea.roomunitapplication.baxi
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: ca-ES,ca;q=0.9,en-US;q=0.8,en;q=0.7

HTTP/1.1 200 OK
Date: Thu, 02 Dec 2021 21:00:43 GMT
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: *, amdatu_token
Content-Type: application/json
Transfer-Encoding: chunked

{"status":"connected_to_appliance"}





GET /v1.0/capabilities HTTP/1.1
Host: ruapi.remoteapp.bdrthermea.com
Connection: keep-alive
Accept: application/json, text/plain, */*
X-Bdr-Pairing-Token: ther large code
Authorization: Basic cnVhcHA6V25AW1tjJF1QfjghM2AoW35BZiUnSDI/bEh3XWNpaXE6cn1MT3pqTGsueTVNSCtfcT0=
X-Requested-With: com.bdrthermea.roomunitapplication.baxi
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: ca-ES,ca;q=0.9,en-US;q=0.8,en;q=0.7

HTTP/1.1 200 OK
Date: Thu, 02 Dec 2021 21:00:46 GMT
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: *, amdatu_token
Content-Type: application/json
Transfer-Encoding: chunked

{"centralHeatingZones":[{"name":"GTW-16","uri":"/central-heating-zone/1E10FFFFFFFF010","coolingSupported":false,"timeProgramsUri":"/central-heating-zone/1E10FFFFFFFF010/time-programs","timeProgramActivitiesUri":"/central-heating-zone/1E10FFFFFFFF010/time-program-activities","statusUri":"/central-heating-zone/1E10FFFFFFFF010/status","getSetpointUri":"/central-heating-zone/1E10FFFFFFFF010/setpoint","putSetpointScheduleUri":"/central-heating-zone/1E10FFFFFFFF010/setpoint/schedule","putSetpointManualUri":"/central-heating-zone/1E10FFFFFFFF010/setpoint/manual","putSetpointAntiFrostUri":"/central-heating-zone/1E10FFFFFFFF010/setpoint/anti-frost","putSetpointTemporaryOverrideUri":"/central-heating-zone/1E10FFFFFFFF010/setpoint/temporary-override","putSetpointHolidayUri":"/central-heating-zone/1E10FFFFFFFF010/setpoint/holiday","putFirePlaceModeUri":"/central-heating-zone/1E10FFFFFFFF010/setpoint/fireplace-mode","parametersUri":"/central-heating-zone/1E10FFFFFFFF010/parameters","paramsMaxPreheatUri":"/central-heating-zone/1E10FFFFFFFF010/parameters/max-pre-heat","paramsHeatingCurveUri":"/central-heating-zone/1E10FFFFFFFF010/parameters/heating-curve","paramsHeatingCoolingSpeedUri":"/central-heating-zone/1E10FFFFFFFF010/parameters/heating-cooling-speed","paramsAntiFrostHolidayUri":"/central-heating-zone/1E10FFFFFFFF010/parameters/anti-frost-and-holiday-setpoint","paramsControlStrategyUri":"/central-heating-zone/1E10FFFFFFFF010/parameters/control-strategy"}],"domesticHotWaterZones":[],"producers":[{"name":"GTW-16","statusUri":"/producers/1E10FFFFFFFF","powerSettingsUri":"/producers/1E10FFFFFFFF/parameters/power-settings"}],"system":{"waterPressureUri":"/system/water-pressure","gatewayUri":"/system/gateway","historyUri":"/system/errors/history","locationUri":"/system/location","connectionUri":"/system/gateway/connection","errorStatusUri":"/system/error-status","applianceTimeUri":"/system/appliance-time","flowTemperatureUri":"/system/flow-temperature","deviceInformationUri":"/system/device-information"}}



to set the temperature

PUT /v1.0/central-heating-zone/1E10FFFFFFFF010/setpoint/manual HTTP/1.1
Host: ruapi.remoteapp.bdrthermea.com
Connection: keep-alive
Content-Length: 32
Accept: application/json, text/plain, */*
X-Bdr-Pairing-Token: ther large code
Authorization: Basic cnVhcHA6V25AW1tjJF1QfjghM2AoW35BZiUnSDI/bEh3XWNpaXE6cn1MT3pqTGsueTVNSCtfcT0=
Content-Type: application/json;charset=UTF-8
X-Requested-With: com.bdrthermea.roomunitapplication.baxi
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: ca-ES,ca;q=0.9,en-US;q=0.8,en;q=0.7

{"roomTemperatureSetpoint":20.5}

HTTP/1.1 204 No Content
Date: Thu, 02 Dec 2021 21:00:51 GMT
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: *, amdatu_token

1 Like

Thanks for you reply! That’ sounds perfect.

I did some progress with IFTTT but I am able to receive and send the setpoint only. I am not able to get futher information such as the current temperature.

Was that information extracted from the APK or sniffing the communication of the APP? Sniffing was another option that I was thinking on but I haven’t try yet. If you hace the APK, cuold you share it?

I am trying now to send those TCP requests by using Node-Red addon of Home Assistant. I will comment my progress in this thread.

Thanks again

Hi @ibernat ,

I finally tried with Node-Red and I was not able to connect. I send you a screenshot of the content I am sending. The response is that the URL doesn’t exist.

  • I also modified Content length field according to my user and password length

In the TCP connection settings, I am using the host “remoteapp.bdrthermea.com” and the port 80.
I did a wireshark trace and I see that the app communicates with the IP 91.103.172.14. I tried with same result.
I noticed that wireshark shows communication by port 443, what means https, and is encrypted, so I cannot collect further information. In any case, I tried also to send the POST message without response. Port 80 answer at least. Any idea?

Hi @Domaray
Must be HTTPS and tcp 443, in the port 80 does not reply.

Hi @ibernat, I made some progress and I have connected successfully. I am currently getting some information from the API and trying to pass it to Home Assistant.

I will share the integration once completed.

I really thanks for your help!!

1 Like

I did a lot of progress and I have it almost complete. This is the result on my Home Assistant:

The only thing I missed is the posibility to know when the boiler is heating. I didn’t find any value in the API. I would like to use it for monitoring the heating time per day/week/month.
I realized that the official app (Baxi connect) doesn’t show when the boiler is heating neither, only is displayed in the physical thermostat (TXM 10c in my case).

@Domaray hi! Could you please share how did you set it up? Im installing a similar system in my new flat and have all my stuff on homebridge (because of HomeKit). I’d like to have it working but didn’t find any plugin. My last hope is that I’d be able to use MQTT or similar to set it up.

How did you manage to do it?

Thank you!

Hey @Domaray ! congrats for get it working!!
I am super interested in having it too. Would you mind to share your project?

Many thanks.

Hi. I am glad you are interested on it. I have done the following post to document the integration. Unfortunately, I have no enough time these days and I didn’t write so many details. In any case, I hope it works for you:

I would like to do a Home Assistant integration in the future, but for the moment this can be useful.

If you have questions or doubts to integrate it, just write me.

1 Like

Hi @Domaray
May be it is possible to interact with the BAXI api directly from home assistant.

2 Likes

Hi @Domaray! Thank you for sharing! I’d like to create an integration using Homebridge and I saw that you’ve used mqtt, I’m just wondering where did you get the topics from, since mqtt isn’t supported by BAXI.

Thank you and happy Christmas!

Hello Domaray!
First of all, I wanted to thank you for sharing such interesting information.
I am thinking of acquiring this same boiler and I would like to integrate it into my node red installation, like the one I have now.
I am having some doubts:

-I understand that the TXM 10c thermostat is the only element that connects to the Wi-Fi network. The boiler does not have a network connection and it is mandatory to use the r-bus → opentherm converter. Is this correct?

-All communication is done through Baxi’s rest API. Is there a way to do this without depending on their servers? … I try to avoid the IoBT, as much as I can.

-Could you get information on whether the burner is running? / Is this information available in the TXM thermostat?

Thank you very much in advance.

Where can I find a swagger or similar with the REST endpoints?

Hi @ibernat, that sounds great! I have it working with Node-Red and it’s enough for me right now, but thanks anyway :slight_smile:

Hi @Miguel_Ruivo . I used MQTT but not to communicate with the TXM but Home Assistant. This is the connection I did:

Baxi TXM <------> API (http) <------> Node Red <--------> MQTT <-------> Home Assistant

I don’t know Homebrigde but I guess is similar to Home Assistant. I have read the it also has node-red integration so just copy my flow and create the MQTT topics to be listened and then handled by homebridge. Hope it works.

Hi @mossi, I’ll try to answer to each of your questions:

If you buy the XTM 10c thermostat it comes with the gateway GTW-16 in the same box to convert from R-BUS to OpenTherm. I am not sure if the WiFi connection is done by the gateway or the TXM 10c. Accodring to some comments I saw when I bought the boiler, the Gateway is the device that connect to the WiFi.

I think the only way is to connect an OpenTherm sniffer or something like that. I would like to do it in the same way as you say to do not depend on remote servers. At this moment, the API is in their servers and my Node-Red integration attacks those servers, not the local thermostat. If you think about any alternative, I will be highly interested.

The XTM shows a radiator with some arrows when the boiler is running (I think when the flame is on) but it is not displayed in the app. The API does not show information about that neither. I asked to Baxi and they told me that it is not implemented in the app. I don’t understand why, this is a basic function.

Other option I was thinking about is to use the ON/OFF output of the GTW-16. I have not tested but I think the relay of the ON/OFF output could be used to know when the flame is active.
This relay is used for old boilers (not modulating).
In this case, you can use a simple Arduino with an entry to send a MQTT message to Home Assistant when the boiler is on. I gess I will do in the near future if there is not any other option.

This thermostat is the same as “Remeha eTwist” eTwist - The Feeling of Warmth - Remeha. Even the app is compatible. The baxi app is only rebranded. the API is the same.

Yes, I realized when looking for any Home Assistant integration. I also installed the eTwist app and looks similar to baxi’s one. Probably, the API will also work but maybe changing the URLs of the GET and POST methods would be needed

Hi @Domaray,
I’m using your code in Home assistant and node-red when I use the function of GET Current status, node-red reply me with “Unexpected end of JSON input”. The water pressure information for example gets the correct value. I can’t understand where the error is. I checked to put the token correctly everywhere. Can you help me?