Reading Data from Solaredge inverters via Modbus TCP

Out of interest, does the portal / app gui continue to work when you enable the modbus? Docs indicate it should but keep to know for sure.

Yes, SolarEdgeā€™s portal continues to receive data from my inverter. However, my inverter has a cellular connection through which it forwards data to SolarEdge; if yours has always been feeding to the cloud over network connection, Iā€™m not sure if connecting via Modbus would affect that.

Yes, I have both connections active over ethernet.

Does this Modbus binding also allow for controlling the inverter, or is it read-only just for monitoring ?
Iā€™d like for example OH to command it to either direct excess power to my battery (which will be attached to a DC port of the inverter) or send to grid.
Anyone using OH to implement his personal charging strategy ?

Modbus can do whatever your devices allow it to, read/command, it all depends on the inverters/devices.

I havnĀ“t yet played with this for my SMA inverters, (my Battery inverter takes care if this automaticly. When the PV is over-producing power, it charge the battery. When Battery is fully charged, it will send any over-production to grid). So I acutally dont think I will ever going to need to change this.
But there could be reasons for activating other stuff, when PV is over-producing power. This I will play with when we get a better weather out there (spring/summer I guess).

If thereā€™s any SMA modbus users with developer skills around the transport layer of the modbus bindig could be used a base for dedicated SMA binding.

I am not sure if I posted this here : https://github.com/openhab/openhab-addons/pull/6331

Perhaps the above binding would work with these devices

A SMA Binding would be very nice. I had tried several suggested solutions with modbus.
Unfortunately none of them worked in my situation.

Obtaining data from modbus is quite complex

Why? I find it pretty easy actually and working rock steadyā€¦
Which SMA devices have you got?

Hi Kim,

Iā€™m sure itā€™s easy when itā€™s up and running, but Iā€™m still trying to receive data from my Sunny Boy inverter SB2.5-1VL-40. Iā€™m using port 502, Id=2.

ā€˜ModBus Dataā€™ and ā€˜TCP Slaveā€™ are properly online and also is the ā€˜Regular Pollā€™
Iā€™m experimenting with the address 40200 (actual power)

My logfile presents incidentally a reading error, so it seems that there is some data available. But my linked item for presenting the actual power (number) remains empty.

Kind regards,
Pieter

I have the same SMA Sunnyboy Storage 2.5ā€¦
This is my things file: (Notice I have NOT added all registers, only those I wanted to catch).

Bridge modbus:tcp:inverter2 [ host="10.4.28.249", port=502, id=3, connectMaxTries=3] {


// SMA SunnyBoy Storage 2.5
	Bridge poller device_typ [ start=30053, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data device_typ [ readStart="30053", readValueType="int32"]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Condition
	Bridge poller status [ start=30201, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data status [ readStart="30201", readValueType="int32"]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 GridRelay on/off
	Bridge poller GridRelay [ start=30217, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data GridRelay [ readStart="30217", readValueType="int32"]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Total Yield.
	Bridge poller TotalYield [ start=30529, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data TotalYield [ readStart="30529", readValueType="int32", readTransform="JS(divide1000.js)" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Daily Yield
	Bridge poller DayYield [ start=30535, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data DayYield [ readStart="30535", readValueType="int32", readTransform="JS(divide1000.js)" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Power
	Bridge poller Power [ start=30775, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data Power [ readStart="30775", readValueType="int32" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 PowerL1
	Bridge poller PowerL1 [ start=30777, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data PowerL1 [ readStart="30777", readValueType="int32", readTransform="JS(divide1000.js)" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Grid Voltage L1
	Bridge poller GVoltageL1 [ start=30783, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data GVoltageL1 [ readStart="30783", readValueType="int32", readTransform="JS(divide100.js)" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Current battery state of charge
	Bridge poller CurrentBatStatCharge [ start=30845, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data CurrentBatStatCharge [ readStart="30845", readValueType="int32" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Current battery capacity
	Bridge poller CurrentBatcapacity [ start=30847, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data CurrentBatcapacity [ readStart="30847", readValueType="int32" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 PowerDrawn
	Bridge poller PowerDrawn [ start=30865, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data PowerDrawn [ readStart="30865", readValueType="int32" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Power grid feed-in
	Bridge poller PowerGridFeedIn [ start=30867, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data PowerGridFeedIn [ readStart="30867", readValueType="int32" ]
	   	 
  	 }


// SMA SunnyBoy Storage 2.5 Battery oper. status
	Bridge poller BatteryStatus [ start=30955, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data BatteryStatus [ readStart="30955", readValueType="int32" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Status battery application area:
	Bridge poller BatteryAppArea [ start=31057, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data BatteryAppArea [ readStart="31057", readValueType="int32" ]
	   	 
  	 }


// SMA SunnyBoy Storage 2.5
	Bridge poller PowerDrawnGridL1 [ start=31265, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data PowerDrawnGridL1 [ readStart="31265", readValueType="int32" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5
	Bridge poller PowerDrawnGridL2 [ start=31267, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data PowerDrawnGridL2 [ readStart="31267", readValueType="int32" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5
	Bridge poller PowerDrawnGridL3 [ start=31269, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data PowerDrawnGridL3 [ readStart="31269", readValueType="int32" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Present battery charge
	Bridge poller PresBatCharge [ start=31393, length=4, refresh=5000, type="input" ] {
	    
	    	 Thing data PresBatCharge [ readStart="31393", readValueType="int32" ]
	   	 
  	 }

// SMA SunnyBoy Storage 2.5 Present battery discharge
	Bridge poller PresBattDischarge [ start=31395, length=2, refresh=5000, type="input" ] {
	    
	    	 Thing data PresBattDischarge [ readStart="31395", readValueType="int32" ]
	   	 
  	 }

}

Ps. This my belong in a new thread for SMA devicesā€¦ So if/when you have questions, you should start a new thread, and Tag me. And IĀ“ll be there helping you :slight_smile:

Thank you verry much for this example.

I donā€™t have a ā€˜Sunny Boy Storageā€™ but a ā€˜Sunny Boy Solar Inverterā€™
I suppose this is a different device, but I will make some attemps with this input.

Ahh sorryā€¦ I misread, I thought it was the Storage (those damn SMA namings! :hot_face:)
Yours IS differentā€¦ YouĀ“ll need the correct modbus registers for your device, which can be a pain to find on SMA website. IĀ“ll check if I get the one you need when I get back home tonight.
I also have a SMA STP 6000TL-20 solar inverter working. And I have a LG Chem Battery, which also communicate (via the SMA SunnyBoy storage inverter)

And please start a new thread, otherweise others might complaint :smiley:

Existing thread, which it would seem sensible to continue

1 Like

Hello SolarEdge folks,

this is a short and humble question related to ModBus.

(I do hope this is not seen as hijacking the thread, if yes, please advise and I will create a new thread).

I have a working SolarEdge/ModBus connection nicely integrated with (latest) openHAB 2.5.1-2 (Release Build) on Raspberry Pi 2 Model B Rev 1.1

I am using the SolarEdge binding (binding-solaredge - 2.5.1) and data gets updated once every minute via the private API (which is the minimum value, as it seems, as defined per the binding config.

Example from log:

020-02-05 19:41:50.050 [vent.ItemStateChangedEvent] - solaredge_generic_373357ff_live_consumption changed from 0.42 kW to 0.34 kW
2020-02-05 19:42:49.867 [vent.ItemStateChangedEvent] - solaredge_generic_373357ff_live_consumption changed from 0.34 kW to 0.32 kW
2020-02-05 19:43:49.968 [vent.ItemStateChangedEvent] - solaredge_generic_373357ff_live_consumption changed from 0.32 kW to 0.34 kW
2020-02-05 19:45:49.878 [vent.ItemStateChangedEvent] - solaredge_generic_373357ff_live_consumption changed from 0.34 kW to 0.35 kW
2020-02-05 19:47:49.915 [vent.ItemStateChangedEvent] - solaredge_generic_373357ff_live_consumption changed from 0.35 kW to 4.74 kW
2020-02-05 19:48:49.913 [vent.ItemStateChangedEvent] - solaredge_generic_373357ff_live_consumption changed from 4.74 kW to 0.3 kW
2020-02-05 19:52:49.962 [vent.ItemStateChangedEvent] - solaredge_generic_373357ff_live_consumption changed from 0.3 kW to 0.33 kW

What I do not understand:
Why is the local ModBus update frequency (artificially?) restricted to a 60 seconds interval?

I am asking because in the SolarEdge Monitor (Android application, which shows live data nicely on the cellphone as well) the data is updating much more frequently and reacts more ā€œsnappyā€ compared to what I can see in via ModBus/openHABian values.

If a cloud is passing by I immediately ā€œseeā€ this in my cellphoneā€™s app, but there is rather often a delay in openHABian due to the ā€œ1 minuteā€-config.

In my world ModBus/openHABian should be picking up the data without any artificial delay, same like the cellphone app?

I wonder if my ModBus/SolarEdge-binding/openHABian configuration can be set up in a way, that I can see the same (more speedy) update frequency like what I can observe on my cellphone ,e.g every 5 seconds.

Please advice should I have missed or misunderstood something here, as there might be good reasons (which I am just not aware about).

Thanks for any enlightening comments!

[EDIT]: code fences :slight_smile:

You can change the update frequence in the modbus setting. I update my data in 6000ms (6 seconds). And it could probably be as low as 1000ms.
But I cant help unless you tell if youĀ“re using modbus v2 or the old modbus v1 binding?

Hello Kim,

thanks for your fast reply.

I am not using any ModBus binding at all. I am using the SolarEdge binding.

As I said in my OP, I am not sure If I am asking this in the right placeā€¦ please excuse If this should be the case.

Thanks for any guidance in this topic.

Then you are not using local modbus.
Hint, you might want to change if you do want more frequent updates? I do not know if you need extra/different interface options.

The Solaredge binding docs point out that the binding uses the solaredge API. Access rates are limited when using a public key. It also suggests how to try private API, but points out that may not be reliable.

But you wrote:

And

And

And for your question:

I would say you have misunderstood at least one basic thingā€¦ YouĀ“re not running modbus :wink: