Home

Awesome

hms-mqtt-publisher

This tool fetches the current telemetry information from the HMS-XXXXW-2T series of micro-inverters and publishes the information into an MQTT broker. Please note that it doesn’t implement a DTU, but pulls the information off the internal DTU of these inverters.

How to run

The tool is distributed as source only — for now. You’ll have to download, compile and run it yourself. Please note that configuration of hosts, and passwords is done via config.toml from the current directory. It supports two different output channels. One is a simple MQTT publisher that doesn't follow a particular schema, and the other is made for Home Assistant. It supports auto discovery of devices.

$ git clone https://github.com/DennisOSRM/hms-mqtt-publisher.git
$ cd hms-mqtt-publisher
$ cargo r

image

Docker

The latest release is directly deployable via a docker image from DockerHub. It is built automatically for the following Linux platforms:

The parameters to access the inverter and MQTT instance are pulled from environment variables:

Ansible (systemd)

You can use the bellackn.homelab.hms-mqtt-publisher role to deploy hms-mqtt-publisher as a systemd service to a remote host. Check the role's documentation to see configuration options and setup instructions.

Note of caution

Please note: The tool does not come with any guarantees and if by chance you fry your inverter with a funny series of bits, you are on your own. That being said, no inverters have been harmed during development.

Known limitations