Connect SMA Inverter via Paper UI

I am running OHabian 3.2 Paper UI. I figured out how to connect all of my things (counting 50+)… except my SMA inverters. I have searched for answers, but except one post all SMA related post do not show how to connect with the UI, or I do not understand them. The Inverters (2 ThreePhase6, one Sunny Boy single phase 3) are online via LAN, Modbus is on (says ID=3) and I can see them via their webinterface and read the channels. I do have to log in to see all channels, otherwise it is just total AC output.
I have added a Modbus thing as bridge and point it to one of my Triphase6 inverters. I use it´s IP, port 502 and ID 3 (or 126, see below). I connect a “generic” three phase inverter from the Modbus bindings. Using id 3 and StartAddress 40000 I get an online status (another working combo is port 126 and startAddress 40185). The Channel tab shows a couple of channels, and they contain “numbers” but these numbers make no sense, like an enclosure temperature of 0C in warm conditions and a total AC current of -0.1 Watt during daylight when the Web interface shows 700 watts. Using different ID/Address combinations than shown before causes an “offline” error.
Is there a simple way to fix this?

There’s a whole bunch in this short sentence that doesn’t make sense.

  • OHabian: is an SD card image and series of scripts to set up an RPi (for example) in an optimal configuration to run openHAB. It’s latest version is 1.7 I think.

  • PaperUI: this doesn’t exist in OH 3.x. It’s been replaced by MainUI.

So are you running openHAB 3.2 and talking about MainUI? Or are you running 2.x and really do mean PaperUI?

It’s important to get the correct information so we can make sure we provide relevant information.

Unfortunately I don’t use modbus so can’t help with your specifics. But I suspect, assuming you are using MainUI, posting the contents of the “Code” tab of your Thing definition will be helpful to someone who does know modbus.

Using the Modbus binding, you can configure Things and channels manually. You will need a detailed knowledge of the target devices modbus register map.
Some of the posts show you that. Very often they show you using xxx.things files, because some of us prefer managing Things that way for modbus.
But it’s not hard to read those, and use to set Things and channels using MainUI instead.
Overall though, this is hard work if you do not know exactly what you are doing.

Some devices offer self-identifying or ‘discovery’ features - they announce what they can do. It’s not completely hands-off, you have to do some basic configuring. A common standard used by inverters is “SunSpec”. SMA devices do offer that.

See

… Sorry for my incorrect description. I etched an Openhabian 3.2 card for my Raspi4 and use it via the GUI. I have influxdb enabled saving stuff every minute and have SD Card mirroring switched on. Openhabian is good.
This my modbus


And this is the connected inverter

And this is a data channel. Unfortunately it is night and the output should be 0

Please post the text, not screen shots. Use code fences:

```
code goes here
```

Screen shots are hard to read, cannot be searched, cannot be copied and edited. Sometimes screenshots are unavoidable but anywhere there is a code tab, please post the text.

Thanks. I hoped to obtain the correct address and be done. I guess I have to leave the GUI to make all adjustments needed and wished I would not need to. The Senec storage, wallboard and inverter Bindings worked so nicely out of the box while it’s Webinterface is no good for graphing data. The SMA webinterface is great, allowing extraction of all kinds of data, but the OH bindings suck, I guess I am spoiled…

… you a right. Quoting them from an Ipad is a pain as it inserts too many space. I will do better next time.

Don’t, then - nobody told you to do that.

Modbus “sucks”, if you like. It’s a decades old idiot protocol, never intended for non-professionals to even think about. It’s very flexible, it’s widely used for all manner of things, it’s very fiddly, it’s hard.

But you’ve chosen to use Modbus, because no-one has written an SMA specific binding for openHAB (there’s not much need), and you’re not going to write your own.
That’s okay, SMA provide some assistance by following SunSpec standard.
Follow the docs.
User note -

Note the ID for your TCP bridge Thing.

I think at the moment you are trying to fit unSpec shaped openHAB Things onto SMA’s generic modbus at ID 3, rather than SunSpec shaped Modbus at 126.

Hi,
many thanks id 126 and Address 40185 gets results. The data is there. Just some of it seems to be low resolution. Like the AC Power is given in 5Watt increments while the webinterface shows precise numbers. The Phase Voltage is given with two dezimals like seen on the web interface.
It seems that I have only the address and a “block length” (=61 default) to play with. What should I do to get a higher precision number?

These are questions for SMA, who choose what data to publish where.

OK, but anyhow: what do I do with “Blocklength”?

What do you want to do with it?
It defines for the Modbus binding in general, “starting from register X, fetch a block of N registers”. Fetching N+1 or N-1 doesn’t affect register data content of any given register.
For SunSpec devices, acceptable block lengths are more or less pre-defined in the specification the device needs to follow.
That’s what SunSpec is really about, it’s just a gentleman’s agreement - “registers are defined at address 100 for a length of 10, and reg 100 holds volts, reg 101 holds amps, etc.”

Remote devices are at liberty to reject requests they don’t like e.g. invalid length.

If SMA have chosen to make some rounded kW value available in register number 1234, there is nothing we can do about it from this end.
Maybe there is some setting in the SMA device to change that (doubt it).
Maybe they made the same info at higher resolution is available somewhere else, don’t know.
Maybe they want to sell you a power meter add-on with better features, don’t know.

Many thanks:


:

1 Like