Skip to content

Home Assistant integration of ThermIQ-MQTT, providing control and logging of Thermia heatpumps

License

Notifications You must be signed in to change notification settings

ThermIQ/thermiq_mqtt-ha

Repository files navigation

Home Assistant ThermIQ Integration

hacs_badge

Screenshot

This integration allows you to use the ThermIQ-MQTT and ThermIQ-Room2 hardware interface to control and monitor your Thermia or Danfoss heatpump from Home Assistant.

Please support the continous development by buying a ThermiQ-room2 from ThermIQ, we are a small company and Your support makes a difference! Get the neccessary hardware from Thermiq.net, where you also can read more about our products and background.

Steps to install ThermIQ HA Integration

  1. Install the Mosquitto Add-on in Home Assistant.

  2. Install MQTT Explorer on your PC and verify that you can connect to Mosquitto

  3. Configure your ThermIQ device according to the indstructions at Thermiq.net

  4. Use MQTT-Explorer to verify that your ThermIQ device is sending information to Mosquitto. You should see MQTT messages in MQTT-Explorer from the heatpump every 30s

  5. Install the MQTT Integration in Home Assistant and verify that it's communicating with the Mosquitto Add-on.

  6. Install HACS

  7. Click Open your Home Assistant instance and open a repository inside the Home Assistant Community Store. to install the ThermIQ-MQTT integration
    or Go to the HACS integrations page, add ThermIQ integration.

  8. Restart HA

  9. Go to Integrations and add ThermIQ.

    1. configuration
    2. The MQTT Nodename should be the same as you set during wifi-config in step 3, without a "/" at the end
    3. Use hexformat only if you have the old 1.xx ThermIQ-MQTT firmware
    4. Use debug if you want to try it out without actually writing to the heatpump
  10. To control and monitor the heatpump from your dashboard:

    1. HACS->Frontend->Explore/Add HTML Jinja2 Template card
    2. HACS->Frontend->Explore/Add Number Box
    3. HACS->Frontend->Explore/Add fold-entity-row
    4. Download/save the images vp_base.png, vp_base_hgw_on.png and vp_base_hw.png
    5. Upload the downloaded files to your Home Assistant machine to either the folder www/community/ or (local/community/)
    6. Go to your dashboard and add a new manual card
    7. Copy/paste the contents of ThermIQ_Card.yaml into your manual card
    8. Before you save the card, adjust the ID if you've used anything else than the default vp1 when setting up the integration. If you do: Ctrl+F with find/replace is your friend.

Debugging

Use MQTT Explorer to ensure your heat pump is communicating with the Moqsuitto before setting up HA.

Home Assistant server sometimes needs to be restarted once all configuration is done

Make sure you use the right MQTT Nodename when configuring the HA Integration. The MQTT-Nodename is the same as the base "Topic" in MQTT-Explorer (without /data)

From v2.3.0 the pictures used has changed from *.jpg to *.png format to facilitate dark mode. You might want to update the dashboard-card

ThermIQ Energy Control for ThermIQ-Room2

You can optimize energy usage directly from Home Assistance by using the excellent AIO Energy Management Plugin from here

Steps to install:

  1. Click AIO Energy Management Open your Home Assistant instance and open a repository inside the Home Assistant Community Store. and install it

  2. Follow the instructions on how to configure AIO Energy Management together with either Nordpool or Entso-e

  3. In HA->Settings->Devices&Services-> Helpers, Create two new number helpers

    • vp1_electricity_price_threshold with a reasonable price range and step size of 0.01
    • vp1_electricity_low_hours with a a range from 0-23, Step size 1

    Create one switch helper

    • vp1_enable_energy_control
  4. Add the following to your configuration.yaml file, use the correct nordpool/entso-e sensor for your setup

aio_energy_management:
    cheapest_hours:
    - nordpool_entity: sensor.nordpool_kwh_se3_sek_3_10_025
      unique_id: vp1_cheapest_hours
      name: My Cheapest Hours
      first_hour: 14
      last_hour: 13
      starting_today: true
      number_of_hours: input_number.vp1_electricity_low_hours
      sequential: False
      failsafe_starting_hour: 21
    calendar:
      name: My Energy Management Calendar
      unique_id: vp1_energy_management_calendar
  1. Add the following to you automations.yaml file
- alias: Update AIO Energy Management
  description: "Update AIO cheapest hours based on current settings"
  triggers:
    - trigger: state
      entity_id: input_number.vp1_electricity_low_hours
  action:
    service: aio_energy_management.clear_data
    data:
      unique_id: vp1_cheapest_hours
  
- alias: Set EVU based on price
  description: "Cheapest hours turn off EVU, (most expensive turns on))"
  triggers:
    - trigger: time_pattern
      hours: "*"
      seconds: "10"
    - trigger: state
      entity_id: input_number.vp1_electricity_price_threshold
    - trigger: state
      entity_id: input_boolean.vp1_enable_energy_control
    - trigger: state
      entity_id:
        - binary_sensor.vp1_cheapest_hours
      attribute: updated_at
    - trigger: homeassistant
      event: start
  action:
  - if:
      - condition: or
        conditions:
        - condition: state
          entity_id: binary_sensor.vp1_cheapest_hours
          state: "on"
        - condition: state
          entity_id: input_boolean.vp1_enable_energy_control
          state: "off"
        - condition: numeric_state
          entity_id: sensor.nordpool_kwh_se3_sek_3_10_025
          below: input_number.vp1_electricity_price_threshold
    then:
      - service: mqtt.publish
        data_template:
          topic: "ThermIQ/ThermIQ-room2/set"
          payload: >-
            {"EVU":0}
    else:
      - service: mqtt.publish
        data_template:
          topic: "ThermIQ/ThermIQ-room2/set"
          payload: >-
            {"EVU":1}
  1. Restart Home Assistant
  2. You will now be able to use the Energy Management Tab in the ThermIQ panel to enable energy control, set your low cost limit and select the number of hours you want to have enabled. The AIO and ThermIQ-Room2 will make sure the hours selected are the cheapest ones. Use MQTT-Explorer to ensure you get the expected behaviour.

Misc

Automations

No setup of automations is needed. You can use the normal "input_number" services to change a value in the heatpump. For example:

data: {"entity_id": "input_number.thermiq_mqtt_vp1_indoor_requested_t", "value":20}

Available data

The data available is listed in REGISTERS.md

Features and Limitations

  • Currently provides all data from the heatpump in the form of sensors and binary sensors
  • Allows control over the heatpump

ThermIQ-USB Support

Tom R has created a Node-RED flow converting the previous version, ThermIQ-USB, to use the same MQTT messages making it compatible with this integration.

Domoticz Support

If you are looking for a Domoticz version, it's available from Jack: Domoticz

Contributing

Contributions are welcome! If you'd like to contribute, feel free to pick up anything on the current GitHub issues list! The naming, translation and grouping of registers can be improved, your input is appreciated. Most of it is in the thermiq_regs.py

All help improving the integration is appreciated!