klejejs / ha-thermia-heat-pump-integration

Thermia Heat Pump Integration for Home Assistant
GNU General Public License v3.0
30 stars 7 forks source link

Feature request: Boost button. #32

Closed randriksen closed 1 year ago

randriksen commented 1 year ago

Hi, Fantastic work on the integration. I would like to request a small feature, which is the ability to activate the hot water boost from homeassistant. it seems to be located in the API as REG__HOT_WATER_BOOST in REG_GROUP_HOT_WATER.

If i find the time to sit down and look into it I might set it up and make a merge request, but since you already have most of this figured out, it might be an easy fix for you.

best regards,

Ole

klejejs commented 1 year ago

Hello! Thank you for the request. Unfortunately, I do not have that functionality on my heat pump, so I am not 100% how it works and how it should be implemented.

Is it a simple switch that can be turned on/off?

I could create a PR, but then you would have to validate if it works as expected. Would that be OK with you?

randriksen commented 1 year ago

Hi! Thank you for your reply. Yes, it's basically a switch that can be turned on/off. Change a register value between 0 and 1 really. I got it to work when playing with RestAPI, but I'm not proficient in python ATM, so not completely sure how to fix it myself.

I'd love to validate it if you can fix the code for it.

Thank you.

On Sun, Dec 25, 2022, 12:03 Krisjanis Lejejs @.***> wrote:

Hello! Thank you for the request. Unfortunately, I do not have that functionality on my heat pump, so I am not 100% how it works and how it should be implemented.

Is it a simple switch that can be turned on/off?

I could create a PR, but then you would have to validate if it works as expected. Would that be OK with you?

— Reply to this email directly, view it on GitHub https://github.com/klejejs/ha-thermia-heat-pump-integration/issues/32#issuecomment-1364663165, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ3QVGMVI37FDXO52UG6ADWPASW7ANCNFSM6AAAAAAR5QZ5U4 . You are receiving this because you authored the thread.Message ID: @.***>

fclauson commented 1 year ago

I do something different to boost I do not have a home assistant, but I have a google script running from a google sheet

each night at 5am it raises the cut in temp for hot water - rather than having the hot water start temp at 40 I move this to 45 - this has the effect of using the cheaper night rate electricity available here in Ireland to heat up the tank before the day starts

boost could be achieved the same by having a function to raise this start temp for 1hr thus forcing the HP to create hot water

klejejs commented 1 year ago

@randriksen I have added a boost switch to the integration and it is available in version 2.14.dev1. As I do not have the switch available on my heat pump, I don't see it, but you should. Please verify if this is the case and if it works as expected. Also, while you are at it, please verify that the hot water switch still works the same as before. If you are using HACS, you can go to the integration page, click 3 dots on top right corner, press "Redownload", click the switch "Show beta versions" and choose 2.14.dev1. If you installed the integration manually, you should use feature/add-hot-water-boost-switch branch.

PalmSwe commented 1 year ago

This update unfortunately made my water-switch go unavailable and no water-boost-option is seen in HomeAssistant.

My heaterpump have the availability to boost water (I'm doing it often manually before a shower) so it should be visiable but it is not working and showing correctly with my HomeAssistant.

randriksen commented 1 year ago

Hi again, I'm testing it now. the new button doesn't show up. I'm not completely sure why, but I have a feeling it's not grabbing the correct version of the Python files. It's supposed to grab version 3.4dev1, but I think it's just getting the regular version. I'm not sure at all though. I can't see a 3.4dev1 version tag on the branch though. The regular hot water button works fine.

klejejs commented 1 year ago

@randriksen can you please confirm the register key is exactly REG__HOT_WATER_BOOST? Now looking at the code, I added REG_HOT_WATER_BOOST as I assumed there was a typo, but maybe it is not the case. Interesting that your water switch still works as expected, but @PalmSwe does not 🤔

PalmSwe commented 1 year ago

Tested again. When I revert to version 2.13 everything works. No boost-button. Updated to 2.14.dev1 and again, water heater unavailable and still no boost-button. image

randriksen commented 1 year ago

It's: REG__HOT_WATER_BOOST here's the whole response from the GET (https://online-genesis-serviceapi.azurewebsites.net/api/v1/Registers/Installations/#####/Groups/REG_GROUP_HOT_WATER)

[ { "registerId": ####, "registerIndex": ###, "registerName": "REG_HOT_WATER_STATUS", "registerValue": 1, "stringRegisterValue": null, "timeStamp": "2022-11-01T21:54:56.004Z", "isComputedRegister": false, "presentation": "Enumeration", "isReadOnly": false, "minValue": 0, "maxValue": 1, "valueNames": [ { "value": 0, "name": "REG_VALUE_STATUS_OFF", "visible": true, "confirmation": null, "isReadonly": false }, { "value": 1, "name": "REG_VALUE_STATUS_ON", "visible": true, "confirmation": null, "isReadonly": false } ], "falseText": null, "trueText": null, "step": 1, "precision": null, "unit": "NotSpecified", "modifier": 0, "disabledByLink": false, "isInvisible": false, "canBeShownInGraph": false, "graphRegisterIndex": 32225, "canBeShownInHistory": true, "collapsible": false, "groupId": 23, "groupOrder": ####, "groupName": "REG_GROUP_HOT_WATER", "groupParentId": null, "groupItemId": ####, "groupItemOrder": #### }, { "registerId": #####, "registerIndex": ###, "registerName": "REG__HOT_WATER_BOOST", "registerValue": 0, "stringRegisterValue": null, "timeStamp": "2022-11-01T22:13:01.877Z", "isComputedRegister": false, "presentation": "Enumeration", "isReadOnly": false, "minValue": 0, "maxValue": 1, "valueNames": [ { "value": 0, "name": "REG_VALUE_STATUS_OFF", "visible": true, "confirmation": null, "isReadonly": false }, { "value": 1, "name": "REG_VALUE_STATUS_ON", "visible": true, "confirmation": null, "isReadonly": false } ], "falseText": null, "trueText": null, "step": 1, "precision": null, "unit": "NotSpecified", "modifier": 0, "disabledByLink": false, "isInvisible": false, "canBeShownInGraph": false, "graphRegisterIndex": #####, "canBeShownInHistory": true, "collapsible": false, "groupId": #, "groupOrder": ###, "groupName": "REG_GROUP_HOT_WATER", "groupParentId": null, "groupItemId": ####, "groupItemOrder": #### } ]

klejejs commented 1 year ago

@randriksen @PalmSwe I have created a new version 2.14.dev2 with the required changes. Please test again. I believe the boost switch was not showing up because the register name was set incorrectly, that is now fixed. The reason why @PalmSwe your switch was unavailable was because it was turned off. :) Turns out not 0 in Python is True which I did not think about. This should be also fixed now.

PalmSwe commented 1 year ago

@klejejs Thanks! Now the water-switch is working again. But for me, still no boost button available.

klejejs commented 1 year ago

@PalmSwe Thanks for checking! Are you familiar with the Developer Tools functionality in your browser? I would be interested what response you see when the browser calls https://online-genesis-serviceapi.azurewebsites.net/api/v1/Registers/Installations/#####/Groups/REG_GROUP_HOT_WATER URL.

You should be able to see that, if you open Developer Tools in the browser, go to the Network tab, and then visit the Thermia Online site, the Details page. You should see an entry there with the text "REG_GROUP_HOT_WATER" and by clicking on it you should be able to see the response. If you manage to find that, could you please send the response here? Note: I do not believe the register index, group ids, and installation id are sensitive values that could be misused by anyone, but just to be safe, I suggest you omit them from the paste, just as @randriksen did.

PalmSwe commented 1 year ago

Hi, Thanks for the feedback. I get: https://online-classic-serviceapi.azurewebsites.net/api/v1/Registers/Installations/#####/Groups/REG_GROUP_HOT_WATER

And response: [{"registerId":#####,"registerIndex":####,"registerName":"REG_HOT_WATER_STATUS","registerValue":0,"stringRegisterValue":null,"timeStamp":"2022-12-27T16:50:08.531Z","isComputedRegister":false,"presentation":"Enumeration","isReadOnly":false,"minValue":0,"maxValue":1,"valueNames":[{"value":0,"name":"REG_VALUE_STATUS_OFF","visible":true,"confirmation":null,"isReadonly":false},{"value":1,"name":"REG_VALUE_STATUS_ON","visible":true,"confirmation":null,"isReadonly":false}],"falseText":null,"trueText":null,"step":1,"precision":null,"unit":"NotSpecified","modifier":0,"disabledByLink":false,"isInvisible":false,"canBeShownInGraph":false,"graphRegisterIndex":#####,"canBeShownInHistory":true,"collapsible":false,"groupId":9,"groupOrder":#####,"groupName":"REG_GROUP_HOT_WATER","groupParentId":null,"groupItemId":###,"groupItemOrder":#####}]

If I read it correctly, my "Thermia Online" does not support boost option via web interface? Can that be true? I can't find any way to boost water heater when I'm on https://www.online.thermia.se. But I can boost manually on the fysical heater pump display/controller.

image I don't know if this is to any help but the heater was installed two year ago so its kinda new.

klejejs commented 1 year ago

@PalmSwe Unfortunately the integration can only show what the Thermia Online supports😞. As you do not have the boost option available on the web, you, unfortunately, will not have it in Home Assistant either. I am not very familiar with Thermia heat pumps in general, so I am not sure why it is not available on the web.

fclauson commented 1 year ago

@klejejs, as mentioned earlier what I've been doing for boost, is to increase the Hot Water Start from 40c to say 47c

this has the effect of creating a boost as the HP says - oh tank less than 47 then I will run to re-heat tank

now you can pick any numbers for both to these I have normal hot water start = 40c when I want to "boost" - hot water start =47c

because of the way the HP is programed you only need to leave the start at the higher number for a few mins (typically until the HP actually starts)

I have tap-water-time set to 40m - so once HP starts to make hot ware it has a run at it for 40mins before flipping back (if needed) to heating

randriksen commented 1 year ago

It works! :D image Thank you!

klejejs commented 1 year ago

@randriksen Thank you for testing! I have released a new version 2.14 that includes the feature.