Page 3 of 7
Re: Remeha eTwist
Posted: Wednesday 10 January 2024 20:08
by Tuk90
thanks!
With the current setup the new device will only be created for new 'installs'. I now did a really dirty trick:
if len(Devices) == 0:
# Example: Create two normal Switch devices for controlling two bed sides
self.createDevices()
else:
Domoticz.Log("Devices already exist. Skipping device creation.")
That can prabobly be smarter, but I don't have time for it now, maybe on friday.
And the comments are sometimes wrong indeed cause I copied a lot of stuff from another Plugin that I created for my Auping Connect. I intended to use it only for my self till I saw that other people also want to use it, that is also the reason why the version numer is 0.0.1

.
Re: Remeha eTwist
Posted: Thursday 11 January 2024 16:42
by gizmocuz
or you check with
if len(Devices) != 4
Re: Remeha eTwist
Posted: Thursday 11 January 2024 22:31
by Tuk90
I merged your changes and fixed the device creation, I did some fuck ups in git so it might look strange

.
I also added a pure python file where people can easily test the api's. I will see if I have tomorrow some time to check on the setpoint or another shot at changing the authentication to the requests module
Re: Remeha eTwist
Posted: Friday 12 January 2024 11:52
by Tuk90
I added the support for setting the temperature via the Setpoint, I do need to build something to setting it back to 'schedule' mode. Any suggestion on which device I should use for that, or can I use the same Setpoint device for it?
Re: Remeha eTwist
Posted: Friday 12 January 2024 12:53
by gizmocuz
Great!!! Thank you!
The temporarily setpoint will get overruled on the next schedule? (It should be)
For instance your next schedule is 18.00 , setpoint 20 degrees
When you set the (temporarily setpoint) at 13.00 to 15 degrees, it will be set to 20 at 18.00
Re: Remeha eTwist
Posted: Friday 12 January 2024 13:19
by Tuk90
gizmocuz wrote: ↑Friday 12 January 2024 12:53
Great!!! Thank you!
The temporarily setpoint will get overruled on the next schedule? (It should be)
For instance your next schedule is 18.00 , setpoint 20 degrees
When you set the (temporarily setpoint) at 13.00 to 15 degrees, it will be set to 20 at 18.00
Maybe Remeha will do that themself? I did not implement that (yet) anyway, but it would be fairlry easy I guess. If Remeha does not solve it, then give a heads up and I will look if I can implement it in the heartbeat function or on updatedavice function.
Re: Remeha eTwist
Posted: Friday 12 January 2024 20:32
by Tuk90
bwbboot wrote: ↑Tuesday 09 January 2024 21:42
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
Hi bwboot,
Which data do you want, and how do you want to have it filled in Domoticz? Do you have to see this grow during the day or do you want to know the result of the previous day or something else?
The data that I got for example the 3th of januari:
{
"timeStamp": "2024-01-03T00:00:00+00:00",
"heatingEnergyConsumed": 9.00,
"hotWaterEnergyConsumed": 0,
"coolingEnergyConsumed": 0,
"heatingEnergyDelivered": 46.00,
"hotWaterEnergyDelivered": 0,
"coolingEnergyDelivered": 0
},
Re: Remeha eTwist
Posted: Friday 12 January 2024 22:00
by bwbboot
I guess it would be nice to have todays data and see it grow when API is polled.
Since there is no actual usage data, I assume a sensor type counter would workout best here. Do you agree?
Would it be possible to retrieve both today's heatingEnergyConsumed and heatingEnergyDelivered?
EDIT:
I don't use my system for cooling, however I just realise others might do. In that case you might also want to add a coolingEnergyConsumed counter. And possible the other counters too.
I do know there is an option in the Remeha Home App to toggle between M3 and kWh. I assumed sensor type counter as it uses kWh. But someone else could use m3. Not sure if there is a way to query this option so that the correct sensor type is used.

- Screenshot 2024-01-12 at 22.10.44.png (84.14 KiB) Viewed 6248 times
Re: Remeha eTwist
Posted: Saturday 13 January 2024 14:16
by Tuk90
gizmocuz wrote: ↑Wednesday 10 January 2024 12:13
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)
I migrated, read: I asked Chatgpt to do so

, the plugin to use the requests module, the issue I had the previous time is that I need to do all calls in one session, otherwise the csrf token is not valid if you don't authenticate in one session.
Furthermore I removed some code that is now not neccecary anymore and I updated the readme.
I still need to do something about the authentication, using the refresh token instead of fully authenticating for each command, and then it will get near to a 1.0 version

.
Re: Remeha eTwist
Posted: Sunday 14 January 2024 10:56
by Tuk90
bwbboot wrote: ↑Friday 12 January 2024 22:00
I guess it would be nice to have todays data and see it grow when API is polled.
Since there is no actual usage data, I assume a sensor type counter would workout best here. Do you agree?
Would it be possible to retrieve both today's heatingEnergyConsumed and heatingEnergyDelivered?
EDIT:
I don't use my system for cooling, however I just realise others might do. In that case you might also want to add a coolingEnergyConsumed counter. And possible the other counters too.
I do know there is an option in the Remeha Home App to toggle between M3 and kWh. I assumed sensor type counter as it uses kWh. But someone else could use m3. Not sure if there is a way to query this option so that the correct sensor type is used.
Screenshot 2024-01-12 at 22.10.44.png
I need some help on how to create a counter via the python plugin, via the wiki I am not getting it to work I tried several things, basically I want to create a couple off different counters to test which one works best.
device_name_5 = "Calculated Energy Consumption"
device_id_5 = 5
Domoticz.Device(Name=device_name_5, Unit=device_id_5, TypeName="Counter", Used=1).Create()
This creates a device with an unknow subtype, and the subtypes in the documentation: 0-5 do not seem to work, any help>
Re: Remeha eTwist
Posted: Sunday 14 January 2024 15:48
by bwbboot
Maybe it's because you are missing the Switchtype attribute which is applicable for counter devices.
I assume it should be of type "Energy"
See
https://www.domoticz.com/wiki/Developin ... vice_Types
Re: Remeha eTwist
Posted: Sunday 14 January 2024 19:12
by Tuk90
Already tried that, but because of that I did saw a different error in Domoticz of what is expected for a Device so I just filled everything:
Domoticz.Device(Name=device_name_5, Unit=device_id_5, Type=113, TypeName="Counter", Subtype=0, Switchtype=0, Used=1).Create()
That seems to work, let me test some stuff during the coming days
Re: Remeha eTwist
Posted: Wednesday 17 January 2024 21:20
by Tuk90
gizmocuz wrote: ↑Friday 12 January 2024 12:53
Great!!! Thank you!
The temporarily setpoint will get overruled on the next schedule? (It should be)
For instance your next schedule is 18.00 , setpoint 20 degrees
When you set the (temporarily setpoint) at 13.00 to 15 degrees, it will be set to 20 at 18.00
There is a new release where the setpoint is changed from manual mode to temporary override mode, this does what you want

. So if you set a temperature in Domoticz, it will be set to the schedule on the next setpoint
Re: Remeha eTwist
Posted: Thursday 18 January 2024 12:30
by gizmocuz
That's great news! Thanks!!
Re: Remeha eTwist
Posted: Friday 26 January 2024 16:47
by bwbboot
I noticed the Merged #7 into main and just updated my plugin. It seems the plugin is not feeling happy and spamming my domoticz log.
Poll interval is set to 5 minutes. Anything I can do to troubleshoot?
2024-01-26 16:18:53.972 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:19:07.974 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:19:21.976 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:19:35.978 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:19:49.980 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:20:04.207 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:20:18.209 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:20:32.211 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:20:45.374 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 16:21:56.221 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:22:10.223 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:22:24.224 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:22:38.226 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:22:52.228 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:23:06.230 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:23:20.232 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:23:34.234 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:23:48.236 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:24:02.238 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:24:16.239 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:24:30.241 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:24:44.243 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:24:58.245 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:25:12.439 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:25:26.441 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:25:40.442 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:25:45.530 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 16:26:50.451 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:27:04.453 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:27:18.455 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:27:32.456 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:27:46.458 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:28:00.460 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:28:14.462 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:28:28.464 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:28:42.465 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:28:56.467 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:29:10.469 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:29:24.471 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:29:38.473 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:29:52.475 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:30:06.674 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:30:20.675 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:30:34.677 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:30:45.647 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 16:31:44.686 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:31:58.688 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:32:12.690 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:32:26.691 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:32:40.693 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:32:54.695 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:33:08.697 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:33:22.699 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:33:36.701 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:33:50.703 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:34:04.705 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:34:18.707 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:34:32.709 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:34:46.711 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:35:00.903 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:35:14.905 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:35:28.907 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:35:42.909 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:35:44.989 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 16:36:52.917 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:37:06.919 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:37:20.921 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:37:34.923 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:37:48.925 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:38:02.927 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:38:16.928 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:38:30.930 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:38:44.932 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:38:58.934 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:39:12.936 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:39:26.938 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:39:40.939 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:39:54.941 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:40:09.174 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:40:23.176 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:40:37.178 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:40:45.078 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 16:41:47.187 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:42:01.188 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:42:15.190 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:42:29.192 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:42:43.194 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:42:57.196 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:43:11.198 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:43:25.200 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:43:39.201 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:43:53.203 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:44:07.205 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:44:21.207 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:44:35.209 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:44:49.211 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:45:03.436 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:45:17.438 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:45:31.440 Error: Remeha Home hardware (52) thread seems to have ended unexpectedly
2024-01-26 16:45:45.594 Error: Remeha Home: Error making GET request: list index out of range
Re: Remeha eTwist
Posted: Friday 26 January 2024 17:11
by Tuk90
I did not test the merge of gizmo I must admit, can you set the poll interval back to 30 seconds? Cause I think that I read somewhere that if it is more then 30 seconds that you get these hardware errors, that is the reason why I hardcoded it to 30 seconds.
Re: Remeha eTwist
Posted: Friday 26 January 2024 17:22
by bwbboot
Ok that fixed the "thread seems to have ended unexpectedly" issue. Do get this message still.
2024-01-26 17:16:39.085 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 17:17:38.841 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 17:18:09.193 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 17:18:39.404 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 17:19:09.261 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 17:19:39.648 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 17:20:08.893 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 17:20:40.047 Error: Remeha Home: Error making GET request: list index out of range
2024-01-26 17:21:39.404 Error: Remeha Home: Error making GET request: list index out of range
Re: Remeha eTwist
Posted: Friday 26 January 2024 18:05
by Tuk90
Did you have the allow creation of devices on? Did the new device got created?
Re: Remeha eTwist
Posted: Friday 26 January 2024 18:40
by bwbboot
I just removed the plugin in hardware and re-added it back in. I can see 5 devices but none are updating.

- Screenshot 2024-01-26 at 18.37.43.jpg (212.05 KiB) Viewed 2628 times
And log is showing:
2024-01-26 18:36:24.081 Error: Remeha Home 2: Error making GET request: list index out of range
2024-01-26 18:36:54.001 Error: Remeha Home 2: Error making GET request: list index out of range
2024-01-26 18:37:24.542 Error: Remeha Home 2: Error making GET request: list index out of range
2024-01-26 18:37:54.149 Error: Remeha Home 2: Error making GET request: list index out of range
2024-01-26 18:38:24.037 Error: Remeha Home 2: Error making GET request: list index out of range
2024-01-26 18:38:54.025 Error: Remeha Home 2: Error making GET request: list index out of range
2024-01-26 18:39:24.820 Error: Remeha Home 2: Error making GET request: list index out of range
Re: Remeha eTwist
Posted: Friday 26 January 2024 19:18
by Tuk90
You have a heatpump right? The value Gizmocuz added is only present for central heating boilers, at least I think so. I think I pushed the fix to the main branch.
Basically if the value cannot be found in the response from Remeha than it will nut update the specific device.
It should work now.
Oh and btw I am working on your request for energy consumption, but the responses are not always in the format that I want. I have a branch where the daily count is updated each night. This is because, I think, the yearly values will be updated after the day has ended, so the total of today shows the total of yesterday :p. I am going to play around a bit to see if I can get the proper values