Page 2 of 7
Re: Remeha eTwist
Posted: Tuesday 02 October 2018 15:06
by manjh
Harrie1 wrote: ↑Tuesday 02 October 2018 13:41
manjh wrote: ↑Tuesday 03 July 2018 19:58
[...]
As soon as I have the OTGW I will try it an report back.
Any news on this Hans?
Not yet. I have the materials on my desk to build a second OTGW, this one will be UTP connected.
As soon as I find some free time I will put it together and assemble it. But then it will take me a while before I get to the house with the Remeha Tzerra, I don't go there every week in this time of year..

Re: Remeha eTwist
Posted: Monday 22 October 2018 18:24
by manjh
OK, I have tested my OTGW with ESPEasy unit for WIFI communication, with the Remeha Tzerra 28c plus, and eTwist thermostat (Room Unit).
Although the Tzerra is controlled with OpenTherm, the eTwist is not. To make it work, Remeha provides a small white box, called E-twist gateway.
The wire between the Room Unit and the gateway is using R-bus. The wire from the gateway to the Tzerra is OpenTherm.
So: I installed my own OTGW between the Remeha gateway and the Remeha Tzerra. Activated the unit in Domoticz, and I could see the usual info coming through in the log. At first a lot of hex data, but after a little while the info made sense and I could recognize several OTGW values.
Sounds promising, but wait. I tried to change the room setpoint. My device in Domoticz changed to the new temp, and in the log I could see the TT: command going out.
Unfortunately the E-Twist room unit did not pick anything up.
Also, the Flame On signal was coming through, but it was not reliable.
My conclusion: the Remeha Gateway unit does not like working with the OTGW.
As another test, I took the unit back to my home (the Tzerra is installed in my summer home).
At home I use a Remeha Calenta, with an iSense thermostat. Both are pure OpenTherm. I have an OTGW installed between the boiler and the room unit, works great.
So I decided to put the second OTGW between the first OTGW and the thermostat. This did not work well, similar results as the test with the Tzerra.
Conclusion: use only one Gateway between the RU and the boiler. Gateways switch in serial with another gateway don't work well...
In my case it is not a problem: with the E-Twist I can control the unit from my Android phone, so I don't really need an OTGW there.

Re: Remeha eTwist
Posted: Tuesday 04 December 2018 15:22
by lightman
i did send a email to the customer service for the ETA of the Public API.
unfortunately no expected date.
they already acomplished that its compatible with 'IFTTT' (If This Then That)
Re: Remeha eTwist
Posted: Tuesday 04 December 2018 16:53
by manjh
lightman wrote: ↑Tuesday 04 December 2018 15:22
i did send a email to the customer service for the ETA of the Public API.
unfortunately no expected date.
they already acomplished that its compatible with 'IFTTT' (If This Then That)
Then you have better results than I: when I asked them a while ago, the answer was very simple: "no API, no plans for an API.".
We'll see what happens.

Re: Remeha eTwist
Posted: Wednesday 16 December 2020 23:48
by hvxl
manjh wrote: ↑Monday 22 October 2018 18:24Conclusion: use only one Gateway between the RU and the boiler. Gateways switch in serial with another gateway don't work well...
I realize the post I'm responding to is two years old, but I only just stumbled upon it.
It should be possible to put Opentherm gateways in series. Because each gateway delays the messages and responses, putting more than 4 between the RU and the boiler may cause the response time to be exceeded. But two OTGWs should definitely work. In fact, I have successfully done that myself.
Re: Remeha eTwist
Posted: Thursday 17 December 2020 12:42
by manjh
hvxl wrote: ↑Wednesday 16 December 2020 23:48
manjh wrote: ↑Monday 22 October 2018 18:24Conclusion: use only one Gateway between the RU and the boiler. Gateways switch in serial with another gateway don't work well...
I realize the post I'm responding to is two years old, but I only just stumbled upon it.
It should be possible to put Opentherm gateways in series. Because each gateway delays the messages and responses, putting more than 4 between the RU and the boiler may cause the response time to be exceeded. But two OTGWs should definitely work. In fact, I have successfully done that myself.
The problem I ran into was the setting of the room temp. My own OTGW would send the TT command out, but I suspect that the Remeha gateway box never expected this command coming out of the boiler, and therefor never sends it to the room thermostat. But this is speculation: I can only see that the TT command does not have any effect.
So you may be right, putting two OTGW's in serial may work. But this setup was one OTGW, and one Remeha Gateway.
Re: Remeha eTwist
Posted: Friday 04 February 2022 11:41
by sincze
Any news on the API ??? or success stories / best practices on how how you integrated E-Twist with an existing OTGW ?
I see the Setpoint could be an issue but does it add any other value to implement this gateway.
Over the years I already connected my simple dumb Round thermostat (with use of OTGW) with Google-Assistant (Thermostat) using NodeRed and Nora.
I'm always open for Ideas.
Re: Remeha eTwist
Posted: Friday 04 February 2022 17:11
by ESFnl
By 'sniffing' my thermostat wire, I'm able to read many values in Domoticz (see screenshot) but unable to control my Remeha unfortunately.
Re: Remeha eTwist
Posted: Saturday 02 December 2023 22:29
by FlatBread
This is quite an old topic, but since I've updated my eTwist app to the Remeha Home app recently, I was wondering if this would change things.
I've found some info on how to get this (supposedly) working on Home Assistant with some sort of API, but for now I'm still unable to get around the authentication.
The HA integration can be found on
https://github.com/msvisser/remeha_home/tree/main.
Anyone who can give it a try? Or at least tell me how to get the authentication done, so I can explore the rest of the API?
Thanks in advance!
Re: Remeha eTwist
Posted: Thursday 04 January 2024 15:49
by Tuk90
Hi,
I am not a developer but I managed to build a python plugin based on the git repository of mvisser. It contains 3 devices, indoor temp, outdoor temp and bar pressure. Adding other stuff can de done off course. I will try to make it available via git soon.
It uses some python plugins which are not installed bed default but I will mention it when I post the git link here
Re: Remeha eTwist
Posted: Sunday 07 January 2024 19:37
by Tuk90
As promised, it seems that I cannot post a direct link but if you google for remehahome-domoticz you will prabobly find it.
Re: Remeha eTwist
Posted: Sunday 07 January 2024 22:00
by Toulon7559
Because using Remeha_Home, interested to have a look at the plugin mentioned in previous message.
Wondering why you cannot put a direct link into your domoticz-message.
It should be easy, initially with this rude method:
1. with browser go to the webpage you would like to 'transmit' in your message
2. copy the url from your browser-window
3. in Domoticz make a message and paste that url into the message
You may refine line 3. by
3a. in the Domoticz-window making the message find the button with the 'chain'-symbol
3b. with your cursor select and mark a certain text to serve as 'anchor' for the weblink
3c. push button with 'chain'-symbol
3d. change the text [url] to [url=], put your cursor between = and ], and past the url copied under 2. above
Edit 2024Jan08:
deleted original 2nd section, being superfluous after appearance of next message.
In that perspective, the remaining 2nd section now only has general value.
Re: Remeha eTwist
Posted: Sunday 07 January 2024 22:27
by bwbboot
Thanks TUK90 for taking the time to make this plugin!
The plugin can be found here
https://github.com/tuk90/RemehaHome-Domoticz
Re: Remeha eTwist
Posted: Monday 08 January 2024 11:54
by gizmocuz
Thank you for the plugin!
Unfortunally I can't seem to get it to work.... when I uncomment the import of Domoticz at the top, the following error displays:
Remehaplugin.py:21: DeprecationWarning: The object should be created within an async function
self._session = ClientSession()
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x017D45D0>
Not sure if you want to extend the plugin, but maybe only request the access_token when needed (when access_token is empty, or self._session.get returns false, so the token is refreshed... but i thought I have read it is not expiring)
Would be great if you could also support the "setPoint" (receive/set)
Re: Remeha eTwist
Posted: Tuesday 09 January 2024 11:37
by Tuk90
gizmocuz wrote: ↑Monday 08 January 2024 11:54
Thank you for the plugin!
Unfortunally I can't seem to get it to work.... when I uncomment the import of Domoticz at the top, the following error displays:
Remehaplugin.py:21: DeprecationWarning: The object should be created within an async function
self._session = ClientSession()
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x017D45D0>
Not sure if you want to extend the plugin, but maybe only request the access_token when needed (when access_token is empty, or self._session.get returns false, so the token is refreshed... but i thought I have read it is not expiring)
Would be great if you could also support the "setPoint" (receive/set)
I am still on the 2023.2 version and on bullseye. I will boot up a fresh pi and try if I can reproduce it, regarding the setPoint, for now I only needed to have the get stuff but adding a setpoint should be fairly easy, I might add that when I have time.
Regarding the token, it is indead a bit 'dirty' at the moment but it works for now

. The access token is expiring every hour and the refresh token 90 days, at least that is what I remember from looking in the response.
Re: Remeha eTwist
Posted: Tuesday 09 January 2024 15:22
by gizmocuz
Thank you for this!
I am testing (under windows) with python 3.11.6
Maybe you could build it to use only the 'requests' library? This will also solve some dependencies
Re: Remeha eTwist
Posted: Tuesday 09 January 2024 17:30
by Tuk90
gizmocuz wrote: ↑Tuesday 09 January 2024 15:22
Thank you for this!
I am testing (under windows) with python 3.11.6
Maybe you could build it to use only the 'requests' library? This will also solve some dependencies
Hi,
I tried that but I did not get it to work, I ran in to issues on this part:
Code: Select all
csrf_token = next(
cookie.value
for cookie in self._session.cookie_jar
if (
cookie.key == "x-ms-cpim-csrf"
and cookie["domain"] == "remehalogin.bdrthermea.net"
)
response = await self._session.post(
"https://remehalogin.bdrthermea.net/bdrb2cprod.onmicrosoft.com/B2C_1A_RPSignUpSignInNewRoomv3.1/SelfAsserted",
params={
"tx": "StateProperties=" + state_properties,
"p": "B2C_1A_RPSignUpSignInNewRoomv3.1",
},
headers={"x-csrf-token": csrf_token},
data={
"request_type": "RESPONSE",
"signInName": email,
"password": password,
},
)
The requests library always adds a '.' to the coockie, so I needed to change the 'domain' to '.remehalogin.bdrthermea.net' but the csrf_token that was received was not accepted. I guess it has to do that the session was killed because requests is synchronous and that some authentication parameters get killed.
Re: Remeha eTwist
Posted: Tuesday 09 January 2024 21:19
by Tuk90
gizmocuz wrote: ↑Monday 08 January 2024 11:54
Thank you for the plugin!
Unfortunally I can't seem to get it to work.... when I uncomment the import of Domoticz at the top, the following error displays:
Remehaplugin.py:21: DeprecationWarning: The object should be created within an async function
self._session = ClientSession()
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x017D45D0>
Not sure if you want to extend the plugin, but maybe only request the access_token when needed (when access_token is empty, or self._session.get returns false, so the token is refreshed... but i thought I have read it is not expiring)
Would be great if you could also support the "setPoint" (receive/set)
I did a minor change, I added a quote that was missing to the version number.... Can you try again to start the plugin, it should work or give you some error messages

in the event log.
Re: Remeha eTwist
Posted: Tuesday 09 January 2024 21:42
by bwbboot
Nice Tuk90 this is working great now. My wish list would be the setpoint function, and if you can add the Heating Energy stats that would be awesome too
Code: Select all
GET appliances/{appliance_id}/energyconsumption/daily
Get the daily energy consumption of the appliance. This request requires two query parameters, startDate and endDate, which should contain an ISO-8601 timestamp, e.g. 2023-01-03 00:00:00.000Z.
Response:
{
"startDateTimeUsed": "2023-01-03T00:00:00+00:00",
"endDateTimeUsed": "2023-02-13T00:00:00+00:00",
"data": [
{
"timeStamp": "2023-01-03T00:00:00+00:00",
"heatingEnergyConsumed": 3.00,
"hotWaterEnergyConsumed": 3.00,
"coolingEnergyConsumed": 0,
"heatingEnergyDelivered": 0,
"hotWaterEnergyDelivered": 0,
"coolingEnergyDelivered": 0
},
...
]
}
Cheers!
Edit: Typo
Re: Remeha eTwist
Posted: Wednesday 10 January 2024 12:13
by gizmocuz
I make a PR to add the cloud temperature sensor and the Setpoint (read only for now)
Regarding using requests and the cookie, maybe this works?
cookies = response.cookies.get_dict()
csrf_token = cookies["x-ms-cpim-csrf"]
print(csrf_token)
Maybe you could add the Poll interval as a dropdown (30 seconds, 1 minute, 3 minutes)
I already removed some comments, but a few more could be removed (# Example: Create two normal Switch devices for controlling two bed sides)