SMA Wechselrichter Binding | SMA Inverter Binding

English below!

Hallo OpenHAB-Forum!

Ich habe noch aktuell wahrscheinlich ein leichtes Verständnisproblem und eventuell könnt ihr mir bei der Lösung helfen.

Ich bin im Besitz von zwei SMA Wechselrichter (Sunny Tripower STP 9000TL-20 + 8000TL-20), welche beide per LAN angebunden sind und der Modbus-Dienst ist aktiviert.
Bisher ist ein SolarLog 1200 zusätzlich mit dabei. Darüber wird ein Heizstab anhand des aktuellen Ertrags gesteuert.

Der SolarLog futtert nur SD-Karten im 2-Jahres-Takt und das Ding wieder in Gang zu bekommen ist jedes mal nervig.

Da habe ich gesehen, das man mit OpenHAB die SMA Wechselrichter per Modbus anbinden kann.

Die aktuellen Lösungen in Code-Beispiele funktionieren allerdings mit OpenHAB 3 nicht mehr oder nicht mehr so wie angedacht.

Daher meine Frage: Welche Bindings brauch ich, damit ich die Werte auslesen kann und wie muss ich diese Konfigurieren?

Hello OpenHAB forum!

I still have currently probably a slight understanding problem and maybe you can help me with the solution.

I am in possession of two SMA inverters (Sunny Tripower STP 9000TL-20 + 8000TL-20), which are both connected via LAN and the Modbus service is activated.
So far, a SolarLog 1200 is also included. Over it a Heating element is controlled on the basis of the current yield.
The SolarLog only eats SD cards in a 2-year cycle and to get the thing going again is annoying every time.
Then I saw that with OpenHAB you can connect the SMA inverters via Modbus.
However, the current solutions in code examples no longer work with OpenHAB 3 or not as intended.

Therefore, my question: Which bindings do I need so that I can read the values and how do I configure them?

The modbus binding should do. It has a SunSpec mode now AFAIK SMA inverters supports Sunspec.

Hello can you please specify your problem?

You just need to install the modbus binding and configure your Things / Items.
Items, Thing configuration (-files) here from OH2 should also work with OH3.

Fist you may want to try it with SunSpec see here:

1 Like

@Tuny Perfect!
That was the info I had not found.
But with the information I can only read the AC side, at DC comes only UNDEF.
Are there other IDs there?

According to the PDF document (, the ID is in the range of the specified start address of 40185 with the block length of 61.

I am not sure what values are supported with SunSpec.
I am using the “normal” modbus pofile from SMA.

The configuration I also copied form other topics in the forum here. This should also fit for you I think. You just have to rename them (.items, .things, .sitemap) and put them into configuration folder. Set the right IP in the things file.
sma_items.txt (5.7 KB)
sma_things.txt (4.5 KB)
Wechselrichter_sitemap.txt (1.3 KB)

Also you need to install the Javascript traformation service and put them into “transform” folder. Rename them also to “.js”.
smalimit.txt (84 Bytes)
smalimit100.txt (89 Bytes)
smalimit100A.txt (96 Bytes)
smalimit1000.txt (90 Bytes)

Hope this helps. BR

1 Like

That looks very good so far.
The data is now coming in.
Now I just have to adjust the names of all the objects a bit, so I can tell both inverters apart.

Hi Tuny,

Could it be that divide3600.js is also needed?
It would be great if you could provide this file.

Many thanks,

divide3600.txt (144 Bytes)
Here the file. You only have to rename it (.js).divide10.txt (209 Bytes)
divide1000.txt (144 Bytes)
SMA.txt (856 Bytes)

1 Like

Oops, it seems that divide10.js and divide1000.js are also missing …
And for .items the will be needed.

sure, I edited the post before.
I just saw that there is a quite good documentation here:

1 Like

Hello all.

It’s been a while now, unfortunately, but I’m only now getting back to deal with the topic forced.
(The SolarLog 1200 is broken again :S)

I have tried to add the SMA inverters now in an openHAB test instance to set up and not break my productive system.
For this I used the linked data from @Tuny, but also helped myself to this data:

I can retrieve data, but unfortunately it is incorrect.
Besides many NULL values, I can’t get the formatting of the data clean.
As soon as I want to integrate a second inverter, remains even more on NULL.

According to SMA documentation, the IDs have also changed in part.
The temperaturei st e.g. in my model series no longer really present.
Currently it looks like this:

If I try to use the scripts from alaub81, openHAB also gives me many Java errors.
I have tried to understand them - no luck.

Maybe someone has already tried to transmit the data via a MQTT interface?
Find here only scripts, with a Modbus adapter for the Pi, but that does not work for me.
The two devices are too far apart.

Hi @Hoerli,

I use the Modbus Interface to get the values from my SMA Sunny Tripower 10.0 (STP10.0-3SE-40).

SMA provides dedicated parameter files for each inverter, which can be downloaded here:

I need help finding your inverter, so you may need to check if you have an alternative name from them and validate your IDs. In my case, the parameter file lists four different addresses for some parameters like the “DcMs.Amp”. Two are always NULL, and the other two are the values for A and B.

If your inverters also support SunSpec, then you will have, for some values, an SMA register and a SunSpec Register. The SunSpec Registers are above 40001.
But apart from the register id, you must also use a different Unit ID in your Bridge configuration. The default SMA Register has the Unit ID 3, and the SunSpec Unit ID is always +123, so the default 126. If you query any register above 40001 with the Unit ID 3, you will also get the NULL and vice versa.

If you provide your things and items file, I may also point to other problems with the two inverters.


Hi Christian,

I have now sat down and inserted all data by hand in openHAB with the Modbus Binding.
Currently it seems to work so far.
I also noticed that the IDs of the great templates from Tuny are outdated or do not fit for my model.
I’m sure that’s what you meant.
At SMA there is a big overview excel with all currently supported modbus devices and their IDs.
My inverters fit in here: STP nn000TL-20, PKG 2.56

I also noticed while entering the IDs that the Excel is now outdated or not everything works with every inverter.
With some IDs I get nothing usable or NULL out.

I think with the manual way I currently come further than the Config data in openHAB.

Meanwhile I am also in contact with someone who has written a Python script that translates Modbus to MQTT.
He is still trying to adapt the script to SMA inverters.
Then I would have two possibilities, which would be ideal for me :slight_smile: