Quatt heat pump integration

I’ve customized the config a bit so that the controlMode status is displayed as a textual status rather than numerical status code. If anyone finds that useful:

rest:
  - resource: http://...:8080/beta/feed/data.json
    scan_interval: 10
    sensor:
      - name: "Quatt qc controlMode"
        unique_id: quatt.qc.supervisoryControlMode
        value_template: >-
          {% set mapping = {
            0: "Standby",
            1: "Standby - heating",
            2: "Heating - heatpump only",
            3: "Heating - heatpump + boiler",
            4: "Heating - boiler only",
            96: "Anti-freeze protection - boiler on",
            97: "Anti-freeze protection - boiler pre-pump",
            98: "Anti-freeze protection - water circulation",
            99: "Fault - circulation pump on"
          } %}
          {% set state = value_json.qc.supervisoryControlMode %}
          {{ mapping[state] if state in mapping else ("Commissioning" if state >= 100 else "Unknown") }}
1 Like

Just to be complete, I use the following code to connect with my Quatt:

Put this in your configuration YAML (I put it at the very bottom)

rest:
  - resource: http://xxx.xxx.xxx.xxx:8080/beta/feed/data.json
    scan_interval: 20
    sensor:
      - name: "Quatt hp1 workingmode"
        unique_id: quatt.hp1.getMainWorkingMode
        value_template: "{{ value_json.hp1.getMainWorkingMode }}"
      - name: "Quatt hp1 temperatureOutside"
        unique_id: quatt.hp1.temperatureOutside
        value_template: "{{ value_json.hp1.temperatureOutside | round(2) }}"
        device_class: temperature
        unit_of_measurement: "°C"
      - name: "Quatt hp1 temperatureWaterIn"
        unique_id: quatt.hp1.temperatureWaterIn
        value_template: "{{ value_json.hp1.temperatureWaterIn | round(2) }}"
        device_class: temperature
        unit_of_measurement: "°C"
      - name: "Quatt hp1 temperatureWaterOut"
        unique_id: quatt.hp1.temperatureWaterOut
        value_template: "{{ value_json.hp1.temperatureWaterOut | round(2) }}"
        device_class: temperature
        unit_of_measurement: "°C"
      - name: "Quatt hp1 silentMode"
        unique_id: quatt.hp1.silentModeStatus
        value_template: "{{ value_json.hp1.silentModeStatus }}"
      - name: "Quatt hp1 limitedByCop"
        unique_id: quatt.hp1.limitedByCop
        value_template: "{{ value_json.hp1.limitedByCop }}"
      - name: "Quatt CV"
        unique_id: quatt.boiler.otFbChModeActive
        value_template: "{{ value_json.boiler.otFbChModeActive }}"
      - name: "Quatt SWW"
        unique_id: quatt.boiler.otFbDhwActive
        value_template: "{{ value_json.boiler.otFbDhwActive }}"
      - name: "Quatt CV vlam"
        unique_id: quatt.boiler.otFbFlameOn
        value_template: "{{ value_json.boiler.otFbFlameOn }}"
      - name: "Quatt CV temperatureWaterIn"
        unique_id: quatt.boiler.otFbSupplyInletTemperature
        value_template: "{{ value_json.boiler.otFbSupplyInletTemperature | round(2) }}"
        device_class: temperature
        unit_of_measurement: "°C"
      - name: "Quatt CV temperatureWaterOut"
        unique_id: quatt.boiler.otFbSupplyOutletTemperature
        value_template: "{{ value_json.boiler.otFbSupplyOutletTemperature | round(2) }}"
        device_class: temperature
        unit_of_measurement: "°C"
      - name: "Quatt CV verwarmen"
        unique_id: quatt.boiler.otTbCH
        value_template: "{{ value_json.boiler.otTbCH }}"
      - name: "Quatt flowMeter temperature"
        unique_id: quatt.flowMeter.waterSupplyTemperature
        value_template: "{{ value_json.flowMeter.waterSupplyTemperature | round(2) }}"
        device_class: temperature
        unit_of_measurement: "°C"
      - name: "Quatt flowMeter snelheid"
        unique_id: quatt.flowMeter.flowRate
        value_template: "{{ value_json.flowMeter.flowRate | round(0) }}"
        unit_of_measurement: "l/u"
      - name: "Quatt thermostat verwarmen"
        unique_id: quatt.thermostat.otFtChEnabled
        value_template: "{{ value_json.thermostat.otFtChEnabled }}"
      - name: "Quatt thermostat SWW"
        unique_id: quatt.thermostat.otFtDhwEnabled
        value_template: "{{ value_json.thermostat.otFtDhwEnabled }}"
      - name: "Quatt thermostat koelen"
        unique_id: quatt.thermostat.otFtCoolingEnabled
        value_template: "{{ value_json.thermostat.otFtCoolingEnabled }}"
      - name: "Quatt thermostat control setpoint"
        unique_id: quatt.thermostat.otFtControlSetpoint
        value_template: "{{ value_json.thermostat.otFtControlSetpoint | round(2) }}"
        device_class: temperature
        unit_of_measurement: "°C"
      - name: "Quatt thermostat room setpoint"
        unique_id: quatt.thermostat.otFtRoomSetpoint
        value_template: "{{ value_json.thermostat.otFtRoomSetpoint | round(2) }}"
        device_class: temperature
        unit_of_measurement: "°C"
      - name: "Quatt thermostat room temperature"
        unique_id: quatt.thermostat.otFtRoomTemperature
        value_template: "{{ value_json.thermostat.otFtRoomTemperature | round(2) }}"
        device_class: temperature
        unit_of_measurement: "°C"
      - name: "Quatt QC"
        unique_id: quatt.qc.supervisoryControlMode
        value_template: "{{ value_json.qc.supervisoryControlMode }}"
      - name: "Quatt QC pomp protectie"
        unique_id: quatt.qc.stickyPumpProtectionEnabled
        value_template: "{{ value_json.qc.stickyPumpProtectionEnabled }}"

Then also put this into your configuation.yaml

template:
  - sensor:
      - name: "Quatt CiC COP"
        state: >
          {% set quatt_heat_power = states('sensor.quatt_cic_heatpower') | float %}
          {% set quatt_power = states('sensor.name_sensor_that_detects_usage_of_your_quatt') | float %}
          {{ ((quatt_heat_power / quatt_power )) | round(0, default=0) }}

  - sensor:
      - name: "Quatt Water Delta"
        unit_of_measurement: "°C"
        device_class: temperature
        state: >
          {% set quatt_water_out_temp = states('sensor.quatt_hp1_temperaturewaterout') | float %}
          {% set quatt_water_in_temp = states('sensor.quatt_hp1_temperaturewaterin') | float %}
          {{ (quatt_water_out_temp - quatt_water_in_temp ) | round(2, default=0) }}

  - sensor:
      - name: "Quatt CiC Heatpower"
        unit_of_measurement: "W"
        device_class: power
        state: >
          {% set quatt_water_delta = states('sensor.quatt_water_delta') | float %}
          {% set quatt_flow_rate = states( 'sensor.quatt_flowmeter_snelheid') | float %}
          {{ ((quatt_water_delta * quatt_flow_rate * 0.001137888) * 1000) | round(0, default=0) }}

  - sensor:
    - name: "Quatt CiC SupervisoryControlMode"
      state: >
          {% if is_state('sensor.quatt_qc', '0') %}
            'Standby'
          {% elif is_state('sensor.quatt_qc', '1') %}
            'Standby - heating'
          {% elif is_state('sensor.quatt_qc', '2') %}
            'Heating - heatpump only'
          {% elif is_state('sensor.quatt_qc', '3') %}
            'Heating - heatpump + boiler'
          {% elif is_state('sensor.quatt_qc', '4') %}
            'Heating - boiler only'
          {% elif is_state('sensor.quatt_qc', '96') %}
            'Anti-freeze protection - boiler on'
          {% elif is_state('sensor.quatt_qc', '97') %}
            'Anti-freeze protection - boiler pre-pump'
          {% elif is_state('sensor.quatt_qc', '98') %}
            'Anti-freeze protection - water circulation'
          {% elif is_state('sensor.quatt_qc', '99') %}
            'Fault - circulation pump on'
          {% endif %}

2 Likes

I have released a first version of the integration with the local API:

I am waiting for some approvals before I can add to the default HACS store. For now you would have to add the the repository as custom repository in HACS. Then you can install it through HACS and configure it in Home Assistant.
On my todo list are adding the COP and heatpower calculations and textual SupervisoryControlMode from @krizzziz.
Currently update interval is 10 seconds, might make it configurable in the future if people would like that.

2 Likes

Great job @mbotje !!!

Yes, I’m aware of the fact the Quatt has a minimum of 18 degrees water temp to start. It would be nice if we can prevent that the boiler is needed as much as possible. So I want to see what is the behavior when starting around these temperatures, e.g. how long the pump runs before the decision is taken to switch on the boiler and which sensor is actually used for that.
I was thinking of using the on/off CiC - gas boiler interface, the sensor measurements and some additional hardware to get around this minimum, e.g. by switching on an additional electric boiler, or some other trick with a temp sensor.

I have added support for COP and textual supervisory mode based on the template of @krizzziz, in the latest release.

Anyone willing to test and give feedback?

Thanks Marco. I have updated the integration and can now also see the COP.

It does show up as Unknown for now, as I believe we’re still missing some data from the CiC that is yet to be exposed by the Quatt devs. So COP cannot actually be calculated for now.

Anything else you’d like me to check?

I sent this email to quatt support requesting that they add kWh data to track power usage over time, similar to a smart kWh meter. Please send them an email if you also feel this would be useful

To: [email protected]

Hi,

Can quatt add statistics about electrical power consumption of the heatpump and also expose this data in the local API?

Asta it stands, Quatt only offers instant power consumption but no data about quantity ( kWh). Instant power usage is also not yet available in the API. One would need to add an extra device like a smart power meter to get this information.

But if this is possible with software, the information would be immensely helpful to get data about the daily/monthly/yearly consumption.

Thank you.

1 Like

It might be the case that you need to delete and reconfigure the integration in order to select an existing power sensor. (Let me know if that’s the case) Also, do you see a numeric value for flowRate for the flowMeter? For me that is currently the issue, resulting in COP unavailable but that seems to be an issue with my flowmeter.

I have currently two improvements planned, one is the options flow to configure and change the settings (IP and power sensor) when already set-up. Secondly, to better detect entities that should be disabled or enabled. For example hp2 is currently disabled by default for everyone and OpenTherm boiler data is enabled even when boiler is connected through one-off, resulting in a bunch of unavailable sensors.

If you have features or ideas, I’m happy to hear them :wink:

I see values for both flow rate and flow meter.
I don’t have a power sensor that measures the power consumption of the Quatt. What do you use for this? What device I mean. Quatt does not expose this info in the API yet, right?

And yes, I had to remove the integration and re-add it to see an option to select power sensor. But for now this is not helping since I am missing this power sensor to measure HP electrical power consumption.

When and if Quatt exposes it, your integration might need an update to automatically use this data.

Finally got time to test out the integration. Working quite nicely on this end! Now next steps are how t create a nice Dashboard for the Quatt.

I am envisioning a image of the quatt in a standard home setup (So an image of the Quatt, a Central Heating furness and the pipes in a diagram). So i can add all of the devices in one simple overview.
I created a overview in PPT, but not yet happy with the way it looks, yet.

Maybe I overlook it, but does the API only allow to read/monitor stuff, or also to control it? Like turning heat up/down on/of?

The API provided by Quatt only gives reading possibilities. So this is what @mbotje has integrated.

Point of the integration is that it is a simple method of integratie your Quatt into HA with all of the different sensors by only typing your up-address.

I can connect to my thermostaat through another HA integrations so I am able to control the heating and the extra sensors added by this integration help in that proces.

The API now exposes power information. Unfortunately it’s only instant power (powerInput). I’d love to see statistics about kWh. But I guess there are ways to compute that from instant power. After reading a bit, it seems people have been able to calculate kWh from a W sensor using the Riemman sum integral:

  "hp1": {
    "modbusSlaveId": 1,
    "getMainWorkingMode": 0,
    "temperatureOutside": 15.35,
    "temperatureWaterIn": 16.27,
    "temperatureWaterOut": 16.45,
    "powerInput": 5.150232,
    "power": 0,
    "silentModeStatus": false,
    "limitedByCop": false
  }

@mbotje this would be a nice to have: kWh calculation from the powerInput W sensor to track power consumption.

I believe I can confidently confirm that “power” is the heat power output, similar to how @krizzziz calculated his Quatt CiC Heatpower. The values are very close to each other. And power input is electrical power used instantly.

1 Like

Agreed! Would be a better integration than the one I suggested a longer time ago.

So @mbotje I am a happy user of the addon. Works great! Saw an update of the integration displaying the power device. Really nice! Keep up the good work.

I agree that energy in kWh is more useful than power. I don’t know if it’s possible to configure a Riemann sum sensor from this integration. We could do a simple Riemann ourselves off course. I think it would be better if Quatt would expose the total energy used through the API.

The power and powerInput are already added to the integration by another contributor. So I’m happy to see the integration gaining some traction and I’ll try to keep adding the new features as they become available.

1 Like

Yesterday the integration has been accepted in the default HACS repos so no every HACS user can find the Quatt Integration without adding a custom repo :tada:

5 Likes

@mbotje any ideas on how we can utilize the COP calculation you have in the integration so we can make a NEW COP value like a daily/weekly/monthly/yearly average?

I am now checking my COP for that day in the graphs…

@Doublet where is your example of your Quatt card? I really liked the idea!