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

Ein Leitfaden für Senioren: Günstige Smartphones bis 100 Euro – Unsere 4 Favoriten & Erfahrungsbericht einer maßgeschneiderten Senioren-Lösung – UPDATE 2024/25

In diesem Beitrag stellen wir dir vier günstige Smartphones vor, die aktuell (Stand Dezember 2024) für unter 100 Euro erhältlich sind. Zusätzlich teilen wir eine ganz besondere Geschichte aus dem Familienkreis: Wie wir eines dieser Geräte für die Oma meiner Verlobten eingerichtet haben, damit sie trotz ihrer Parkinson-Erkrankung gut damit zurechtkommt.


Weiter >>

Getting Started with Alfresco SDK/Development: A Beginner’s Guide to Automating File Organization with Alfresco Behaviors

Alfresco is an enterprise content management platform known for its flexibility and extensibility. One powerful way to extend its functionality is through Behaviors, which allow you to run custom logic whenever specific repository events occur. For example, you can trigger custom actions whenever nodes are created, updated, or deleted.


Weiter >>

Enhancing Alfresco’s Public API (ACS): A Step-by-Step Guide to Custom Node Extensions with MIME Type Restrictions

Introduction

In today’s digital landscape, controlling and validating the types of content users can upload into systems is essential for security and data integrity. Alfresco, a leading open-source content services platform, offers a flexible public API that enables developers to create custom extensions and adapt the platform to specific organizational needs. This article provides a step-by-step guide to implementing a MIME type restriction feature in Alfresco’s Nodes API, allowing for more controlled and secure content uploads.


Weiter >>

Warum der Air Assist unverzichtbar ist – Mein Erfahrungsbericht

Nachdem ich meinen ATOMSTACK A12 Ultra Laser[*] und die R2 V2 Drehwalze[*] in Betrieb genommen hatte, war es nur eine Frage der Zeit, bis ich mir zusätzlich ein Air Assist System zugelegt habe. Ich entschied mich für das DEWALLIE Air Assist Set[*], und ich kann schon vorweg sagen: Es war eine der besten Ergänzungen für meine Lasergravur-Setups, vor allem beim Arbeiten mit Holz!


Weiter >>