SMA TriPowerX and Sunny Home Manager 2.0 to MQTT publisher (also runs in Docker)

​Hi forum, I recently had a PV system installed with SMA TriPower X inverter and Sunny Home Manager 2.0 components. I was naively expecting integration into my home automation (home assistant) to be a breeze, as there are SMA integrations available, and how hard could it be, right?

Turns out I was optimistic, because apparently the X generation of inverters does not behave like previous devices, API-wise, plus the SHM2 only offers obscure broadcast messages and doesn’t even have something I would call an “API”.

There exist some projects out there that work with these devices, collecting the data and making it available eg via MQTT for integration with other systems, most notably:

Either of these do (resp. don’t do) some things that makes them not ideal for my environment - I want something standalone that is freely configurable with regards to where it pushes data, that can easily be deployed as a dockerized application. So I picked parts and pieces from these projects, and put them into a new project:
smahub
​​

Core features include: plugin-style architecture for extending with additional data sinks&sources, SMA TriPowerX and SHM2 plugins, MQTT and HA-MQTT publication, decent (hopefully) documentation, mechanism/sample config for integrating with home assistant, run standalone or as dockerized application.

I like the results so far, this setup does work quite well for me - but as always, ymmv, so interest and feedback welcome!


Hallo Forum, ich habe kürzlich ein PV-System mit SMA TriPower X Wechselrichter und Sunny Home Manager 2.0 Komponenten installiert bekommen. Naiverweise dachte ich, dass die Integration in meine Hausautomation (Home Assistant) ein Kinderspiel sein würde, da es SMA-Integrationen gibt, und wie schwierig kann das schon sein… ?

Wie sich herausstellt, war ich zu optimistisch, denn anscheinend verhält sich die X-Generation der Wechselrichter nicht wie frühere Geräte in Bezug auf die API, und der SHM2 bietet nur seltsame Broadcast-Nachrichten und hat gar nicht erst etwas, was ich als “API” bezeichnen würde.

Es gibt einige Projekte da draußen, die mit diesen Geräten arbeiten, die Daten sammeln und sie beispielsweise über MQTT für die Integration mit anderen Systemen verfügbar machen, insbesondere:

Jedes dieser Projekte tut Dinge (nicht), die sie für meine Umgebung nicht ideal machen - ich möchte eine standalone-Instanz, die frei konfigurierbar ist in Bezug darauf, wohin sie Daten schickt, und die als dockerisierte Anwendung deployed werden kann. Also habe ich Teile und Ideen aus diesen Projekten genommen und sie in eine neue Komponente zusammengesteckt:

smahub

Kernfunktionen beinhalten: Plugin-Architektur zur Erweiterung mit zusätzlichen Datenquellen und -senken, SMA TriPowerX und SHM2 Plugins, MQTT und HA-MQTT Publikation, brauchbare (hoffentlich) Dokumentation, Mechanismus/Beispiel-Konfiguration zur Integration mit Home Assistant, eigenständig oder als dockerisierte Anwendung nutzbar.

Mir gefällt das Ding bisher, das Setup mit HA funktioniert für mich ziemlich gut - aber wer weiß die das für andere aussieht :wink: daher sind Interesse und Feedback willkommen!

3 Likes

Hi Daniel (@aGoodAutomation),

I recently got the same SMA installation and expected it to integrate easily. I also went with a big brand as I expected it to be seamlessly supported in 2023. like my car, my shutters, my plugs, my shelly energymeters etc. I smiled when I read about your similar experience with the SMA product and it’s integration with HA.

Also, I’m running HA in a Docker container on my Synology NAS, which already limits the solutions I could use.

I hope to find time to experiment with your solution in a few weeks. Since I’ve installed the HA on Docker with the Synology GUI, I’ll have to consider some extra time to get familiar with Docker Compose, right?

Best Regards,

tom

Hi Tom,

Maybe a little bit of time - docker-compose is not hugely complicated, and well worth getting familiar for this kind of scenario imo.
It boils down to having a look at the docker-compose.yaml that comes with smahub, editing any of the parameters you need, then running ‚docker-compose up‘, and observe of all is working as expected.

More background on smahub: Home Assistant integration for SMA PV system

1 Like