plugwise / python-plugwise

Plugwise python module for Smiles (Anna, Adam, P1) and Stretch
https://pypi.org/project/plugwise
MIT License
10 stars 9 forks source link

[FEATURE] Switch for DHW #63

Closed tansuka closed 3 years ago

tansuka commented 3 years ago

First of all, thank you very much for the great integration, all your hard work and time. Really appreciated 👏

Is your feature request related to a problem? Please describe. I have a stupid opentherm boiler (Remeha Calenta) that doesn't heat the domestic hot water on demand. Only option to have the hot water is to turn on DHW Comfort mode on the boiler (via an opentherm thermostat). If I keep DHW Comfort on, it uses a lot of gas and keeps the water warm all the time, even though I don't need it which costs money and not good for the environment.

Describe the solution you'd like On the Plugwise Adam interface, there is a toggle under Settings -> Heating System -> Heating -> Advanced Settings to turn on DHW Comfort mode on or off. A good way is to have a switch on HA to turn this on and off instead of going to Plugwise interface every time. This will also allow me to set up reminders if I leave hot water on for a long time and use smart assistants with voice to turn on/off. After we have the switch in HA, the possibilities are endless.

Home Assistant (please complete the following information):

Plugwise product and setup (please complete the following information):

Additional context I did a bit research, the status of the switch can be get from GET: {APPLIANCES}/core/appliances;id={appl_id} endpoint from the following element

<domestic_hot_water_toggle id="XXXXX"/>
<updated_date>2021-02-11T02:46:42.165+01:00</updated_date>
<type>domestic_hot_water_comfort_mode</type>
<state>off</state>
</toggle_functionality>

and the status get be set with PUT: {APPLIANCES};id= {appl_id}/toggle;type=domestic_hot_water_comfort_mode with the following XML as data

<toggle><state>{state}</state></toggle>

possible states are off and on

Thank you very much again and have a great day!

bouwew commented 3 years ago

Update: the set-function is working already :)

I'll have a look, will report back.

tansuka commented 3 years ago

Update: the set-function is working already :)

I'll have a look, will report back.

That’s damn fast! 😂

bouwew commented 3 years ago

The set-function was easy, with good input :+1:

Adding the switch in HA Core is much harder...

bouwew commented 3 years ago

image

Looks like it's working.

Are you using the custom_component Plugwise-beta? If not, please install. I'll create a Plugwise-beta test-version.

bouwew commented 3 years ago

Please install and test https://github.com/plugwise/plugwise-beta/releases/tag/0.14.1a3

tansuka commented 3 years ago

Coincidentally, just before I install the test, my home assistant crashed. as soon as it's up and running again, I'll install & test

Thank you very much

tansuka commented 3 years ago

Sorry, took a bit longer to make HA work again, somehow couldn't install 1a3 via HACS, had to copy under custom_components manually.

However, after all the these hassle, it works like a charm!!

Thank you very much for the super fast response and implementation. I owe you a beer :)

bouwew commented 3 years ago

Great, thanks for testing!

I will integrate this feature in a better way, test it some more, and then release the feature as part of the v0.14.1 release.

bouwew commented 3 years ago

@tansuka I've created a new release: v0.14.1a4. Please install and quickly test this version. Please note: I had to make some changes & improvement "under the hood" which causes a new sensor to appear with the name ending at "_2". You can delete the old switch and then rename the new switch by removing the "_2" part.

tansuka commented 3 years ago

Hello @bouwew,

Sorry for the late reply, it was busy at home.

I have just installed and tested the new version. It works without any problem. on the upcoming days I can tested more but, it works as intended so far.

Thank you very much.

bouwew commented 3 years ago

@tansuka Plugwise-beta v0.14.1 has been released, adding the DHW Comfort Mode switch.

bouwew commented 3 years ago

@tansuka Please try v0.14.3, in that version the switch is called switch.auxiliary_dhw_comfort_mode. And it can be found under the Plugwise Auxiliary device.