apetrycki / daikinskyport

API for accessing a DaikinOne+ Thermostat
63 stars 27 forks source link

HVAC_MODE limited for Heat Pump systems #54

Closed sfskipperjim closed 1 year ago

sfskipperjim commented 1 year ago

Unfortunately I haven't learned much about HA yet but thought I'd ask for some help here. I'm not sure if there is a better place I should post.

I have the daikinskyport running for my systems and I'm finally trying to get around to some enhancements for my systems. I have 2 heat pump systems with gas for aux/emergency heat. From what I can see the Climate integration limits the HVAC_MODE to a few values (off/heat/cool/auto) but mentions it can be extended with presets. The daikinskyport modifies the aux_heat daikin mode value to fit into the HVAC_MODE as heat. I'm using a Thermostat Card to display the status. But my systems have more values when aux heat is running (low gas, high gas...it's a 2 stage furnace), and I'd like to have that displayed instead of just 'heat'.

Note that the low gas/high gas info comes from ctIFCOperatingHeatCoolMode, I've added a sensor to grab this value so I can see what's changing.

I'd like to make necessary changes so the Thermostat card shows more than off/heat/cool/auto. I think I have to somehow modify Climate to be able to accept more modes? Looking for pointers/help.

apetrycki commented 1 year ago

I assume you mean report the status of the aux heat and not be able to set the configuration to use low or high gas? If so, it would be hvac_action, not hvac_mode. The mode is the configured setting of the thermostat. If you can provide the different values for ctIFCOperatingHeatCoolMode, I can probably include them in hvac_action. It'd be appreciated if you can also update the API info.

sfskipperjim commented 1 year ago

Yes, at this time I'm only trying to monitor my systems. In my system I have seen the following values for ctIFCOperatingHeatCoolMode (all ascii values in 15 char length): OFF ON FAN AC HEAT LO GAS HI GAS

I haven't used github, so will need to figure out how to update API. (I tried to edit file but didn't have write priv, so created a branch and updated there for the time being)

apetrycki commented 1 year ago

I took a look at this. For my system, I don't have anything show up in ctIFCOperatingHeatCoolMode. I use "equipmentStatus" to populate hvac_action currently.

DAIKIN_HVAC_ACTION_TO_HASS = {
    # Map to None if we do not know how to represent.
    1: CURRENT_HVAC_COOL,
    3: CURRENT_HVAC_HEAT,
    4: CURRENT_HVAC_FAN,
    2: CURRENT_HVAC_DRY,
    5: CURRENT_HVAC_IDLE,
}

When ctIFCOperatingHeatCoolMode says LO GAS or HI GAS, is the value of equipmentStatus = 3?

I don't see anything in the climate constants for stages, so my guess is this will have to be a separate sensor and not part of the climate entity.

class HVACAction(StrEnum):
    """HVAC action for climate devices."""

    COOLING = "cooling"
    DRYING = "drying"
    FAN = "fan"
    HEATING = "heating"
    IDLE = "idle"
    OFF = "off"

# These CURRENT_HVAC_* constants are deprecated as of Home Assistant 2022.5.
# Please use the HVACAction enum instead.
CURRENT_HVAC_OFF = "off"
CURRENT_HVAC_HEAT = "heating"
CURRENT_HVAC_COOL = "cooling"
CURRENT_HVAC_DRY = "drying"
CURRENT_HVAC_IDLE = "idle"
CURRENT_HVAC_FAN = "fan"
CURRENT_HVAC_ACTIONS = [cls.value for cls in HVACAction]

I can make a new sensor for ctIFCOperatingHeatCoolMode, but to include the info in hvac_actions, you'd have to make a request for it in the HA code. They likely do it this way to keep it standard across all thermostats, though. I looked at the Ecobee integration and they map all their stages to either heating or cooling.

ECOBEE_HVAC_ACTION_TO_HASS = {
    # Map to None if we do not know how to represent.
    "heatPump": HVACAction.HEATING,
    "heatPump2": HVACAction.HEATING,
    "heatPump3": HVACAction.HEATING,
    "compCool1": HVACAction.COOLING,
    "compCool2": HVACAction.COOLING,
    "auxHeat1": HVACAction.HEATING,
    "auxHeat2": HVACAction.HEATING,
    "auxHeat3": HVACAction.HEATING,
    "fan": HVACAction.FAN,
    "humidifier": None,
    "dehumidifier": HVACAction.DRYING,
    "ventilator": HVACAction.FAN,
    "economizer": HVACAction.FAN,
    "compHotWater": None,
    "auxHotWater": None,
}

Take a look at https://github.com/KartoffelToby/better_thermostat. Maybe they can map the hvac_action to a sensor instead. Probably a better way to do it than to try to get HA to change.

sfskipperjim commented 1 year ago

Sorry for delay. I'll take a look at the better_thermostat, that sounds like the easier path.

I had to go back to my data capture file for your answers. When ctIFCOperatingHeatCoolMode is in LO GAS I have captured equipmentStatus with values of 3 and 4. In HI GAS I have only captured value 3.

Note for anyone with a Daikin Heat Pump: I discovered an issue that had to be solved by Daikin technical. Basically if the difference in temperature between current room and heating set point is greater than 2-3 degrees (heat set point above room temperature) the system will run the auxiliary heat even if outdoor temperature is well above your lockout setting. In my case it was 40 F outside and I had programmed a wake up temp > 3 degrees above the night time set point (62 -> 68 as an example) and my gas furnace ran instead of just using the heat pump. My lockout had been set around 25 F so gas never should have run at 40 F. Daikin solution for now was to install an additional zone controller to provide an override, and not let the gas heat run at all unless the outside temperature was below the lockout. Not sure if/when it might be fixed in software.

apetrycki commented 1 year ago

Yeah, the thermostat is designed to be aggressive. It'll use aux or max A/C to get the temp where you want it if it's more than 1-2deg different. You could add some setpoints in between to make it gradual so the aux doesn't kick in. You can probably also disable aux via an automation until the temp is at the setpoint (ie. if setpoint changes, disable aux, then re-enable when temp = setpoint).

If Daikin were smart (they're not, just look at how terrible the thermostat is), they would treat programmed setpoints and manual setpoints differently. Usually if someone manually adjusts it, they want it right now (damn, it's freezing, or it's hot as hell in here) and aux would make sense. Programmed can usually have a delay. You can just set it earlier if it's not to temp when you want it.

I basically beta tested this thermostat and gave a bunch of feedback. None of it was taken. They have this huge screen and all they display is the current temp. The response of the interface is slow, the dial sucks, the menu layout is terrible...I never touch the thing unless I need to unplug it to reset it. Thankfully their (undocumented) API is pretty good. Their Open API still sucked the last I checked. So YMMV as to them actually fixing something.