For those of you who are using the battery control feature, I noticed a problem recently and just published a fix which will improve your PV generation when the battery is full.
There is also a fix which renames the confusing ‘Feedin Power’ and ‘Grid Power’ to ‘Measured Power’ & ‘Inverter Power’.
The problem described is a result of the built in power management in the inverter reserving the requested amount of power for the battery, whether the battery is charging or not. The fix is to set the battery power to 0 once charged, which frees additional power for the inverter to feed to the grid.
Thanks a lot Alastair! I am getting Solax X3-HYBRID-10.0T soon. Do you expect the Scraper being compatible with that one as well? If not, may I ask who/where at Solax you did ask for the list of Modbus registers? Best regards, Ian
Hello Alastair, the battery control script is writing to inverter registries. Couldn’t there be an issue with wear flash/eeprom cycles? At least the battery minimum charge registry seems to me to be configuration kind of registry and therefore persistent type one.
I likely did not understand correctly to something. The script SolaxBatteryControl.py does have 3 calls client.write_register(), that I understood are writing to Solax Modbus registers. That was source of my question. Whether those registers, written by the script, couldn’t wear off eventually in case that they are configuration, flash/eeprom types. So the script does not call those functions daily? I thought that the minimum charge manipulation is used for regular daily control.
The modbus registers are not necessarily backed by real hardware registers. The registers that I write to (written every poll_period, I use 0.5secs is my setup) are the external control registers that tell the battery charge/discharge unit how much power to draw/provide. They are explicitly marked for external control.
I don’t touch the limits at all. The limits in my script are implemented by clamping the charge/discharge power to 0 when those limits are met.
I see! the “explicitly marked for external control” is the answer. Thanks for clarification. Now if I only can get the modbus manual for my inverter. I had asked the official Solax support and only got “official” Solax answer, exact citation: “we onlu open it to the big ditributer who really need it. I am sorry we don’t provide it to end user.” Don’t you have any better contact who I could try to ask for Modbus register list? I am of course ready to sign their NDA if needed. Best, Ian
My local Solax engineer was quite helpful (you won’t get anywhere with the Chinese staff), and provided the read-only register set. He’s left now though.
You might be able to get write register set on signing an NDA, that would be up to the engineer to discuss. I didn’t go down this path.
Came across this thread while trying to solve a problem I have. I have a controller system and when it switches my cars on to charge during cheap rate (at night) the Solax tries to feed it and uses up all my battery stores so that there is nothing left for the morning. What I want to do is tell my Solax not to discharge the battery when I turn on the cars to charge and then afterwards switch it back to doing it’s normal thing. I figured that if I send the setchargerpower (write to 0x51) 0 then it will not discharge the battery. How would I switch it back to doing it’s own thing once I’m done? Is there a magic value, or does the inverter need to be in a specific work mode for this to work? Any advice much appreciated.
Hi folks. I’m new to OEM and am looking to get data from my SolaX X1-hybrid G3 into emoncms. Eventually I plan to get a RPI to run this on, but for now, can I run this script on my Mac using python? Inverter is connected both wired and Wi-fi but I have the latest firmware where the api is locked down. Port 502 still open though. I’ve no idea where to start though. Help would be most appreciated. Thanks!
This script should work on a Mac (but I haven’t tested it).
I presume when you are talking about API changes, you mean the cloud API? This script doesn’t use that. It speaks directly to the inverter via Modbus on the ethernet port.
You’ll need the installer password for your inverter of you want to drive the battery management from the script, otherwise you can only read values. Some careful googling will get you the password.
Thanks Alastair. I have the installer password already. Whereabouts do I tell the script the IP address of the inverter’s Ethernet port? Mine is connected to my network. Do you directly connect?
@Wulfee The inverter needs to be in remote control mode to do that. That does mean that you will need my script (or similar) to micromanage the battery charging when you’re not forcing it to 0.
Having said that, surely the situation you describe is a good situation, the power stored in your batteries should be cheaper than off-peak grid power. If you use my script, you can reserve some power during the off-peak time to get you through the next peak period until your panels start producing again.
Thanks for your reply, figured it out in the end. I had tried this some years back but couldn’t get the unit to accept commands. Didn’t realise back then that you needed to set the password first before it would do anything. I’ve got it to switch off now by putting it in remote control mode and setting power output to 0. I’ve also been playing with getting it to charge from grid with limited success. There is no mention of the 0x92 register I see you using in your script in my modbus manual.
@deece Thanks for that. I have got python installed on my Mac and managed to pip the necessary modules into a virtual env. Can your script post to emoncms.org cloud service, as I don’t have a local installation yet. I’ve entered the server and api key into the config.toml file but when I run the script it says “Setting up EmonCMS” and then I get “not connected.” I still can’t see anywhere in the config file for me to enter the IP address of my inverter’s ethernet interface - where do I need to enter this? Thanks again.