Re: Remeha eTwist
Posted: Tuesday 14 January 2025 16:36
Sorry you have to explain me how to do this.
I do have all electric indeed
I do have all electric indeed
Do what, can you be more specific? Getting an access token or calling the api or both?RolandJ wrote: Tuesday 14 January 2025 16:36 Sorry you have to explain me how to do this.
I do have all electric indeed
In the https://github.com/tuk90/RemehaHome-Domoticz page there is a file called Remehatest.py in line 245 and 246 you can fill in your username and password. After that put a # in front of line 151 to out comment that piece of code. Fill in the following line below the outcommented code: print(access_token)RolandJ wrote: Tuesday 14 January 2025 19:43 I have a Elga ace hybrid heatpump maybe you see different stuff if you have an all electric heatpump, if so please share the response body with me.
This is what you asked me to do. Can you let me know how and what you need? Calling api?
Code: Select all
2025-02-12 11:06:06.370 Error: HK-ThermoRemeha: Error making GET request: 'outdoorTemperature'I have the same issue, I am short of time today and tomorrow but I will have a look on Fridayjvdz wrote: Wednesday 12 February 2025 12:39 @Tuk90, I just created an issue in github of an error I get since this morning:Maybe others have the same issue?Code: Select all
2025-02-12 11:06:06.370 Error: HK-ThermoRemeha: Error making GET request: 'outdoorTemperature'
EDIT Created a PR with the changes I made to accommodate the returned JSON changes and make it work again.
My other sensors are up again but my outdoor sensor is still down, I will check my JSON response on friday. Is it working for you again?Tuk90 wrote: Wednesday 12 February 2025 14:46I have the same issue, I am short of time today and tomorrow but I will have a look on Fridayjvdz wrote: Wednesday 12 February 2025 12:39 @Tuk90, I just created an issue in github of an error I get since this morning:Maybe others have the same issue?Code: Select all
2025-02-12 11:06:06.370 Error: HK-ThermoRemeha: Error making GET request: 'outdoorTemperature'
EDIT Created a PR with the changes I made to accommodate the returned JSON changes and make it work again.
Code: Select all
2025-05-05 09:40:26.538 Error: HK-ThermoRemeha: Call to function 'onHeartbeat' failed, exception details:
2025-05-05 09:40:26.542 Error: HK-ThermoRemeha: Traceback (most recent call last):
2025-05-05 09:40:26.542 Error: HK-ThermoRemeha: File "/home/pi/domoticz/plugins/remeha/plugin.py", line 585, in onHeartbeat
2025-05-05 09:40:26.543 Error: HK-ThermoRemeha: _plugin.onheartbeat()
2025-05-05 09:40:26.543 Error: HK-ThermoRemeha: File "/home/pi/domoticz/plugins/remeha/plugin.py", line 531, in onheartbeat
2025-05-05 09:40:26.544 Error: HK-ThermoRemeha: result = self.resolve_external_data()
2025-05-05 09:40:26.544 Error: HK-ThermoRemeha: File "/home/pi/domoticz/plugins/remeha/plugin.py", line 112, in resolve_external_data
2025-05-05 09:40:26.545 Error: HK-ThermoRemeha: "signUp": "False",
2025-05-05 09:40:26.545 Error: HK-ThermoRemeha: File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 600, in get
2025-05-05 09:40:26.546 Error: HK-ThermoRemeha: return self.request("GET", url, **kwargs)
2025-05-05 09:40:26.546 Error: HK-ThermoRemeha: File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 587, in request
2025-05-05 09:40:26.547 Error: HK-ThermoRemeha: resp = self.send(prep, **send_kwargs)
2025-05-05 09:40:26.548 Error: HK-ThermoRemeha: File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 723, in send
2025-05-05 09:40:26.548 Error: HK-ThermoRemeha: history = [resp for resp in gen]
2025-05-05 09:40:26.549 Error: HK-ThermoRemeha: File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 723, in <listcomp>
2025-05-05 09:40:26.549 Error: HK-ThermoRemeha: history = [resp for resp in gen]
2025-05-05 09:40:26.550 Error: HK-ThermoRemeha: File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 274, in resolve_redirects
2025-05-05 09:40:26.550 Error: HK-ThermoRemeha: **adapter_kwargs,
2025-05-05 09:40:26.551 Error: HK-ThermoRemeha: File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 695, in send
2025-05-05 09:40:26.551 Error: HK-ThermoRemeha: adapter = self.get_adapter(url=request.url)
2025-05-05 09:40:26.552 Error: HK-ThermoRemeha: File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 792, in get_adapter
2025-05-05 09:40:26.552 Error: HK-ThermoRemeha: raise InvalidSchema(f"No connection adapters were found for {url!r}")
2025-05-05 09:40:26.552 Error: HK-ThermoRemeha: requests.exceptions.InvalidSchema: No connection adapters were found for 'com.b2c.remehaapp://login-callback/?error=server_error&error_description=AADB2C90027%3a+Basic+credentials+specified+for+%27SecureREST-AccessToken%27+are+invalid.+Check+that+the+credentials+are+correct+and+that+access+has+been+granted+by+the+resource.%0d%0aCorrelation+ID%3a+68dad916-cab5-40ce-bffe-cb27d5e1ec24%0d%0aTimestamp%3a+2025-05-05+07%3a40%3a26Z%0d%0a&state=WxxxxxxxxuQ'
Code: Select all
try:
response = self._session.get(
"https://remehalogin.bdrthermea.net/bdrb2cprod.onmicrosoft.com/oauth2/v2.0/authorize",
params={
"response_type": "code",
"client_id": "6ce007c6-0628-419e-88f4-bee2e6418eec",
"redirect_uri": "com.b2c.remehaapp://login-callback",
"scope": "openid https://bdrb2cprod.onmicrosoft.com/iotdevice/user_impersonation offline_access",
"state": random_state,
"code_challenge": code_challenge_sha256,
"code_challenge_method": "S256",
"p": "B2C_1A_RPSignUpSignInNewRoomV3.1",
"brand": "remeha",
"lang": "en",
"nonce": "defaultNonce",
"prompt": "login",
"signUp": "False",
},
)
response.raise_for_status()
except requests.exceptions.RequestException as e:
Domoticz.Error(f"Error during GET request to authorize endpoint: {str(e)}")
return None
except Exception as e:
Domoticz.Error(f"Unexpected error during GET request: {str(e)}")
return None
jvdz wrote: Monday 05 May 2025 10:08 Maybe it's an idea to add a try: around this call to avoid the tracestack to be displayed each minute, and just display the lastline error.Code: Select all
try: response = self._session.get( "https://remehalogin.bdrthermea.net/bdrb2cprod.onmicrosoft.com/oauth2/v2.0/authorize", params={ "response_type": "code", "client_id": "6ce007c6-0628-419e-88f4-bee2e6418eec", "redirect_uri": "com.b2c.remehaapp://login-callback", "scope": "openid https://bdrb2cprod.onmicrosoft.com/iotdevice/user_impersonation offline_access", "state": random_state, "code_challenge": code_challenge_sha256, "code_challenge_method": "S256", "p": "B2C_1A_RPSignUpSignInNewRoomV3.1", "brand": "remeha", "lang": "en", "nonce": "defaultNonce", "prompt": "login", "signUp": "False", }, ) response.raise_for_status() except requests.exceptions.RequestException as e: Domoticz.Error(f"Error during GET request to authorize endpoint: {str(e)}") return None except Exception as e: Domoticz.Error(f"Unexpected error during GET request: {str(e)}") return None