Introducing a simple Docker Compose setup for HMS MQTT Publisher

| | Allgemein

Update: I am using this „much easier“ integration now: https://github.com/suaveolent/ha-hoymiles-wifi[GitHub, External]

I’ve been tinkering with my home automation setup recently, specifically integrating HMS-XXXXW-2T series micro-inverters with my system. The hms-mqtt-publisher[GitHub, External] is a neat tool that does just that by fetching telemetry info from these inverters and publishing it to an MQTT broker. The catch? It typically requires compiling from source with Cargo, Rust’s package manager.

The Challenge with Cargo

Compiling with Cargo is straightforward in many environments, but within my specific setup — an LXC container on Proxmox hosting Docker containers — it presented unnecessary complexity. My goal was a simpler, more direct deployment method that fit seamlessly into my existing workflow.

The Simple Solution: Docker Compose

The solution I landed on involves a Docker Compose file that bypasses the need for Cargo compilation. This approach not only simplifies deployment but also provides flexibility in configuration management. The Docker Compose setup is designed for ease of use, allowing quick adjustments and deployments.

You can find my solution here: https://github.com/marchorst/hms-mqtt-publisher-docker-compose

Configuration Choices

When deploying the hms-mqtt-publisher[GitHub, External] using Docker, there are a couple of options for configuration. The original setup suggests using environment variables for essential settings such as the inverter host and MQTT broker details. These variables include INVERTER_HOST, MQTT_BROKER_HOST, and optional settings for username, password, and port. (Or using Cargo)

However, I opted to mount config.toml directly into the Docker container. This method offers comprehensive control over all configurable options, ensuring full customization beyond what environment variables alone might allow. This decision was driven by a desire for detailed configuration management within the Dockerized environment.

Wrap Up: Three Ways to Deploy HMS MQTT Publisher

To sum up, there are three main ways to set up the HMS MQTT Publisher:

  • Compiling from source using Cargo.
  • Mounting a config.toml file for comprehensive configuration.
  • Configuring through environment variables for a simpler setup.

Each method has its merits, catering to different preferences and technical environments. For my purposes, mounting the config.toml was the preferred choice, offering a balance between ease of use and configuration depth.

If you’re interested in exploring this tool and its deployment options further, I encourage you to check out the original repository at https://github.com/DennisOSRM/hms-mqtt-publisher/ and my Docker Compose https://github.com/marchorst/hms-mqtt-publisher-docker-compose. Whether you’re new to Docker or looking for a hassle-free way to integrate your micro-inverters with your home automation system, this Docker Compose setup might just be the solution you’re looking for.

Links

https://github.com/marchorst/hms-mqtt-publisher-docker-compose
https://github.com/DennisOSRM/hms-mqtt-publisher/

Neueste Beiträge

Landroid Worx Mähroboter DIY GPS Tracking

DIY GPS Tracking für den Landroid Worx Mähroboter

Wenn du auf der Suche nach einer Möglichkeit bist, deinen Landroid Worx Mähroboter mit GPS Tracking auszustatten, dann bist du hier genau richtig. In diesem Beitrag zeige ich dir, wie du mit einem GPS Modul und einem ESP32 Controller dein eigenes Tracking-System für deinen Mähroboter realisieren kannst. Zusätzlich erkläre ich dir, wie du die Genauigkeit der GPS-Daten mittels eines Kalman-Filters in Home Assistant verbesserst.


Weiter >>

WLAN Router Einstellungen Telekom ISP / Tenda Nova MX21-Pro Mesh WLAN Wi-Fi 6E System

Persönliche Einblicke in die Einrichtung und Nutzung

Als passionierter Technologie-Enthusiast und stolzer Nutzer eines Telekom 500Mbit/s Glasfaser Internet Anschlusses war ich auf der Suche nach einem WLAN-System, das mit Leistung und Zuverlässigkeit überzeugen kann. Meine Wahl fiel auf das Tenda Nova MX21-Pro Mesh WLAN Wi-Fi 6E[*] System, und diese Entscheidung möchte ich heute ausführlich mit Ihnen teilen.


Weiter >>