1. Home
  2. Docs
  3. H60/H66 Gateway Manual
  4. Home Assistant MQTT integ...
  5. Setup Home Assistant for H60

Setup Home Assistant for H60

This guide is based on latest Image and instructions from home-assistant.io and the use of Raspberry Pi.

Download the install image from home-assistant.io and follow the instructions for installation on your Raspberry Pi.

Instructions are updated for version: core-2022.11.2

Create user account

When HA is up an running, access it’s web interface and access your user profile in the left bottom and turn on “Advanced mode”.

Next, go to Configuration, Users and add a user account for the MQTT connection. In this example we will setup “mqtt_user” with password “1234”.

Install Mosquitto MQTT broker

Go to Configuration menu. Select “Add-on’s, Security / Supervisor”. Click “Add-on store” button and search for “Mosq” in the search field and “Mosquitto MQTT broker” add-on will be shown. Select it and install, Start it and set it to auto-start.
Tip: While into add-ons, for easy access to edit the configuration.yaml file, install the “File Editor” as well.


H60 configuration
Next, access the web interface on the H60 and configure with help of the example below.

MQTT_SRVR = IP Of the HA unit (Raspberry Pi)
MQTT_PORT = 1883 (standard)
MQTT_USER = mqtt_user (set as same in HA config above)
MQTT_PASS = 1234 (set as same in HA config above
)
MQTT_SUBS = 1 (1=HP setting can be changed from HA, 0= Read only)
MQTT_PUBALL = 20 (Time in minutes for re-publish all data, 0=off)
MQTT_DISCOV = 0 Auto-Discovery, See below. (0=Disabled, 1=Enabled, 2=Enabled in persistant mode)

Home Assistant auto discovery (available from H60 ver. 220108)

Now you have an option to either use auto-discovery or perform a manual installation

If using auto-discovery, all registers of your heat pump will be configured automatically and no editing of configuration.yaml is needed. If you want to use manual installation instead, skip to next step.

To enable, set MQTT_DISCOV = 1 and H60 will publish the MQTT auto-discovery topics to HA.
The topics sent to HA Contains Name of register, type or register and for settings max, min levels and change step is included.
After all above is configured, reset H60 and after a minute or so all entities should be seen in HA for you to build dashboards.



Configuration.yaml in Home Assistant for MANUAL installation (Not needed for auto-discovery)

Depending on type, brand or model of heat pump you are having, the sensor definitions has to be adjusted to match the specific heat pump.

So what you need to do is to add, remove and change the sensor definitions to match the correct Sensor ID:s (0001 in this case) with the correct description in HA, “Rad Return”
The available and usable Sensor ID:s for different heatpumps can be found in the H60 web interface home screen. Also your MAC address has to be entered to every definition as this is how your H60 is identified.

mqtt:
- name: "Rad Return"

state_topic: "+/HP/0001"
icon: mdi:thermometer
unit_of_measurement: "C"

To be able to change settings in the heat pump rom HA, the SET topic must be enabled by changing the H60 setting MQTT_SUBS to 1.
Reset H60 after settings are changed.

The CMD Topic
Additionaly H60 is subscribing on the CMD topic to perform various actions.

Send data “STATUS” to the CMD topic to have H60 to publish current status. For example: Uptime, Wifi signal strength, etc.

Send data “GETALL” to the CMD topic to request H60 to publish an update on all heat pump data.

Example:
Send: “841d2e82daf0/HP/CMD” with data: “STATUS”
Return:”841d2e82daf0/HP/STATUS/RSSI”, “Good -66dBm”

Troubleshooting

After your HA installation and H60 has been configured and restarted you should be able to view all data from the Heatpump in the HA dashboard.
If it is just showing zeros or nothing, there is a problem.

Check H60
Start with accessing H60 and check its LOG.
Is is showing “MQTT Connected with user/pass” we know that H60 is communicating with HA.

If it is showing “MQTT Reconnecting, retrying” os similar, please check all setup from start. Correct IP to HA?, Correct username and password?, H60 and HA on same network? etc.

Check HA
You can get valuable info for troubleshooting by entering the Mosquitto Log. in HA. Supervisor->Mosquitto broker->Log
Check that Mosuitto broker is started in the Supervisor menu.

How can we help?