Jump to content

Infini 3k/3k+ compensation mode without Modbus


riogrande75

Recommended Posts

I just started reverse-engineering the protocol of the Infini compensation mode on my MPI 3k+ model.
My goal is, that the modbus card gets completely obsolete and the inverter gets controlled by a programm via serial/usb port. It should also be possible to use different powermeters, not just the SDM630 (modbus) suggested by Voltronic.
I sniffed the serial commands that get exchanged between the modbusII-card and the inverter (YES, the slot for the optional card is basically just a extra serial port!).

So far I found the following commands (and also what I guess they mean):
>>>> LDPR-00120                                    // 120W (solar power) are still delivered to grid, no compensation necessary
<<<< (ACK9                                              // Acknowledge from inverter
>>>> FDGL3000 2700                              // As long is no compensation is necessary, always 3000 2700
<<<< (ACK9
....
>>>> QGPMP                                           //Every 10 commands, this query command gets issued. I guess it's unimportant due to the static value answered by the inverter
<<<< (03000uò
...
>>>> LDPR+01559                                   // 1559W get imported from grid to fulfil power consumption of my house =>Try to deliver 1599w from battery
<<<< (ACK9
>>>> FDGL3000 0000                             // Now the value 2700 got 0000, no clue so far, what it means exactly.
<<<< (ACK9

Did anyone work on this topic already? Any ideas what the FDGL command means? I also got infos, how this works on a 10k (command EMINFO).

Link to comment
Share on other sites

On 15/09/2016 at 5:37 PM, riogrande75 said:


>>>> FDGL3000 0000                             // Now the value 2700 got 0000, no clue so far, what it means exactly.
<<<< (ACK9

Did anyone work on this topic already? 

I have some Infini firmwares, but they don't seem to be the same as what you guys are running. So I can't help much.These commands come from a power meter via a Modbus card, right? It seems to me that you would not want much "intelligence" in that card; better to make all the important decisions in the main firmware. So I would expect the commands to be not very much more than a translation of the measurements. The LDPR commands seem to be a measurement in watts of the net imported power (utility to house is positive).

I can't see how this card can figure out how much total battery power is needed, since it is presumably only making one power measurement (is that right?). So I suspect it is saying back off the power by 120 W in one case, and increase the battery supplied power by 1559 W in the other. So the + and - may indicate increase and decrease respectively, rather than a power flow direction (edit: and an absolute suggested power). [ edit: removed sentence about amounting to the same thing if aiming for zero export. ]

Is it aiming for zero export? If so, your guess for the 120 W case seems wrong. I can't see how the modbus card would see the PV power either.

An interesting problem. It's disappointing that Voltronic choose not to publish these commands, but perhaps they fear that Joe Average would get this wrong, and end up with net exports from batteries, which seems to be a big nono. So maybe Voltronic are expected to never allow net export. Perhaps their getting certified depends on this, so they feel they can't allow customers to have control of net exported power. If so, I wonder how Voltronic but also the regulators would view this. I think that as long as they pay less for exported power than they charge for imported power, then there is no possibility of "gaming the system", which is presumably the reason for the nono.

Link to comment
Share on other sites

On 18.9.2016 at 1:25 AM, Coulomb said:

These commands come from a power meter via a Modbus card, right?

Yes. It is the official modbusII card from voltronic.

Quote

So I would expect the commands to be not very much more than a translation of the measurements.

Yes, also my opinion.

The first comands after bootup of the card/inverter are QPI (query protocol). According to the reply from the inverter (PI15/PI16/PI17) the modbus card knows, what protocol to use, in fact what commands have to be sent to the inverter. I just know, that PI17 (Infini10k) uses ^PxxxEMINFO commands, PI16 (3k+) works with LDPR and FDGL.

Quote

Is it aiming for zero export?

Actually my/the goal is to minimize import. I want my house to run as good as possible from pv generated energy. For me, this is the compensation mode for. Maybe in your area, requirements are different.

Quote

So maybe Voltronic are expected to never allow net export

As mentioned: No, I am convinced that the the aim is zero import. This is what I gather from the cards manual, too.

Quote

If so, your guess for the 120 W case seems wrong. I can't see how the modbus card would see the PV power either.

I can't follow you. LDPR-0120 means, my powermeter (at the grid connection point) measures a 120W delivery to grid. The inverter itself knows, that the currently delivered power (e.g. 500W pv power) is ok. Batteries are at 100%, all of the power can be delivered to grid according to my setup (SolarPower).

After a while I turned on some elect. consumers (oven, a lot a lights,...), the powermeter measures a import of 1559 watts (LDPR+01559). Now the inverter has to deliver more power to fulfil "zero import", It starts discharging the batteries. According to the inverters reply of the QGPMP command, all together must not exceed 3000 watts (in my case). This answers also your assumption:

Quote

better to make all the important decisions in the main firmware.

 

 
 
Link to comment
Share on other sites

On 18.9.2016 at 7:32 AM, TinkerBoy said:

Why do you want to remove the card?

1st reason: To save costs. The card itself is more then 100€ here in europe. The SDM630modbus has to be bought as well (100$?).

2nd: To use the powermeter I like / I got installed by my grid operator. I can use the measurements for my loggers etc. as well.

3rd (maybe not the idea of voltronic): I have full control of the output and can deside whenever I discharge my *expensive* batteries. So I have also in my hand, to react when the price model of my operator changes.

I guess this are enough reasons to reverse-engineer this "secret" commands. And it just makes fun to know almost everything of this cool inverter :D

Link to comment
Share on other sites

That setup sounds a lot like the Victron Hub-4 setup. With Lithium Ion batteries, they do exactly the same: Aim to keep the import as low as possible even if it means discharging the battery. When the battery becomes too low, switch to bypass. They also use a (rather expensive) ModBus-based AC sensor, the Carlo Gavazzi EM-24 (63 ampere 3 phase) unit, but I have a feeling using the SDM630 unit might also work with a little bit of effort (the cgwacs code is open source, so in theory anyone can integrate it). I understand your use case: Make it cheaper, eliminate the expensive components, make an end-user package that is more affordable.

The SDM630 is more like 40USD if I recall, on aliexpress. The Carlo Gavazzi meter is 200 Euro. So you're sort of already where I can only DREAM to get to :-)

I have a dream: That you can install a small solar PV system that will eliminate daytime baseline, optionally power some loads at night, provide backup for essential appliances, and to do this for around 50k ZAR or around 3500 Euro. Slowly but surely we're getting there :-)

Link to comment
Share on other sites

  • 1 month later...

Hi netdair,

this is the pinout I got in a german forum, where you are active as well :-)

I tested it out and it works perfect. Its basically a RS232 port (RS232 - 2400/8/N/1), just like the one next to it (where you are able to connect you PC with SolarPower).

Regarding the 10kW model (PI17): There I have more detailed info already.

 

 

OptionalSlotPinout.jpg

Link to comment
Share on other sites

  • 11 months later...

Just to let interrested people know: Simply the LDPR command via the (normal) serial port (or USB) does the trick!

In the meantime I installed a second MPI3k+ inverter without optional modbus card. I take the measured values from my powermeter (modbus: "total system power") and send it to the inverter with the LDPR+/-xxxx command.

So voltronic inverters can do power consumption mode without expensive modbus card - just in software.

@Manie/AICC developers: Maybe a function that could be helpful for your customers?

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
On 2017/11/02 at 9:20 AM, riogrande75 said:

Just to let interrested people know: Simply the LDPR command via the (normal) serial port (or USB) does the trick!

In the meantime I installed a second MPI3k+ inverter without optional modbus card. I take the measured values from my powermeter (modbus: "total system power") and send it to the inverter with the LDPR+/-xxxx command.

So voltronic inverters can do power consumption mode without expensive modbus card - just in software.

@Manie/AICC developers: Maybe a function that could be helpful for your customers?

Hi @riogrande75 or others,

Apologies to pick up an old thread, but I'm keen to similarly drive my Infinisolar feed back setting from my own software.

But I can't get my LDPR commands to get a response when I send them on the USB port.

Do you have some sample code to look at?

Thanks,
@Elbow

Link to comment
Share on other sites

Hi!

Here some sample code, workin for me:

function ldpr() {
global $sh_sdm6301, $debug, $fp;
        //read shared memory
        $totalsystempower =   shmop_read($sh_sdm6301, 18, 6);
        if($debug) logging("TotalSystemPower: $totalsystempower");
        $sendcommand = sprintf("LDPR%+06.0f\r", $totalsystempower);
        if($debug) logging("Sende: $sendcommand");
        // Send power control command to inverter
        fwrite($fp, $sendcommand);
        $byte=fgets($fp,8);
        if(dechex(ord(substr($byte,0,4)))=="(ACK")
        {
                if($debug) logging("Answer OK!!!");
        }
        $antwort=substr($byte,0,4);
}

 

Link to comment
Share on other sites

1 hour ago, riogrande75 said:

Hi!

Here some sample code, workin for me:


function ldpr() {
global $sh_sdm6301, $debug, $fp;
        //read shared memory
        $totalsystempower =   shmop_read($sh_sdm6301, 18, 6);
        if($debug) logging("TotalSystemPower: $totalsystempower");
        $sendcommand = sprintf("LDPR%+06.0f\r", $totalsystempower);
        if($debug) logging("Sende: $sendcommand");
        // Send power control command to inverter
        fwrite($fp, $sendcommand);
        $byte=fgets($fp,8);
        if(dechex(ord(substr($byte,0,4)))=="(ACK")
        {
                if($debug) logging("Answer OK!!!");
        }
        $antwort=substr($byte,0,4);
}

 

Hi @riogrande75 ,

I saw this code on the German Photovoltaikforum, having read through all the relevant threads there as best I can with limited German and the help of Google translate.

Code like this doesn’t get any response when I send LDRP+00100 (for example) on the USB port via /dev/hidraw0.  I can issue other queries fine using the same code (QPI, QVFW, QPIGS etc).

My inverter is branded Renesola Replus IH3KW-48-V and really is unsupported by Renesola.  And I never get response to my queries to Voltronic.

I know from that German forum that you reverse engineered the modbus card by listening to what it does over the serial port that connects on the edge connector.  Nice work.

But I do also see there many people who can’t make it work.  (Of course there can be many reasons for that).

I was talking to @Coulomb and he pointed out that there are two processors inside the Infinisolar and that maybe the serial port on the intelligent socket connector actually goes to the “other” processor compared to the main RS232 and USB ports.  And its the “other” processor that implements LDPR.  Or maybe its just a security feature that its only accepted on the port in the intelligent slot?

So which port are you using to issue the LDPR command?

I was hoping to use the USB port since it is already connected up so as to get data from the inverter.

I do have a Modbus card so if I can’t figure it out I guess the next thing is to fit it and emulate the energy meter - responding to the queries from the modbus card.

Thanks!

Link to comment
Share on other sites

38 minutes ago, riogrande75 said:

Hi!
Maybe it's not a Infini 3k inverter.

Can you send pics and a few minutes of solarpower debug (right mous button on taskbar icon). Whole directory, then I can tell which inverter it is exactly.

 

If its not its a pretty convincing clone.

But here you go:

solarpower-debug.zip

File from iOS

File from iOS (2)

File from iOS (3)File from iOS (4)

Thanks,
Elbow

Link to comment
Share on other sites

29 minutes ago, riogrande75 said:

ok, just had a look at it. Seems to be a classic 3k infini hybrid inverter. Didn't know that 2016 they still built it in 3k only, not plus (4500W PV).

I assume that it is not set up correct. Did you choose mode "Grid Tie with backup (II)"?

Hi,

Yes, it is in Grid Tie with backup (II) mode.

It is set to allow feed in to grid.

I have the factory password; when I set the maximum power to feed in using Solar Power then the inverter does indeed feed that amount back.  I can see that using the output of QPIGS and also in the nett grid connection power measured by Openenergymonitor.

Here is a chart for today - the yellow is watts on the Grid side of the inverter.  I set the maximum to feed in to 600W which is what the inverter did as soon as there was enough excess power over charging the batteries.

image.thumb.png.399e2dcaf7bf1c197b6b43b05613f951.png

So the inverter will feed in power.  I suppose I could just control is by continuously resetting the maximum, but I doubt its very responsive and don't want to wear out the flash.

Can you confirm that on your unit the LDPR works on the RS232 or USB ports?  Do you have a newer model?  Maybe mine just doesn't have the support (though the documentation describes the Modbus card and what it does).

Thanks,
@Elbow

 

 

Edited by Elbow
Link to comment
Share on other sites

Set the maximum again to 3000W, your setting is just limiting power.

LDPR command works fine via serial port and as far as I know, the serial port is internally shared with a simple serial USB converter. So you use either serial OR usb. In fact it's the same port, because I can see messages on the serial port when solarpower works via USB.

Can you run a simple "QPI" and "I" command? What are the answers?

If you run LDPR+02000 what is the answer? Any reply to FDGL3000 0000 command?

I am pretty sure, if your inverter has a options slot, it will support that.

Link to comment
Share on other sites

HI,

7 hours ago, riogrande75 said:

Set the maximum again to 3000W, your setting is just limiting power.

I can't do that without the external control.  My electricity provider's meter is not designed for two way power flow and actually charges me if I push power back.  IE for every kWh I push to them they charge me as if they had supplied it to me.  So I set my feed in very low at a figure that I know is always less than my standing consumption in the house.

7 hours ago, riogrande75 said:

LDPR command works fine via serial port and as far as I know, the serial port is internally shared with a simple serial USB converter. So you use either serial OR usb. In fact it's the same port, because I can see messages on the serial port when solarpower works via USB.

There are three interfaces in total through which commands can be issued, right:

  1. The physical DB9 RS232 port
  2. The USB port - I am sure you are right that this is the same serial port via a USB interface chip
  3. The serial port that is on the edge connector socket on the "intelligent slot".

I don't see how number (3) can be the same physical port in the end since if it were it would be impossible to use the physical RS232 or USB port if you had a card in the intelligent slot since the modbus card, at least, is continuously chattering on the serial port in the intelligent slot.

Can you confirm though that on your machine you can issue LDPR and FDGL commands on the USB?

Since I cannot:

root@raspberrypi:/home/pi/inverter/hassio-axpert# python ./monitor.py
Command? QPI
>> 5150490d0a
<< (PI16��
QPI: PI16
Command? I
>> 490d0a
<< (DSP:16-03-21,15:00 MCU:16-03-21,15:00dX
I: DSP:16-03-21,15:00 MCU:16-03-21,15:00
Command? FDGL3000 0000
>> 4644474c3330303020303030300d0a
error reading inverter...: [Errno 110] Connection timed out
Command? LDPR+02000
>> 4c4450522b30323030300d0a
error reading inverter...: [Errno 110] Connection timed out
Command? 

Thanks

Link to comment
Share on other sites

Hi!
No, I cannot confirm that LDPR is working via USB. I don't have USB connection to the inverter and I am working with linux and PHP (no HID support).

BUT because it is working via serial (DB9 port), I know it would work via USB too. The intelligent slot is definetly another serial port, that should work in parallel (and does).

You don't have anything plugged into the options slot, correct?

Your firmware is 2 years "younger" than the software running on my inverters. I could imagine, that some commands are blocked somehow now via serial1/usb.

What about the QDVPR command? Do you get any response on this?

Link to comment
Share on other sites

5 hours ago, riogrande75 said:

Hi!
No, I cannot confirm that LDPR is working via USB. I don't have USB connection to the inverter and I am working with linux and PHP (no HID support).

BUT because it is working via serial (DB9 port), I know it would work via USB too. The intelligent slot is definetly another serial port, that should work in parallel (and does).

You don't have anything plugged into the options slot, correct?

Your firmware is 2 years "younger" than the software running on my inverters. I could imagine, that some commands are blocked somehow now via serial1/usb.

What about the QDVPR command? Do you get any response on this?

OK - I tried accessing the inverter on the physical RS232 port but couldn't get a response.  Perhaps I need a null modem connector or I didn't get my stty setup right.

I don't have anything in the options slot.

QDVPR gives a reply (what does it mean?)

root@raspberrypi:/home/pi/inverter/hassio-axpert# python ./monitor.py
Command? QDVPR
>> 51445650520d
<< (0062 1372 3238h�
QDVPR: 0062 1372 3238

Thanks,

Link to comment
Share on other sites

If you have nothing connected to USB, serial 2400/8/N/1 should work. I guess you need a nullmodem cable. But I'm afraid it will not be different to USB.

Interresting that QDVPR is working, LDPR and FDGL not...

QDVPR is actually inluding infos for the modbus server (if you have x devices in parallel).

(0062 1372 3238h�

62 Watts actual delivery to grid | 1372 W actual pv-power  | 3238 W more available for feedin

Your device is capable of max. 3238 + 62 = 3300 Watts feedin power. Dunno why 3300 and not 3000, but with my devices it's the same.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...