home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.06k stars 29.73k forks source link

Evohome doesn't support FocusProWifiRetail system modes #118169

Open aidanlane opened 3 months ago

aidanlane commented 3 months ago

The problem

Temperature visible, but cannot control turn system on or off, nor set temperature (the UI dial doesn't move position at all).

e.g. when trying to switch it off, I see this error in the Home Assistant UI:

Failed to call service climate/set_hvac_mode. ControlSystem(id='2893084'): Unsupported/unknown mode: HeatingOff

See diagnostics information below.

Please let me know if there's anything I can do to help - thanks!

What version of Home Assistant Core has the issue?

core-2024.5.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

evohome

Link to integration documentation on our website

https://www.home-assistant.io/integrations/evohome/

Diagnostics information

Debug info from evohome-async client:

[
    {
        "locationInfo": {...},
        "gateways": [
            {
                "gatewayInfo": {...},
                "temperatureControlSystems": [
                    {
                        "systemId": "REDACTED",
                        "modelType": "FocusProWifiRetail",
                        "zones": [
                            {
                                "zoneId": "REDACTED",
                                "modelType": "FocusProWifiRetail",
                                "setpointCapabilities": {
                                    "vacationHoldCapabilities": {"isChangeable": false, "isCancelable": false},
                                    "maxHeatSetpoint": 32.0,
                                    "minHeatSetpoint": 4.5,
                                    "valueResolution": 0.5,
                                    "canControlHeat": true,
                                    "canControlCool": false,
                                    "allowedSetpointModes": ["PermanentOverride", "FollowSchedule", "TemporaryOverride", "VacationHold"],
                                    "maxDuration": "1.00:00:00",
                                    "timingResolution": "00:15:00"
                                },
                                "scheduleCapabilities": {
                                    "maxSwitchpointsPerDay": 4, "minSwitchpointsPerDay": 0, "timingResolution": "00:15:00", "setpointValueResolution": 0.5
                                },
                                "name": "THERMOSTAT",
                                "zoneType": "Thermostat"
                            }
                        ],
                        "allowedSystemModes": [
                            {"systemMode": "Off",  "canBePermanent": true, "canBeTemporary": false},
                            {"systemMode": "Heat", "canBePermanent": true, "canBeTemporary": false}
                        ]
                    }
                ]
            }
        ]
    }
]

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 months ago

Hey there @zxdavb, mind taking a look at this issue as it has been labeled with an integration (evohome) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `evohome` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign evohome` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


evohome documentation evohome source (message by IssueLinks)

aidanlane commented 3 months ago

These work correct when using evohome-async client:

On: await tcs.set_mode(SystemMode.HEAT) Off: await tcs.set_mode(SystemMode.OFF)

aidanlane commented 3 months ago

This also works correctly with evohome-async client:

child: HotWater | Zone = tcs.zones_by_id['REDACTED']
print(child.temperature)
await child.set_temperature(19.0)
zxdavb commented 3 months ago

Thanks for your submission. This integration was written for - tested on - evohome. It should be able to support all TCC-based systems, but their are some subtle differences:

This should be fixed easily enough, but there are two confounding factors:

zxdavb commented 3 months ago

For EvoTouch (EvoTouch/HeatingZone) temperature control systems (TCSs, aka controllers) we have the following allowedSystemModes:

{"systemMode": "HeatingOff",    "canBePermanent": true, "canBeTemporary": false},
{"systemMode": "Auto",          "canBePermanent": true, "canBeTemporary": false},
{"systemMode": "AutoWithReset", "canBePermanent": true, "canBeTemporary": false},
{"systemMode": "AutoWithEco",   "canBePermanent": true, "canBeTemporary": true, "maxDuration":  "1.00:00:00", "timingResolution":   "01:00:00", "timingMode": "Duration"},
{"systemMode": "Away",          "canBePermanent": true, "canBeTemporary": true, "maxDuration": "99.00:00:00", "timingResolution": "1.00:00:00", "timingMode": "Period"},
{"systemMode": "DayOff",        "canBePermanent": true, "canBeTemporary": true, "maxDuration": "99.00:00:00", "timingResolution": "1.00:00:00", "timingMode": "Period"},
{"systemMode": "Custom",        "canBePermanent": true, "canBeTemporary": true, "maxDuration": "99.00:00:00", "timingResolution": "1.00:00:00", "timingMode": "Period"}

Later versions of the above definitely can support Cool mode, but I am yet to receive the corresponding JSON.

For EvoTouch/RoundWireless and EvoTouch/RoundModulation TCSs we have the following allowedSystemModes:

{"systemMode": "HeatingOff",    "canBePermanent": true, "canBeTemporary": false}
{"systemMode": "Auto",          "canBePermanent": true, "canBeTemporary": false},
{"systemMode": "AutoWithEco",   "canBePermanent": true, "canBeTemporary": true, "maxDuration":  "1.00:00:00", "timingResolution":   "01:00:00", "timingMode": "Duration"},
{"systemMode": "Away",          "canBePermanent": true, "canBeTemporary": true, "maxDuration": "99.00:00:00", "timingResolution": "1.00:00:00", "timingMode": "Period"},

These systems are simply a subset of the first schema, above.

However, for FocusProWifi TCSs we have the following allowedSystemModes:

{"systemMode": "Off",           "canBePermanent": true, "canBeTemporary": false},
{"systemMode": "Heat",          "canBePermanent": true, "canBeTemporary": false},
{"systemMode": "Cool",          "canBePermanent": true, "canBeTemporary": false}

Not all systems support Cool (in which case that mode is absent).

zxdavb commented 3 months ago

There are other differences. Regarding zone modes...

For all EvoTouch zones, we have the following allowedSetpointModes

["PermanentOverride", "FollowSchedule", "TemporaryOverride"]

However, for FocusProWifi zones we have:

["PermanentOverride", "FollowSchedule", "TemporaryOverride", "VacationHold"],
zxdavb commented 3 months ago

I note the following issues, which are relevant here:

aidanlane commented 3 months ago

Thanks for your super speedy reply, insights, and research @zxdavb!

Is there something I can help with? I can put my old coding hat back onπŸ˜‰ and help with some of the blockers.

zxdavb commented 3 months ago

Is there something I can help with?

I think it's time to get config flow into this integration. Here's where I'll be working on it: origin/evo_config_flow

zxdavb commented 3 months ago

This is the first PR: #118385

aidanlane commented 3 months ago

Exciting! Let me know if you want me to test anything πŸ‘

zxdavb commented 2 months ago

I am still working on this - latest PR is #119432

aidanlane commented 2 months ago

Thanks!

zxdavb commented 1 month ago

@aidanlane Have a look at: https://github.com/zxdavb/evohome-async/wiki/Hass:-Evohome-Debug-Logs

If you could post those debug log entries here, I'd be grateful!

If you can't, I'll post an updated evohome-async client - let me know.