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