nygma2004 / growatt2mqtt

Growatt Solar Inverter Modbus Data to MQTT Gateway
MIT License
136 stars 33 forks source link

Growatt to Victron OS Communication #13

Open MichaelRayHam opened 1 year ago

MichaelRayHam commented 1 year ago

Here’s some information on my communications configuration: My battery is managed by a Batrium of which is monitoring 8 separate batteries via the Batrium system. The Batrium is communication with my Victron Cerbo GX and is throttling and controlling my charge controllers (Victron) and it is working perfectly, no issues. I am able to see the Growatt inverter output using Energy Meters which are connected to the Cerbo GX, no issues. I am also able to see my AC input into the Growatt inverters should the situation call for grid input. I am again using Energy Meters to communication this information to the Cerbo GX, no issues. The information I need to send back to my Growatt is the State of Charge of the battery. The reason I need the Growatts to see the SOC of the battery is to switch from battery to grid should I drop below a State of Charge percentage that I determine. I would also like the Cerbo GX to be able to show the status of the inverters such as On/Off position, errors, ect. I have two Growatt SPF 12000T DVM inverters running two separate AC load banks Any way this can be done?

nygma2004 commented 1 year ago

That is an interesting setup. I am pretty sure it can be done. I mean I have used the same hardware to update a modbus master so it would work pretty much the same way for this Growatt inverter as well. On a different issue (here on Github), I was talking guy who has SPF5000 and has the modbus documentation for it. I can only guess that your SPF12000 has the same modbus register mapping as the SPF5000. But still one would need to figure out where the SOC is stored, so what needs to be updated. And of course I would have no way of testing if it works...

MichaelRayHam commented 1 year ago

I was able to confirm that the SPF12000 has the same modbus register mapping as the SPF5000. I have an SPF5000 that I could send you for testing if you are interested in the project.

nygma2004 commented 1 year ago

It sounds like an interesting project. You would just send me an inverter for this? Let me do a little bit more digging, because I have one doubt: I am not sure if the inverter is designed to receive the state of charge from outside. I mean probably it has a built in chip to measure the DC voltage and from that work out the state of charge. And that modbus register may not be designed to be updated from the outside. This SPF series is designed to handle lead acid and also lithium batteries, is there any reason why you manage the batteries separately?

MichaelRayHam commented 1 year ago

Do you reside in the US? If so, I would be willing to send you the unit for testing and helping with the project. Do you have access to a device that has Venus OS installed? That would be part of the equation of course.

I have 8 batteries in parallel with plans to continue to expand the capacity of the bank. Each bank is a 16 304 Ah LiFePo4 cells connected in series. I use the Batrium as the battery management system that monitors each cell independently, balancing and monitoring cell heath. It also has as the ability to trigger relays based on State of Charge. The Batrium has its own shunt and measures energy in and out of the battery, the only true way to know the state of charge for the LiFePo4 battery chemistry due to the flat voltage curve which is the nature of the chemistry. Voltage does not determine SOC for this chemistry. These are the main reasons for the use of the Batrium.

@. Michael Ham | Sr. Project Manager - Estimator 11370 State Highway 30 | College Station, TX 77845 v. 979.776.2135 f. 979.776.2235 m. 979.777.7865 @*.**@*.***> | www.rmdudleyconstruction.comhttp://www.rmdudleyconstruction.com/

From: nygma2004 @.> Sent: Friday, November 4, 2022 3:27 AM To: nygma2004/growatt2mqtt @.> Cc: Michael Ham @.>; Author @.> Subject: Re: [nygma2004/growatt2mqtt] Growatt to Victron OS Communication (Issue #13)

It sounds like an interesting project. You would just send me an inverter for this? Let me do a little bit more digging, because I have one doubt: I am not sure if the inverter is designed to receive the state of charge from outside. I mean probably it has a built in chip to measure the DC voltage and from that work out the state of charge. And that modbus register may not be designed to be updated from the outside. This SPF series is designed to handle lead acid and also lithium batteries, is there any reason why you manage the batteries separately?

— Reply to this email directly, view it on GitHubhttps://github.com/nygma2004/growatt2mqtt/issues/13#issuecomment-1303111165, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3TFQERE7NYD4VIXEUIIJQDWGTCFHANCNFSM6AAAAAARUTGYIM. You are receiving this because you authored the thread.Message ID: @.**@.>>

nygma2004 commented 1 year ago

I am in Europe. So definitely not close. Thanks for explaining the Batrium in the solution. It sounds like a serious battery system, so definitely worth protecting it properly. But I assume the battery positive and negative is connected to Growatt inverter so it manages the charge and discharge periods. And it does calculate a SOC, but you would rather overwrite that with the actual SOC coming from the Batrium.

I looked at the documentation and there is a single Battery SOC register (which is input register 18). And the documentation says in Chinese English: (Some of input Registers can be wrote by Manufacturer, write address offset is 0x1000, start at 0x1000. can not be wrote by customer.) I does worth a try, but to be honest I don't think the inverter will accept updating the Battery SOC register externally. But after all you should be able to test it as well with a USB to RS485 converter and some modbus software.