ThermIQ Integration to control Thermia and Danfoss heatpumps

I have created an integration providing data monitoring and control of your Thermia or Danfoss heatpump using a ThermIQ-MQTT Hardware interface installed in the heatpump.

The integration provides sensors and inputs for all information available from the heatpump including the possibility to change operating mode, see all different temperatures including outdoor sensor etc.

The ThermIQ-MQTT Integration can be installed as a custom repository in HACS or directly by downloading the files into a directory below custom_components

The repository can be found here:
https://github.com/ThermIQ/thermiq_mqtt-ha

Feedback and ideas for further integration are welcome
/&&

4 Likes

The ThermIQ integration is now included in HACS by default! Just Install it from Integrations.

Any chance you could make this compatible with Thermia Online? Having purchased the interface for Thermia Online Iā€™m reluctant to buy another interface unit just to get HA integration. However it would be great to have Thermia Online integrated with HA.

Sorry but Thermia online is a proprietary solution that I cannot support

Hi! Iā€™m thinking of purchasing the ThermIQ-mqtt, but I would first like to understand the status of this project. Is it still alive and supported? Are there plans to support it further? Is the project open to pull requests and possibly collaborators (I see one PR that was declined)? I tried to dig into the codebase to understand what sensors it exposes so that Iā€™d be sure that the product covers my use cases, but a lot of the code is in Swedish (I think) and itā€™s hard to understand some names of the sensors etcā€¦ For an investment of ~ā‚¬140, Iā€™d like to be sure that Iā€™m not purchasing a dead product. If itā€™s alive and well, and there are no plans for cancelling it in the next few years, then Iā€™d be happy to purchase it and potentially contribute to the integration as well.

Hi Toomas,
The ThermIQ-MQTT product is well alive and kicking and open for collaboration. The pull decline was already integrated by me to the code.

The HA integration is, as you note, basic and focus is to bring all control and status from your heatpump into HA. The exposed registers/variables names are cryptic but is mapped to a functional description.

It would be great to get help on the front-end side with a more polished GUI, graphs etc. For the time beeing this is provided by ThermIQ-web, my lamp based web-server and database package. See thermiq.net for more info

Perfect, thanks for a quick response!

You can use the H60 Gateway as a gateway to HA for the newer Thermia pumps on the Genisis platform (Atlas, Calibra and Diplomat)

Iā€™ve been using it for a while and while it generally works great, I have a few questions:

  • Are there plans to translate the sensor names to English? I could contribute via a PR, but if you have plans to do it then I wonā€™t. I see fresh commits in the repository.
  • After a restart, my Indoor target temp resets to 0 and is not updated unless I update it directly on the pump, or set it manually via Home Assistant, but I have to remember what the temperature previously was if I want to keep it.
  • Copying a bunch of code to configuration and automation YAML files is not a very standard or user-friendly approach (compared to just installing a component through HACS and have all sensors and automation appear automatically, and whatā€™s more important, be updated along with the component)
  • Regarding the last point. I installed the integration a few months ago and I see the example configuration and automation files have changed. Whatā€™s the upgrade procedure that I can follow so that nothing breaks?
  • Many of my parameters are either False or 0. Is there a way to know whether they are not supported by my heat pump or is something broken?

Thank you for making ThermIQ happen and keep up the good work!

Hi Toomas,
Iā€™ve done some major updates in the code recently to make sure that the UI is showing consistant values also after manually changing something or restarting. It does require you to update your existing automations with the new ones. To my knowledge You can only do that by editing automations.yaml.

Iā€™m not a heavy user of HA and I have found no other way deploy an integration, it seems strange, i would like it to work as you describe but thats not how HACS/HA is structured. If you have any advice Iā€™m willing to try them out.

Your 0 and Falseā€™s comes from the automation being wrong. And why does HA interpret an integer 0 as False, can it be fixed?

I have no plan today to change the intenal state names, I autogenerate these out of a common database and in general they are not seen in the UI, the sensors are described etc. I can generate the names in the UI in Swedish, German, Finnish and English and will do so once I figure out how to proper handle multilingals in HA.

Give the new version a spin, it should be better than the last.

1 Like

Iā€™m not a heavy user of HA and I have found no other way deploy an integration, it seems strange, i would like it to work as you describe but thats not how HACS/HA is structured. If you have any advice Iā€™m willing to try them out.

Iā€™m not sure either. Will check that out at some point.

Your 0 and Falseā€™s comes from the automation being wrong. And why does HA interpret an integer 0 as False, can it be fixed?

Not sure. I just copy-pasted the whole thing and didnā€™t edit anything.

I have no plan today to change the intenal state names, I autogenerate these out of a common database and in general they are not seen in the UI, the sensors are described etc. I can generate the names in the UI in Swedish, German, Finnish and English and will do so once I figure out how to proper handle multilingals in HA.

They are indeed not seen in the UI, but the problem usually comes when editing YAML, which is a daily thing with HA. Assuming that people who use this integration have to mess around with configuration.yaml and automation.yaml, then I think itā€™s safe to assume they are comfortable enough to mess around with other YAML as well. And this is a case for me, and since I donā€™t speak Swedish, I find it quite hard to work with automations, custom button cards, charts etcā€¦ Not a huge thing of course, but rather a small quality of life improvement.

Give the new version a spin, it should be better than the last.

Just tried it, but everything is now missing and broken. It seems the upgrade path is not as straightforward as copypasting :sweat_smile: Also tried deleting all automations, but still everything is broken. All sensors seem to be gone, although I didnā€™t do anything to the ThermIQ HACS integration. Iā€™m running version bd412b6. But before I started changing automation and configurations this version worked fine. I was reluctant to go about changing the integrations, as the most critical features somewhat worked, but now everything else is gone as well.

The ThermIQ integration is now updated to v1.1.0.

Major changes includes english translations of all states and a MUCH nicer Lovelace UI setup.

Make sure that you replace all automation.yaml and configuration.yaml settings with the new ones

2 Likes

Yet another update (-> v1.2.0) From now on the automations and inputs needed are done inside the integration so there is no need to change automations.yaml and configuration is short.

Hi! Iā€™m trying to use the integration to optimize my energy usage by pre-heating when electricity prices are low or stopping heating when theyā€™re high. Iā€™m currently just turning the temperature up or down to achieve that. I was wondering if thereā€™s a smarter way to ā€œcall for heatā€ or something, and also to stop heating. Turning the pump off completely is probably not a good idea, as youā€™d want water still circulating, right?

Also, Iā€™m setting hot water start temp quite high when my sauna is turned on to make sure that thereā€™s plenty of hot water for the whole family. This could also be a good place to optimize costs ā€“ only heat water at the cheapest times. However, Iā€™m doing it also by setting hot water start and stop temp. Is there a better way to call for water heating?

And lastly, I discovered that thereā€™s a service ā€œThermIQ MQTT: set_indr_tā€. Does this mean that I could provide room temperature from some sensor to the pump so it can work more efficiently?

Hi Toomas, I have two versions of ThermIQ, ThermIQ-mqtt and ThermIQ-room. The later also has an interface to connect to the indoor thermostat on the heatpump making it possible to set a virtual indoor temperature for the heatpump to work against and is set with the set_indr_t service

Please note that Thermias indoor termostat, which I emulate, is not a simple thermistor but rather a ā€œbi-directional busā€.

Read more here: thermiq.net

2 Likes

Great product! Im on the latest firmware, latest hassos and thermiq ha integration:
in the log i see * Error executing service: <ServiceCall input_number.set_value (c:04b69101e97b55306d742e3207294d76): value=4.0, entity_id=['input_number.thermiq_mqtt_room_factor']>

Hi Tommy,
You are right, the room factor is allowed to be 0-4. Will be fixed in next release.

Iā€™m considering investing in ThermIQ for optimizing the use of my solar panels - to make the heat pump run extra when thereā€™s excess solar energy. So kind of similar to what @keex is trying to do. What parameters is best practice to adjust for this purpose?

  • hotwater_start_t
  • hotwater_stop_t

Any other parameter? What about the room heating? I donā€™t know enough about heat pumps to understand the parameters.

Unfortunately there are no existing functions in the Thermia heatpumps for this so it comes down to tricking the heat-algorithm to be satisfied as is. This can be done with the hotwater parameters as you write and/or by the ThermIQ-room by setting an under/over value of the ā€œactualā€ room temperature.

Iā€™m changing the indoor target temp to 15/30 based on the electricity price. Hereā€™s my automation so far:

alias: Heat on/off based on price
description: ''
trigger:
  - platform: template
    id: high_price
    value_template: >-
      {{ states('sensor.nordpool_price') >=
      states('input_number.heating_electricity_high_price') }}
  - platform: template
    id: low_price
    value_template: >-
      {{ states('sensor.nordpool_price') <=
      states('input_number.heating_electricity_low_price') }}
  - platform: template
    id: high_price_end
    value_template: >-
      {{ states('sensor.nordpool_price') <
      states('input_number.heating_electricity_high_price') }}
  - platform: template
    id: low_price_end
    value_template: >-
      {{ states('sensor.nordpool_price') >
      states('input_number.heating_electricity_low_price') }}
  - platform: numeric_state
    entity_id: input_number.thermiq_mqtt_indoor_requested_t
    id: prolonged_high_temp
    above: '28'
    for:
      hours: 6
      minutes: 0
      seconds: 0
  - platform: numeric_state
    entity_id: input_number.thermiq_mqtt_indoor_requested_t
    id: prolonged_low_temp
    below: '18'
    for:
      hours: 6
      minutes: 0
      seconds: 0
condition:
  - condition: numeric_state
    entity_id: sensor.nordpool_price
    above: '0'
action:
  - choose:
      - conditions:
          - condition: trigger
            id: high_price
        sequence:
          - service: script.heat_min
            data: {}
      - conditions:
          - condition: trigger
            id: low_price
        sequence:
          - service: script.heat_max
            data: {}
      - conditions:
          - condition: or
            conditions:
              - condition: trigger
                id: high_price_end
              - condition: trigger
                id: low_price_end
              - condition: trigger
                id: pump_off_for_long
              - condition: trigger
                id: prolonged_low_temp
        sequence:
          - service: script.heat_restore
            data: {}
      - conditions:
          - condition: trigger
            id: reminder
        sequence: []
mode: single

The scripts set indoor target temp to max/min. Hereā€™s an example for heat max script:

sequence:
  - condition: numeric_state
    entity_id: input_number.thermiq_mqtt_indoor_requested_t
    below: '30'
    above: '15'
  - service: input_number.set_value
    data_template:
      value: '{{ states(''input_number.thermiq_mqtt_indoor_requested_t'') }}'
    target:
      entity_id: input_number.previous_heating_temperature
  - service: input_number.set_value
    data:
      value: 30
    target:
      entity_id: input_number.thermiq_mqtt_indoor_requested_t
  - service: input_number.set_value
    data:
      value: 55
    target:
      entity_id: input_number.thermiq_mqtt_hotwater_start_t
  - service: input_number.set_value
    data:
      value: 65
    target:
      entity_id: input_number.thermiq_mqtt_hotwater_stop_t
  - service: notify.notify
    data:
      title: Heating optimization
      message: >-
        Nordpool price = ā‚¬{{ states('sensor.nordpool_price') }}/kWh -> Heating
        temp set to {{ states('input_number.thermiq_mqtt_indoor_requested_t')
        }}Ā°C
      data:
        actions:
          - title: Undo
            action: HEATING_RESTORE
          - title: Heat settings
            action: URI
            uri: /lovelace/thermiq
          - title: View prices
            action: URI
            uri: entityId:sensor.nordpool_price
mode: single
alias: Heat max
icon: mdi:fire

Heat min:

alias: Heat min
sequence:
  - condition: numeric_state
    entity_id: input_number.thermiq_mqtt_indoor_requested_t
    below: '30'
    above: '15'
  - service: input_number.set_value
    data_template:
      value: '{{ states(''input_number.thermiq_mqtt_indoor_requested_t'') }}'
    target:
      entity_id: input_number.previous_heating_temperature
  - service: input_number.set_value
    data:
      value: 15
    target:
      entity_id: input_number.thermiq_mqtt_indoor_requested_t
  - service: input_number.set_value
    data:
      value: 40
    target:
      entity_id: input_number.thermiq_mqtt_hotwater_start_t
  - service: input_number.set_value
    data:
      value: 60
    target:
      entity_id: input_number.thermiq_mqtt_hotwater_stop_t
  - service: notify.notify
    data:
      title: Heating optimization
      message: >-
        Nordpool price = ā‚¬{{ states('sensor.nordpool_price') }}/kWh -> Heating
        temp set to {{ states('input_number.thermiq_mqtt_indoor_requested_t')
        }}Ā°C
mode: single
icon: mdi:fire-off

And heat restore:

alias: Heat restore
sequence:
  - condition: numeric_state
    entity_id: input_number.previous_heating_temperature
    above: '0'
  - service: input_number.set_value
    data_template:
      value: '{{ states(''input_number.previous_heating_temperature'') }}'
    target:
      entity_id: input_number.thermiq_mqtt_indoor_requested_t
  - service: input_number.set_value
    data:
      value: 0
    target:
      entity_id: input_number.previous_heating_temperature
  - service: notify.notify
    data:
      title: Heating optimization
      message: >-
        Heating temp restored. Nordpool price = ā‚¬{{
        states('sensor.nordpool_price') }}/kWh -> Temp set to {{
        states('input_number.thermiq_mqtt_indoor_requested_t') }}Ā°C
mode: single
icon: mdi:fire-alert

2 Likes