Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HW Climate Functionality Review #481

Open
msp1974 opened this issue May 12, 2024 · 2 comments
Open

HW Climate Functionality Review #481

msp1974 opened this issue May 12, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@msp1974
Copy link
Collaborator

msp1974 commented May 12, 2024

@markchalloner , hope you are well.

I am doing some significant rework of this integration to reduce the code base and make easier to maintain. As part of this, I am reworking some of your code for the hotwater climate entity.

There is one piece, I am struggling to understand in terms of the logic of how this is supposed to function. If I lay out below, how I think it should work and where I am struggling, perhaps you can shed some light for me.

Hot Water Auto Mode (hub is in follow schedule mode)

Normal - This works to follow the schedule on and off but override to off when current temp reaches target temp and then cancel the override to turn back on when current temp is below target temp. Keeps doing this aslong as schedule is HW on.
QUESTION: Should there be a delta value that it has to below target by X before it turns back on to prevent constant on/off around the target temp?

Once - Same as above except once target temp reached, uses override to turn off until next scheduled on event.

Hot Water Heat Mode (hub is in manual mode)

Normal - This works when the hotwater is manually turned on (when follow schedule is off) to heat the water to the target temp and then turn off.

Override - ??? This is the one I do not get. What is it trying to achieve?


QUESTION: Should the heat mode be more akin to the auto mode in that it has the following function?

Hot Water Heat Mode (hub is in manual mode)

Normal - Heat the water to target temp and then turn off. Never turn back on.

Continual - Maintains the water temperature all the time by turning on and off as it reaches target temp/goes below target temp (again, should we have some delta on this?)

It could be that it should follow the Auto mode settings and call them Normal (keep turning on and off to maintain temp), Once (heat once and then turn off again), but there is a risk that this is non intuative and leaves people with constantly running HW by mistake.

Then also have an Off mode which sets the HW to manual, cancels any override and turns off. Obviously any change (either in HA or in the Wiser app) to turn the water on, will set it to Heat mode in the climate entity.


I know that a lot of your code is addressing some missing functionality from the api, but I am looking to add that in to make it much simpler in the HA code but also maintain the off status and target temp between HA reboots.

If you can answer the use case for the Heat Mode override and also your thoughts on my suggested Heat Mode functionality. I'll also need you to help test when ready if that is ok too?

Thanks
Mark

@msp1974 msp1974 added the help wanted Extra attention is needed label May 12, 2024
@markchalloner
Copy link
Contributor

@msp1974. All good here thanks, same to you.

To answer your questions:

Hot Water Auto Mode (hub is in follow schedule mode)

Normal ...
QUESTION: Should there be a delta value that it has to below target by X before it turns back on to prevent constant on/off around the target temp?

Yes, agreed...

... but what should the delta default to? I did a bit of research into standard (non-smart) hot water cylinder thermostats:

  • The delta is commonly referred to as the temperature differential.
  • This Danfoss document states that the temperature differential is only used for switching on (e.g. a target of 60°C with 10°C differential will switch off at 60°C and on at 50°C):

    General. Most thermostats (not TRVs) switch Off the heat source when rising temperature reaches set point, and
    On when it falls below. Having once switched off, there must then be a slight cooling off - typically less than 1°C -
    before a thermostat can switch on again. This is known as the thermostat’s switching differential or hysteresis.

  • According to a Resideo (licencees of Honeywell Home) support article, the industry standard temperature differential is 10°C:

    The standard temperature differential on the Honeywell Home cylinder thermostats and sensors is 10 degrees. This is an industry standard that has been the case for many years. A wide differential is used to avoid quick cycling of the hot water and to take into account stratification within the hot water cylinder/storage vessel.

  • The wide differential is somewhat backed up out by the specifications of the Drayton HST3 (spec) at 8°C:

    Differential 8°C approximately

  • And Danfoss ATC Cylinder Thermostat at 6-10°C:

    Switching Differential : 6-10

Maybe a user-configurable with a default of 8°C and the wiki updated with the reasoning for this wide differential?

Hot Water Heat Mode (hub is in manual mode)

Normal ...
Override - ??? This is the one I do not get. What is it trying to achieve?

Your description of Continual below summarises this pretty well. I've added more details in the Appendix at the bottom of this reply.

QUESTION: Should the heat mode be more akin to the auto mode in that it has the following function?
Normal ...
Continual - Maintains the water temperature all the time by turning on and off as it reaches target temp/goes below target temp ...

Yes, agreed, Continual is a much nicer term. I would also rename Normal to Once here.

should we have some delta on this?

Yes. It would make sense to apply the same delta across both Auto and Manual modes.

It could be that it should follow the Auto mode settings and call them Normal (keep turning on and off to maintain temp), Once (heat once and then turn off again), but there is a risk that this is non intuative and leaves people with constantly running HW by mistake.

Agreed it would be nice to have consistency between the Auto and Manual modes. We can probably do this by updating the naming. If the naming is consistent then perhaps the default should be too.

I suggest we replace Normal in all cases with something more descriptive and to avoid implying this is the recommended or default state. Continual and Once work well for both Auto and Manual modes. Collecting this all together in your own words:

  • Auto
    • Continual - Follow the schedule on and off but override to off when current temp reaches target temp and then cancel the override to turn back on when current temp is below target temp. Keeps doing this as long as schedule is HW on.
    • Once - Same as above except once target temp reached, uses override to turn off until next scheduled on event.
  • Manual
    • Continual - Maintains the water temperature all the time by turning on and off as it reaches target temp/goes below target temp
    • Once - This works when the hot water is manually turned on (when follow schedule is off) to heat the water to the target temp and then turn off.

Regarding defaults, some considerations (highest priority first):

  • Manual Once mode leaves the user at risk of Legionella bacteria growth if not regularly turned on.
  • Continual mode will cost users more (especially Manual where it could be on all day every day).
  • Manual Once mode leaves the user at risk of not having hot water.
  • Manual Continual (currently Override) mode breaks the usability of the Wiser app: the on and idle state is not visible in the Wiser app and overrides are not cleared when moving to Auto mode in the Wiser app meaning the water could start heating outside of the schedule.
  • Continual mode is how the Wiser app acts.
  • Continual mode is how standard (non-smart) hot water cylinder thermostats act.

I'll also need you to help test when ready if that is ok too?

Yes definitely

Regards

Appendix

Hot Water Heat Mode: Normal vs Override

The Wiser app Hot Water control behaves differently to Room controls. Unlike Rooms, Hot Water doesn't natively have the concept of On and Idle (i.e. not currently heating but can start heating if the temperature drops below X°C). It can only be fully On (and Heating) or Off, stored in the WaterHeatingState field as On or Off. See the app screenshots below for how this is reflected in the UI.

Normal

In Normal mode the Climate's hvac_mode returns HVACMode.HEAT if WaterHeatingState = On and HVACMode.OFF if WaterHeatingState = Off.

✅Pro: The state matches the Wiser app.
⛔Con: Once the temperature rises above the set point the Climate entity will turn fully off and cannot turn itself back on.

Override

In Override mode the missing On and Idle state is tracked in Wiser by abusing the OverrideType field (i.e. is_override). The Climate's hvac_mode returns HVACMode.HEAT if it has an override. As overrides are only used by Wiser in Auto mode, this is a fairly safe hack, though it breaks the usability of the app somewhat (see con below).

✅Pro: Can turn on and off around the temperature set point
⛔Con: The on and idle state is not visible in the Wiser app and overrides are not cleared when moving to Auto mode in the Wiser app meaning the water could start heating outside of the schedule.

Note the override issue could be avoided by either finding another way to track the On and Idle state in Wiser or persisting it it only in Home Assistant.

Wiser App Hot Water control

Screenshot_20240513-220312

Wiser App Room control

Screenshot_20240513-220326

@msp1974
Copy link
Collaborator Author

msp1974 commented May 14, 2024

Thanks for your reply. I think i have found a way to not use overrides for managing both continual and once in manual mode and obviously use overrides in auto mode. It needs more testing by me to make sure the logic is right and also handle what happens when advance schedule (which itself uses the same overrides) and boost is used.

I need to think about advance schedule but what do you think of the below for boost?

Should we just have a single boost preset for hw that heats water to target temp once and then cancels. This is the same as turning the water on in manual heat once mode.

Or do we have different time period boosts that maintains the target temp for that period?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants