Universal Solar Inverter over Modbus RS485 / TCP custom_component (AlphaESS, Growatt, Sofar, SolaX, Solinteg, Solis, SRNE, Swatten, TIGO TSI & Qcells Q.Volt Hyb)

Hi Mark. That sounds good, When you setup the battery to behave for each half hour slot is that a manual setting that you do each day or is it automated somehow ?. Do you try to charge your battery on the cheapest Agile rate for the day?, not that there are any really cheap slots at the moment

image

My current setup
2 x SK-SU5000E controled via modbus and HA

Based on the Agile price (updated daily automatically) and a p/KWh value I set, my Inverters will either charge for the set time slot under the p/kWh or discharge the batteries to a minimum DOD%

The DOD% is also changed based on the Agile pricing (or manually) so if its below 9p then they will be up at 90%, 9-14p will be at 50% and peak or high will be 20%

If for whatever reason its at 20% and the sun is producing enough solar the normal inverter process kicks in and will send excess to the battery

All this is automated in HA

1 Like

Hi Ben
Battery control is automated. I have a default template that will ensure the battery is fully charged before the Agile peak rate starts at 16:00. Then for my ‘Winter Mode’ it will select the cheapest 3 hours overnight to charge the battery and then set discharge to 0 amps until 16:00. Summer mode will charge the battery whenever the cost for electricity is less than the SEG rate but allows discharge during the day.

The system has been in for almost a year and so far the average price of the electricity that I have had to purchase during the day has been 11.5p pKwh and 8.4 pKwh that has been used to charge the battery from the grid.
Regards Mark

Hi Mark
@mshdean
Thank you for the rundown, Your setup sounds very similar to mine although a lot more automated. I had been on Agile Fixed so it did not matter when I charged my battery (between 00:30 and 04:30 at 5p/kWh) and I only need 70% charge to get me through the afternoon peak rate.
I am struggling more now that I have moved to Agile variable, there does not seem to be enough cheap slots to make it worthwhile and I have been manually setting the inverter to charge at the cheapest time, a few days ago the afternoon was cheaper than the small hours.
I imagine that your 8.4p/kWh is slowly rising now with these higher rates.
Would you let me import your flow and maybe I can get some good tips on automating my flow, Don’t worry at all if you would rather not share it.

Hi Mr P
Sounds like a good system and looks good to. Thanks for the information. Its great to see what can be done with HA. I have a lot of home automation going on and find it so much easier with Node Red to control and create new automations, ( I have tried HA in the past but found it very difficult, probably just me). Saying that I have found a lot of good info on this forum

1 Like

Hi Ben

My Flows/Code are more proof of concept at this time and I would be embarrassed to put them in the public domain at the moment. I am planning a rewrite at some point after which I would happily share them but don’t have the time at the moment. I don’t think there is a way to ‘private message’ on this forum - if there is I would send a few extracts from the jumble that I currently have.
Mark

Hi Mark. That is no problem at all, sounds much like a lot of my stuff, I have shared some of my flows on the Octopus forum and I wonder if any body will ever understand them. I am just working on a flow to control the force charge Stop and Start periods, You can get the set data from the inverter using 5.8.8.8: /?optType=ReadSetData&pwd=admin& HTTP/1.1". I have only mapped out the data fields for the Period 1 and 2 Start and Stop times. Maybe you have more information on the json array. Its been great to talk to another Solax inverter person.
Ben.

wills106, I’ve noticed on your github you’ve tried a few different scan_intervals on the modbus sensors, looks like you’ve switched to 5 seconds lately, can you explain why? Does something happen if you try read every second for example?

Some people have issues reading quicker than 5s. When they try and write a register it can miss seeing the command. It’s probably down to the older method of reading each register one by one. Now reading them in groups reduces the traffic alot.

I normally normally keep mine at 2s intervals.

Thanks for the insight, I’ll try quicker rates as I don’t write registers. FYI there was a change to the modbus sensor that requires the yaml to change.

Yea I have seen the change and I am on 2021.4.0

Personally I don’t see the point in the change?

Surely it’s going to make things more difficult if you have ModBus sensors split over multiple “packages” but using the same ModBus “hub”

I have turned on “Discussions” for my GitHub.
Thought it might be handy to discuss SolaX, Solar forecasting using Solcast, battery control…
Or just general chat about my setup etc.

Link https://github.com/wills106/homeassistant-config/discussions

2 Likes

@wills106

Hi Will,

I posted a question on your personal github page, but had no reply so far. So I repeat it here:
Would very much appreciate your help.
I have a new X3 Hybrid 10 kW with 3 x 5.8 kWh Solax Triple Power batteries.
Here in Flanders we will be charged extra when we have a high power consumption, called “capacity tariff”. The distributor measures the consumption per 15 minutes and takes the highest peak of a month to calculate the distribution costs.
To be able to limit power consumption peaks when the battery is empty, I can switch from 12 % min charge to 10 % min charge by writing to holding register 32. So the remaining 2 % become available to the house, lowering the current 15 minute peak value.
However, when the inverter is in “Idle Mode” it takes more than a minute before it starts producing (first performs a 1 minute self check).
Do you know a way to speed up this process? Some register to wake the inverter instantly? Or a way to prevent it from going into “idle mode”?
Also, do you know if the inverter automatically starts charging the battery from the grid if I have used the 2 % and switch the low limit back to 12 %? The operation mode is “Self Use”

Thanks in advance
JP

I have responded on GitHub, I kept meaning to reply but I forgot sorry.

Hi all,

I have a Solax X3 9.0 T D, which is equipped with an RJ45 connector on the “RS485/Meter” port. I tried connecting using a USB-to-RS485 dongle, using the blue wire as A and the blue-white wire as B, however I get no reply from the inverter (0 bytes received, says pymodbus). My questions:

  1. Is the wiring correct? I used the setup described under “Meter” in the manual, but I’m not sure it’s correct and can’t find info on other types of wiring.
  2. Does the interface somehow need to be enabled in the menus of the X3? If so, I have no control over that, it seems.

Thanks,

Bart

Does anyone know what Solax Hybrid X3 run mode ‘11’ means? 2 = normal, 9 = idle, but what is 11?

I made some progress on this using indeed pins 4 and 5 for RS485 comms and lowering the baud rate, but now I get an error that the register addresses are illegal, even though I am using the same numbers as in the X3 yaml config. I am using a USB-to-RS485 dongle with the ch341 chip: Products | Joy-IT

EDIT: This is solved now, see Add support for RS485 Solax X3 by barche ¡ Pull Request #16 ¡ InfernoEmbedded/PowerScraper ¡ GitHub

I think it’s “PV Wake Up Bat” ( source: PV SolaX inverter cloud sensors via API )

@Bart,

thank you for the link. I have been playing around with the “grid tied limit” and noticed that the run mode 11 came on when the battery was on the low limit of 10 %, so “battery awaken” sounds logical.

1 Like

Hi, I am currently using the solax pocket wifi 2 usb dongle to get the data off my solax inverter, which is not ideal as I have had to set up a dns server to redirect dns request for www.eu.solaxcloud.com and mqtt01/mqtt02.solaxcloud.com to my raspberry pi AP/HA setup, and I then read the mqtt data in HA.

I have also used the curl command, which was more reliable than mqtt, but more work to get it to working within HA.
With mqtt the inverting does reqsynctime and then waits for a respsynctime from solaxcloud, and then sends a Synctime mqtt message when its sync’ed. Because there is no response from my mqtt broker for reqsynctime it sometimes goes off line/hangs with no mqtt messages - this can be for minutes or sometimes hours and then the inverter starts sending data again.

I have found this doc with pocket wifi teardown:
https://fccid.io/2AMEH-POCKETWIFI/Internal-Photos/Internal-Photos-3499969

This is the wifi module they are using:

https://en.mxchip.com/productinfo/244895.html

Has anyone tried to make there own dongle with tasmota to get the data off, then send over mqtt.
Basically I am wanting to have a setup like a sonoff switch with tasmota, easy to configure and use with HA.

I am on my 3rd pocket wifi, one was replaced when the invert failed a few months after install, and a second one failed after a couple of years use - both replaced under warranty which was good except for the 2 weeks wait for replacement to arrive, so looking for something more reliable.

I am wondering if I could use the USB port for power/data to an ESP8266 module, or use a RS485 module to serial UART and connect that to a ESP8266 WIFI with tasmota on it.

Something like this dutch guy has done with his energy meters:
https://diytechandrepairs.nu/esp8266-to-monitor-electricity-with-sdm-devices-and-send-to-mqtt/