Setup of new Modbus-Sunspec Binding

Hi Folks,

I just updated to Release 2.5.4 to connect my SolarEdge SE8K using the new modbus-sunspec Binding. I installed Modbus Binding and Sunspec and created the Bridge and Inverter Things using PaperUI:

Although the SE8K is a 3 phase inverter, I used the single phase inverter Thing because it’s the only one the Binding seems to offer:

Then I configured the items in an item file:

// SolarEdge SE8K
Number:Temperature		PV_WR_CaseTemperature			"WR Temperatur Gehäuse [%.1f °C]"		<temperature>			{channel="modbus:inverter-single-phase:795e6134:deviceInformation#cabinet-temperature"}
Number:Temperature		PV_WR_HeatsinkTemperature		"WR Temperatur Kühlkörper [%.1f °C]"	<temperature>			{channel="modbus:inverter-single-phase:795e6134:deviceInformation#heatsink-temperature"}
Number:Temperature		PV_WR_TransformerTemperature	"WR Temperatur Transformator [%.1f °C]"	<temperature>			{channel="modbus:inverter-single-phase:795e6134:deviceInformation#transformer-temperature"}
String					PV_WR_Status					"WR Status"														{channel="modbus:inverter-single-phase:795e6134:deviceInformation#status"}
Number:ElectricCurrent	PV_WR_AC_Total					"WR AC Strom [%.1f A]"											{channel="modbus:inverter-single-phase:795e6134:acGeneral#ac-total-current"}
Number:Power			PV_WR_Power						"PV Leistung [%.1f W]"											{channel="modbus:inverter-single-phase:795e6134:acGeneral#ac-power"}
Number:Frequency		PV_WR_Frequency					"AC Frequenz [%.2f Hz]"											{channel="modbus:inverter-single-phase:795e6134:acGeneral#ac-frequency"}
Number					PV_WR_Powerfactor				"Leistungsfaktor [%.2f]"										{channel="modbus:inverter-single-phase:795e6134:acGeneral#ac-power-factor"}
Number:Power			PV_WR_PowerTotal				"PV Leistung Gesamt [%.1f Wh]"									{channel="modbus:inverter-single-phase:795e6134:acGeneral#ac-lifetime-energy"}

But I get no readings:

Is there some documentation on using the Sunspec Binding or does anybody have an hint on where to start debugging?
Both things are marked as online, but how can I tell if the Modbus-TCP connection works?

Many thanks for your help in advance!


Hi Folks,

shortly after posting this I figured out, that I need a 3rd Thing (Poller), so I created it and set the parameters like in the example mentioned below, but it still doesn’t work. I still don’t get any updates in one of the channels.
So I tried to setup the Modbus connection the “old-fashioned” way using this example: Solaredge inverter via Modbus TCP 2
And this worked from the start, so it’s obviously not the inverter or the network connection.

Any guide to setup the Sunspec Binding will be much appreciated.


1 Like

The documentation is here

Good starting point would be to look into the logs and see if there are any errors. Do you see anything like that?

In the meantime I got it working. The first version shipped with OpenHAB 2.5.4 was only supporting 1 phase inverters, but I have a 3 phase inverter. After updating to OpenHAB 2.5.5 it worked from the start.
Many thanks for the documentation though.

1 Like

Hi, I’m glad you did it! You may be able help me :slight_smile:

I have an SE10K, OpenHAB 2.5.7 (latest). The three-phase-inverter thing shows “online” but the channels report no data. Properties on the thing are empty except for uniqueAddress.

I have the Modbus TCP Slave configured. Says “online” too.

Any clue?
Do you still need a poller with this version?

Thanks for any help.

No poller required. Docs here

A bug slipped into 2.5.7 release, you can find instructions to update here: Binding Modbus 2.5.7. Stops working after unsuccessful read attempt

It might be good to update first to fixed version before proceeding

Hi guys, I’m trying to setup my Grid tie inverter, but not sure if it supports SunSpec. Manufacturer is chinese MUSTPOWER, inverter model is PH1800. I hooked up HF2211 RTU to WiFi converter to it, set up bdrate to 19200,8,1,0, buffer size to 8192, protocol MODBUS, Communication as Tcp Server.
In the OPENHAB I have created MODBUS bridge as TCP Slave with the same port as HF2211, pointer it to converter’s IP. Bridge says it is ONLINE. Then I have created Single Phase Inverter, selected bridge and pointed address to start reading 20001. And it is online too, however when I link channels they show 0.
Your help is much appreciated, what shall I do next?

Have a look in your openhab.log, what does that have to say about it?

2020-10-09 09:07:03.176 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@1197b81[slaveId=4,functionCode=READ_MULTIPLE_REGISTERS,start=20001,length=61,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: SocketTimeoutException Read timed out [operation ID 31d61087-7842-40ba-9a7f-64e743035746]

2020-10-09 10:49:27.612 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Incoming payload ‘2020-05-09T16:54:07’ not supported by type ‘NumberValue’

Your target device did not respond to being polled.
Is that a permanent error, i.e. you get tries 2/3, 3/3 failing as well?

If so, there’s little else we can say about it from this end - no communication. Wrong address, broken wires, invalid registers, gateway config, etc. Or not even Modbus - I saw nothing in a quick look at the manufacturer docs to suggest it is?

For experimenting to see what works, using a Modbus utility like modbus-poll will be a lot more convenient than openHAB.

Thanks Rossko, will try modbus soft first. will post back.
No results ((
HF2211 is connected to WiFi - 100% as I access it’s web interface over the LAN
HF2211 Communication settings: TCP Server, local port 8234, buffer size 1024, keep alive 60, timeout 0, Security disabled, route - uart.

Serial port settings:
Baudrate - 19200, 8, 1, none,
Buffer - 1024, gap time - 50
Flow Control - half duplex
Cii - serial string, +++, 300
Protocol - modbus

On PC I have ran Modbus poll - no communication. I hit connect (F3) Chose Connection - MODBUS TCP/IP, ip of the HF2211, same port, connection timeout - 300, IP4

I get timeout error, tx equals to err, what am I missing???

I have configured (Setup -> Read/Write Definitions) Slave ID - 4

and looks like there is communication, but data is in strange format, I only recognize 1800 - which could be model (PH1800).

When I disconnect the inverter I get error, so looks like data is transferred through MODBUS.
How I get correct data, any thoughts?
nteer is supplied with software for PC called SolarPowerMonitor which has many useful info, when I connect USB cable to inverter I can read them, see below img:

So I guess these data transferred over MODBUS too…?

Dumb me, so looks like I get data, just need to change address to read MODBUS registers like from 10001 to 19999…
So HF2211 is working, now need to get data to openhab.

I know I’m dumb, computer stupid, but can you help me with the following.
I need to get a principle, then will do everything by myself. Searching other user’s modbus implementation I understood, that I need to create Modbus Regular Poll too, to be able to use data read from modbus. so I’ve created it with the following parameters:
Poll interval - 300, start address 10001, length 10 (not sure why 10), tupe holding register.
Poll is online!
Then I created ModBus Data:
Read address 10001, read value type unint16
it is online!
Linking value as Number or as String does not reflect number - 1800
what I did wrong?

What does it say instead?

‘length’ specifies how many registers to read at one time, in a block beginning at ‘start’.

nothing, no value in String, 0.0 in Number

OMG, just restarted openhab and got the number!!! Thanks for help!!!

Thanks for help bud! I have managed to reverse engineer MODBUS addresses and identified values of the hybrid inverter and adding data to the openhab page.
One more thing while I’m searching for answer maybe you can help: I’m receiving data like 420, I need to divide it to 10 lets say, so it would come up 42.0 on the page, what is the easiest way of doing this? can I use Read Transform? what shall I write in there so the data is divided to 10, 100, 1000?

OK figured it out myself )):

#to divide data received:
#install javascript transformations in openhab, create file divideby10.js with the following content:
(function(i) {
return parseFloat(i) / 10;

in the transform folder and in binding settings for “Read transform” point to that file: JS(divideby10.js)

to restart openhab: sudo systemctl restart openhab2.service

1 Like

for those who bought chinese hybrid inverters, most of them has the same logic components and software despite shape and color is different. This is their MODBUS addresses. Have FUN!
MODBUS.txt (3.8 KB)