laetificat / haanna

Plugwise Anna API to use in conjunction with Home Assistant.
MIT License
5 stars 5 forks source link

support cooling state #11

Closed marcelveldt closed 4 years ago

marcelveldt commented 5 years ago

add cooling state retrieval

tested with Anna connected to Elga in cooling mode. This change should also be reflected in hass once this package is updated on pypi

marcelveldt commented 5 years ago

fixed

CoMPaTech commented 5 years ago

Bear with me, was trying it out in production :)

CoMPaTech commented 5 years ago

Works fine, nice addition.

@marcelveldt if you can also bump the version to 0.10.2 in setup.py then we can merge

Assigning to @laetificat to merge and also update PyPi (note that I'm expecting a PR from @bouwew soon as well, he has good changes and the DHW addition in prep).

marcelveldt commented 5 years ago

better wait for bouwew so all changes can be in new update on pypi and hass component PR

CoMPaTech commented 5 years ago

If you don't need it right away, let's do that.

bouwew commented 5 years ago

Please add a test in /test/test_haanna.py and update README.md

marcelveldt commented 5 years ago

Please add a test in /test/test_haanna.py and update README.md

done

CoMPaTech commented 5 years ago

@bouwew should we leave this open now that you've also included cooling?

bouwew commented 5 years ago

My suggestion would be to close this PR with the note that it's content is incorporated in PR #13.

bouwew commented 4 years ago

@marcelveldt What is the function of the Anna in your system when the cooling is active? Do you need to set something on the Anna to control the cooling process? Or is the cooling controlled from the Elga and is the Anna only used to show on the display that cooling is active?

I need this info to make sure that the Plugwise code I'm working on shows the correct info in HA.

marcelveldt commented 4 years ago

Cooling/heating/idle is the action/state for the HVAC. In Hass this is represented as the action attribute. Switching to cooling/heating is automatic in the Anna based on conditions. So you don’t actively set it to cooling or heating. The Elga has some settings to setup the conditions when cooling mode may be automatically used by the thermostat.

bouwew commented 4 years ago

@marcelveldt Thanks for getting back to me! I understand the representation-part, that should work in my updated code (needs haanna = 0.11.0): https://github.com/bouwew/anna-ha

I'm still a bit unclear what to do on the Anna to enable cooling. There is no cooling temperature setpoint that can be set and changed via the interface, correct? From what I read online the setting must be made on the Elga interface. And the Anna must be set-up on the web-interface to support/detect the Elga-cooling-mode I guess?

If the above is true then my latest code should work. Any chance you can try my code? You should see as hvac_modes: heat_cool, auto and as hvac_action: idle, heating or cooling.

marcelveldt commented 4 years ago

The target setpoint is for both cooling and heating. If the Elga is in cooling mode and the room temperature goes above the target setpoint of Anna, cool will be requested. If the temperature drops below the target setpoint, it will start heating.

If the Elga actually starts cooling depends on the conditions. For example I have mine setup to only allow cooling when the outside temperature is above 22 degrees.

I'm now testing with your version. Looks fine so far!

bouwew commented 4 years ago

Ok, thanks for info and testing. I will leave the code as is and ask @CoMPaTech to release the updates to HA.

About having the same setpoint for heating and cooling does not make sense to me, from energy-saving point of view. I would want to have at least a few to several degrees in between, depending on how hot it is outside. I am considering to install cooling in my new house, it has a CV-ketel, and I am looking at alternatives: a standard airco or maybe an electrical heat-pump like the Elga, combined with solar panels. How is you experience with the Elga w.r.t. cooling? Maybe we could take this conversation to another platform? Are you on the Home Assistant Community forum?

marcelveldt commented 4 years ago

Yes, I'm on the hass forum, user marcelveldt. When you use the Elga with the Annna thermostat you get access to a lot of additional configuration, like the tresholds for the cooling. The Anna handles this very perfectly I must say and cooling is only enabled when it is indeed needed. So it will also account for outside temperature and time of day etc.

Standard airco is better in cooling but with the heat-pump the cooling is a nice bonus but will only work if you have floorheating in your whole house.

bouwew commented 4 years ago

Sounds interesting! I have floorheating only downstairs in the new house and upstairs there are standard heating radiators. I think I might need to get some professional advice :)