Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Infini 3k/3k+ compensation mode without Modbus

Featured Replies

39 minutes ago, riogrande75 said:

In the german forum where you found my thread I mentioned the use of golden fingers in the options slot.

You could connect a usb2serial converter on your RPi and try it there. I really expect that the firmware in your device limits such commands on the option port.

Thank you, I was thinking to try that.  The edge connector looks like an old ISA card so if I can find one of those I can make a connector.

 

Hi,

I had a quiet day at the office so I spent a couple of hours writing a Python program inspired by @riogrande75's "powerctrl.php.

It uses pymodbus and runs two threads - one polls the ET112 every two seconds and captures the main instantaneous measurements.

The other attempts to emulate the Eastron SDM630 meter so that when the Infinisolar modbus card polls "total system power" it will get the ET112 value in the register and the format that the SDM630 would give it.

ET112 values are in scaled 32 bit ints.  SDM630 gives them up in IEEE754 32 bit float.  

From @riogrande75's posts on the German photovoltaikforum site I think the modbus just polls for "Total System Power" but we shall see.

Interesting data from my ET112.  My inverter is pushing back 100W and the balance of about 40W is coming from the grid.

Interesting to see the VAr (reactive VA) which is negative and the power factor  which is low:

root@raspberrypi:/home/pi/inverter/sdm630_from_et112# python ./sdm630_from_et112.py 
2019-04-26 16:57:52,168 MainThread      INFO     sdm630_from_et112:165      Starting Modbus server
2019-04-26 16:57:52,173 MainThread      INFO     sdm630_from_et112:169      Starting client to poll ET112
2019-04-26 16:57:52,177 Thread-1        INFO     sdm630_from_et112:205      Thread started for: Server
2019-04-26 16:57:52,184 Thread-2        INFO     sdm630_from_et112:232      Thread started for: Client
2019-04-26 16:57:54,252 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 222.1, Amps:   0.660, Watts:  39.8, VA: 146.6, VAr: -140.3, Wdmd:  41.6, WdmdPk: 7566.6, pf:   0.293, Hz:  49.8
2019-04-26 16:57:56,328 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 222.1, Amps:   0.657, Watts:  40.4, VA: 144.5, VAr: -138.9, Wdmd:  41.6, WdmdPk: 7566.6, pf:   0.279, Hz:  49.8
2019-04-26 16:57:58,406 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 222.1, Amps:   0.640, Watts:  40.5, VA: 143.7, VAr: -138.0, Wdmd:  41.6, WdmdPk: 7566.6, pf:   0.281, Hz:  49.8
2019-04-26 16:58:00,482 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 222.0, Amps:   0.654, Watts:  40.9, VA: 145.7, VAr: -140.0, Wdmd:  41.6, WdmdPk: 7566.6, pf:   0.292, Hz:  49.8
2019-04-26 16:58:02,560 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 222.0, Amps:   0.651, Watts:  39.8, VA: 144.6, VAr: -138.9, Wdmd:  41.6, WdmdPk: 7566.6, pf:   0.280, Hz:  49.8
2019-04-26 16:58:04,636 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 222.0, Amps:   0.653, Watts:  42.4, VA: 147.3, VAr: -141.2, Wdmd:  41.6, WdmdPk: 7566.6, pf:   0.287, Hz:  49.8
2019-04-26 16:58:06,713 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 221.8, Amps:   0.658, Watts:  38.5, VA: 145.9, VAr: -140.9, Wdmd:  41.6, WdmdPk: 7566.6, pf:   0.289, Hz:  49.9

When the house load goes up the pf improves:

2019-04-26 17:19:19,683 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 219.9, Amps:   0.668, Watts:  40.5, VA: 147.1, VAr: -141.3, Wdmd:  37.9, WdmdPk: 7566.6, pf:   0.280, Hz:  50.1
2019-04-26 17:19:21,762 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 220.4, Amps:   0.662, Watts:  39.3, VA: 147.0, VAr: -141.8, Wdmd:  37.9, WdmdPk: 7566.6, pf:   0.267, Hz:  50.1
2019-04-26 17:19:23,837 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 220.4, Amps:   0.659, Watts:  40.9, VA: 147.7, VAr: -142.1, Wdmd:  37.9, WdmdPk: 7566.6, pf:   0.264, Hz:  50.1
2019-04-26 17:19:25,914 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 219.2, Amps:   3.024, Watts: 559.3, VA: 1028.9, VAr:  -9.3, Wdmd:  37.9, WdmdPk: 7566.6, pf:   0.978, Hz:  50.1
2019-04-26 17:19:27,991 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 219.8, Amps:   0.665, Watts: 145.0, VA: 146.2, VAr: -18.8, Wdmd:  37.9, WdmdPk: 7566.6, pf:   0.991, Hz:  50.1
2019-04-26 17:19:30,068 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 219.8, Amps:   0.673, Watts: 146.6, VA: 147.6, VAr: -17.5, Wdmd:  37.9, WdmdPk: 7566.6, pf:   0.993, Hz:  50.1
2019-04-26 17:19:32,145 Thread-2        INFO     sdm630_from_et112:247      ET112 Volts: 219.8, Amps:   0.672, Watts: 147.5, VA: 148.4, VAr: -17.3, Wdmd:  37.9, WdmdPk: 7566.6, pf:   0.995, Hz:  50.1

Tomorrow I will have a go to see if this will work and whether my Infinisolar Modbus card is fooled.

I will need an RS485 adapter to talk to the inverter (inverter is master), and another one to talk to the ET112 (I am master).  And I Pi to run it.  Might have been cheaper to just buy the supported SDM630 but it is bulky and this way I can also use the data from the ET112 for other stuff and maybe fiddle with what I tell the inverter to tune the inverter behaviour.

 

Edited by Elbow
added the data with more load

@Elbow

technically, RS485 is the BUS, not a point-to-point connection. Therefore, you should be able to put all the devices on a single bus, where the Infini will be the Master, while PI and ET112 will both act as the slave devices.

  • Infini looks for a device with address "1", so the PI that is emulating SDM630 must have address "1".
  • ET112 must have a different address....for example "2".
  • Baudrate 19200, no parity, 1 stop bit

But I get that having the two separate RS485 point-to-point connections (ET112-PI and PI-Infini) might be easier to configure.

image.png.ab4c1dd014b7d56ddd6a94b81508263c.png

image.png.2ea66cdbf54c255b48612754e9c0e8c2.png

 

Edited by Youda

HI @Youda,

Thanks for that.  I do know that RS485 is a bus - the problems are:

  • Infini wants to be master to poll the "fake SDM630".
  • The ET112 wants to be slave and be polled by a master.
  • One RS485 bus can only have one master (well - except if you can somehow co-ordinate the masters.

I may put my Pylon batteries on the same bus as the ET112 - set them all the 9600 baud since its not obvious how to set the Pylons to 19200.

That would mean I can do it with two RS485 buses rather than 3.  But I don't see how I can get it down to 1 since I need two master nodes.

My program is now also pushing the ET112 data off to EmonCMS so I'm feeling quite good as to how its coming out.

 

  • Author

YES, there can be only one master on a bus. Sou you need to have 2 bus'es.

BUT: If you set the modbus card in the infini to "server mode" it will be slave as well. Then you can "emulate" the modbus server with the RPi (=master).

I spent a lot of time within the last couple of weeks sniffing and analyzing the modbus messages that are being exchanged between modbus server and 2 infini 3k+ inverters. My goal is to make all the "modbus stuff" unneccessary. I can share the state of my analysis so far, if you like.

41 minutes ago, riogrande75 said:

YES, there can be only one master on a bus. Sou you need to have 2 bus'es.

BUT: If you set the modbus card in the infini to "server mode" it will be slave as well. Then you can "emulate" the modbus server with the RPi (=master).

I spent a lot of time within the last couple of weeks sniffing and analyzing the modbus messages that are being exchanged between modbus server and 2 infini 3k+ inverters. My goal is to make all the "modbus stuff" unneccessary. I can share the state of my analysis so far, if you like.

Hi,

I’m definitely interested in what you have discovered.

But I still can’t use one bus because the Voltronic Modbus card can only do 19200 and the Pylon batteries can only do 9600 or 115200.

 

 

Hi @riogrande75 and others,

So I hooked this up - I poll the ET112 energy meter for the power (+ for in from supplier, - for exporting).  Convert that to ieee754 float and give that to the Infinisolar modbus card when it comes asking for Total System Power from the SDM630 that I’m emulating.

the result is that you can see the inverter trying to compensate for local usage - ie trying to get the total system power number to 0.

But on my system it does a really poor job - it gets to 0 or close, usually overshoots. Then seems to panic and pull back to no feed in, then gradually increases, get to 0 or close, and the cycle repeats and repeats.  I posted a graph in another thread.

Have you looked closely to see how well this regulation works on your system?  Since I feel like I must be doing something wrong - what I’m seeing surely can’t be normal? - only I can’t figure out what.

5 hours ago, Elbow said:

seems to panic

This really sounds like the issue we had with the EM24. There was  latency between the reading and the adjustment of the inverter. So the inverter backs off... notices that the feed-in is still too much (it isn't... the value lags behind so it is seeing an OLD value), pulls back some more repeat a few times, meter finally catches up, inverter now sees that it has pulled back too much, adjust upwards again, overshoots, repeat a few times until it stabilises. The fix was a low-pass filter.

49 minutes ago, plonkster said:

This really sounds like the issue we had with the EM24. There was  latency between the reading and the adjustment of the inverter. So the inverter backs off... notices that the feed-in is still too much (it isn't... the value lags behind so it is seeing an OLD value), pulls back some more repeat a few times, meter finally catches up, inverter now sees that it has pulled back too much, adjust upwards again, overshoots, repeat a few times until it stabilises. The fix was a low-pass filter.

Hi - thanks for the hint.

My code is getting the reading from the meter to the inverter with much less than a seconds lag - probably 100ms.

So if there is lag it is lag in the Et112. 

But I also have a CT feeding the power measurement into Emoncms and the readings are very close so it seems like the inverter itself is laggy.

But I'll try to smooth the readings out - ie low pass filter - and see if it improves the stability.

I also think I must just let it run for a day or two without fiddling and just see how it looks in a bigger picture. 

Thanks for the help! 

Edited by Elbow

1 minute ago, Elbow said:

So if there is lag it is lag in the Et112. 

Yes! That is the issue. The meter only updates its modbus registers every 500mS at most (and even less for some models). So your worst case could be more than a second.

6 hours ago, plonkster said:

Yes! That is the issue. The meter only updates its modbus registers every 500mS at most (and even less for some models). So your worst case could be more than a second.

So all I can control/fiddle is the watts reading that I pass to the inverter's modbus card.  That card actually tells the inverter how much power to feed in - based on some unknown algorithm.

You'll know better than me - but thinking aloud:

  • When grid power goes up (more power coming inbound) I need to increase the number being sent to the inverter, but slowly so it can increase power slowly.  I mustn't leave the inverter behind.  So there is your low pass filter.  I wonder how slow I have to go?  limit to 10W change per second would mean 5 minutes to ramp from 0 to 3000w.  50W per second gets it done in 1 minute.
  • When grid power goes down I think I need to follow more quickly, or even immediately.  Certainly this card seems to have no problem with suddenly reducing feed in.

I'll give this a try now.


@riogrande75 maybe will turn up and tell us about how the Voltronic modbus server controls the inverter as modbus master so that might help since I am cocky enough to think I can write it better.

 

29 minutes ago, Elbow said:

I wonder how slow I have to go?

Take a reading once a second. Feed in 60% of the error. Doing that will get you to the real power level after around a 5 second window.

21 hours ago, plonkster said:

Take a reading once a second. Feed in 60% of the error. Doing that will get you to the real power level after around a 5 second window.

Hi @plonkster

I implemented what you suggested.  Last night it still seemed to be see-sawing, but today the balancing seemed to work better.

Its hard to see for sure what is happening moment by moment but I logged lots of info and will analyse it to try to see.

In the house washing machine was going and iron (Monday is domestic-day).  Geyser of course.  Pool pump.

I think the iron is a challenge since with the thermostat it clicks on and off all the time.

Here's how the grid watts from the ET112 looked 6am to 6pm:

image.thumb.png.3d714b9b6430c20f2cd3f5c7d3b4bbe6.png

When things quietened down after 3:30 or so and the iron went off, and with the pool still running,  then:

image.thumb.png.f5570b4ab72eed4ea4183c5827c80e26.png

 

So that is the sort of thing we're looking for.

Zooming in at 16h05:

image.thumb.png.dc929c84d194fa8468548381d324d4a8.png

So its quite slow to reconverge - took 3 minutes to get there.  That's to increase feed in.  So the algorithm on the modbus card or in the inverter is quite slow to ramp up the feed in.

When it went the other way it went a bit quicker - 1.5 to 2 minutes:

image.thumb.png.7c9d76dbaa53a363580e8603c711c4b9.png

As you know in CT today kinda weird weather with fog and so on, so at times the PV output likely went up and down.

So better - I'll watch it now and see if I can find a way to further improve.

It gave me my best generation day with 14.1 kWh coming off the PV.

On the grid side so far I've taken 9kWh from COCT and bled 0.4kWh back to them which I guess they will charge me for too.

How does that compare to the mighty blue?

 

  • Author

I've installed 2x Infini 3k+ in parallel with modbus cards in the options slot (server mode) and a modbus server connected to a SDM630 power meter as suggested by voltronic. With a golden fingers "card" inbetween one inverter and his modbus card I was able to capture (serial) communication of the options slot. To see what's up on the modbus I used a USR-TCP-304  as a sniffer and logged everything with wireshark. This was runnning until last week, I captured gigabytes of data.
Now it's time to analyze this stuff. So far my investigations (any help very welcome):

QGPMP command: Query invertes max. grid power, in my case 3000 for infini 3k+. In fact, feedin allows 10% fluctuation, so 3300W.
LDPR command: controls the actual feedin power. LDPR+0250 means, inverter should deliver 250W more, LDPR-0050 deliver 50 watts less.
QDVPR command: Query inverters actual power values. Answer "(1902 3145 1398" means, 1902W actual delivery to grid, 3145W pv power and 1398W still available (1902+1398=3300W)
FDGL command: Sets invterts grid limits. That's what I'm currently working on. Don't really know whatfor it is...

Find attach analysis of "3 cycles" controlling feedin.
Tracing modbus with a rs485-eth converter does not work a 100%, but sufficient to grab enough data.

I see that there are smart guys in this forum, maybe someone can assist. I can deliver tracedata for a couple of days.
Especially traces from the nighttime, when battery drains and stops delivering when empty is quite interresting.
So pls. let me know, if I should post tracefiles here.

Tools used for decoding modbus messages:
http://modbus.rapidscada.net/
https://www.h-schmidt.net/FloatConverter/IEEE754.html

 

 

 

FeedIn3k.jpg

Edited by riogrande75

Hi @riogrande75

id be interested to look at the data and attempt to understand the beast.

On my side I want to make a little change in my distribution board so I can put a CT probe to measure the actual house consumption - with that and the energy meter reading I can know exactly how much power the inverter is feeding in.

My graphs seem to show that the machine ramps the power up and down quite slowly.  So some feed-in seems inevitable.

Luckily for me my meter just registers feed in as consumption. Other South Africans are so lucky and their meters have a very low theshold and go into "tamper mode".

 

12 hours ago, Elbow said:

On the grid side so far I've taken 9kWh from COCT and bled 0.4kWh back to them which I guess they will charge me for too. 

How does that compare to the mighty blue? 

On washing day I feed between 0.1 and 0.2kwh into the grid on those little back-feed slips. Totally okay with that 🙂

  • Author

@Elbow Well, getting actual feed-in power of the inverter can be read out with QDVPR command as stated above. But you might have to issue the command via then options-slot serial.

Regarding timings: You should be able to see whats going on, when having a look at the traces I made. You can download them here:

Modbus-server and card traces 040419

 

  • 3 years later...
On 2019/04/26 at 4:12 PM, Elbow said:

The other attempts to emulate the Eastron SDM630 meter so that when the Infinisolar modbus card polls "total system power" it will get the ET112 value in the register and the format that the SDM630 would give it.

Hi @Elbow this is very interesting. I'm trying to emulate the Easton SDM230 and I'm struggling with where to start. Would it be possible to share your code that emulates the SDM630 so that I could modify it for me needs? I plan to feed my Growatt 3600 TL-XE inverter with doctored grid export data to control its output generation.

2 hours ago, riogrande75 said:

I created this script powerctrl.php, to emulate the SDM630. All queries from a modbus-card in the infini inverter get answered correctly, total system power is read from a shared memory object that gets filled from this script.

Adapting it for a SDM230 should be a simple task.

Thank you @riogrande75 I've never used PHP before, I'm an amateur coder at best, but your code looks very readable.

I don't actually have an SDM230 but I found this PDF which references the input registers that I believe is what I need to emulate.

Would it be possible to share a sample output from your sdm630poller script?

From what I have read elsewhere, my Growatt inverter only reads 2 or 3 of the registers from the SMD230, so I was planning to hard code most of the other values with reasonable defaults, and only change the ones that I need in order to limit export power from the inverter.

image.thumb.png.d003ec4df47782a12eec45a06fb92343.png

 

  • 2 years later...

Gents,

I have a Voltacon ESS 5.5KW Inverter with a Modbus card and at present commissioning the system. I have tested the SDM630V2 (locally wired to a heater) and all seems fine - inverter providing power when load applied. The inverter is communicating with the energy meter and communicating with the inverter/watch power software. The problem I have is, I have very little room between the supply meter, isolation and DB boards to physically fit a SDM630V2 within the house distribution cupboard. I have purchased a SDM230V2 following reviewing both protocols however although the unit is communicating with the inverter (telephone symbol), no information is received by the inverter. Therefore when load is applied no reaction form inverter. I assume as this is a single-phase unit the SDM230V2 energy meter would be compatible with the Voltacon inverter however Voltronic/Iconica/Mpp solar inverters/Axpert all indicate a SDM630V2 to be used. Seems somewhat odd that all the single phase inverters are only compatiable with the 3 phase enery meter.

  • Author

SDM230 has different registers than the SDM630. This is the reason, it will never work.
 

Usually most inverters query register 30053 for total power (here SDM630):

image.png.49e6e043aab0c837a0d24a5329e888b5.png

Here layout of SDM230's registers:
image.png.9906aaa5b68e49f441ef8ccbd8aa8b76.png

These are not compatible.

 

Thank you, most appreciated, ill have to make the SDM630 meter fit (maybe in the fuseboard

I still think its somewhat odd, assume both would have the same address for total wattage.

Edited by alan_1969uk

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.