This guide is intended to provide instructions for Home Assistant setup downloaded from home-assistant.io and the use of Raspberry Pi or HAOS.
Download the install image from home-assistant.io and follow the instructions for installation on your Raspberry Pi or other equipment.
Create user account
When HA is up an running, access it’s web interface and access your user profile in the left bottom and there turn on “Advanced mode”.
Next, go to Settings -> People -> Users section 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 Settings menu. Select “Add-on’s, and search for “Mosq” in the search field and “Mosquitto MQTT broker” add-on will be shown. Select it and install, Start tha add-on and set it to Start on boot.
Tip: While into add-ons, for easy access to edit the configuration.yaml file, install the “File Editor” as well.
H66 configuration
Next, access the web interface on the H66 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 aboveMQTT_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 persistent mode)
Home Assistant auto discovery
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 the automatic function, set MQTT_DISCOV = 1
and H66 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, retart the H66 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 using 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 H66 web interface home screen. Also your MAC address has to be entered to every definition as this is how your H66 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 H66 setting MQTT_SUBS to 1.
Restart H66 after settings are changed.
The CMD Topic
Additionaly H66 is subscribing on the CMD topic to perform various actions.
Send data “STATUS” to the CMD topic to have H66 to publish current status. For example: Uptime, Wifi signal strength, etc.
Send data “GETALL” to the CMD topic to request H66 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 H66 has been configured and restarted you should be able to view all data from the Heat pump in the HA dashboard.
If it is just showing zeros or nothing then, there is a problem.
Check H66
Start with accessing H66 and check its LOG.
If its showing “MQTT Connected with user/pass” then we know that H66 is communicating with HA.
If its showing “MQTT Reconnecting, retrying” os similar, please check all setup from start. Correct IP to HA?, Correct username and password?, H66 and HA on same network? etc.
Check HA
Check that Moswuitto broker add-on is started in Settings -> Add-on -> Mosquitto broker. You can get valuable info for troubleshooting by entering the Log section in the same bake in HA.