diy solar

diy solar

Warning: SofarSolar firmware 4.20 breaks Zero Export feature (TL-G3 series at least)

fgerin

New Member
Joined
Jul 5, 2022
Messages
48
Location
Belgium, Europe
Just for your information, I upgraded my Sofar inverter's firmware from V3.30 to V4.20 in the hope they finally fixed one of the bugs related to Zero Export.
The upgrade process went just fine. But the Zero Export feature is now completely broken, the inverter does not produce anymore, keeping in "Reflux derating" forever.
=> Killing an important feature on firmware update... Probably the best publicity they can do for themselves!

Since they stopped collaborating a while ago, needless to say that I consider this inverter as dead; I will switch to another brand ASAP. (Seems ok for the rest at a glance. Just the ZE feature broken but I need it, I bought this inverter for this feature specifically.)
 
Last edited:
For posterity, and because Sofar is so much disorganized that they can be crazy enough to republish another (fixed?) firmware with the very same version numbering, here is the checksum of the bad firmware V4.20 as still published on their website right now:

SHA256: db18a23eec548e54e06225c1e384399ac4c034d1700f34be8fee6c232cd220a1
MD5: 4d747498f73e26de46600bf1f806f62d

(Downloaded from 3 different locations at 3 different times, no possible mistake or download corruption.)
 
Last edited:
More details:
1) Software version numbering got back... from v3.30 it switched back to v2.10! (But is well presented as 4.20 via Solarman.)
=> Going back in a release versioning is well know to be a huge mistake, not to do. It seems Sofar is still learning... on their own.

2) Modbus register map seems to have changed. Data are no more stored in the same locations.
=> Also very stupid. Maybe just to force people who already had implemented companion tools to stop. Sad again.
 
Hi, did you manage to solve your issue? Can you tell more about the changes in modbus registers? By the way, I have noticed that the software version my inverter outputs varies based on what country code I set. With "Cei0-21" I get v.3.5 and with "Central Europe" I get v1.0
 
Hi,
Interesting, thanks for sharing the software version trick... One more mess in their implementation! Good to know.

Yes, on my side I progressed. Now I could finally make the inverter work again, but not yet the Zero Export feature that I need.

Regarding the register map, the CT measurement register seems to have moved away.
But what is surprising is that after a while it works again like before. So, my assumption is that after a few seconds/minutes, their new implementation falls back to the previous working. Just an hypothesis, but the behaviour seems to be confirmed.

Right now I just discovered yet another couple of issues, which were already present in previous versions but now happen much more often in V4.20:

1) Their Modbus checksum calculation is wrong. It seems they don't update the before last byte properly, not systematically but much more often than before. So, the checksum is bad, and since we cannot rely on their content, we can't afford to just disregard the checksum, much too risky.

2) When they fail with the bad checksum, it really looks like an overflow because they then pollute the Modbus with a lot of garbage bytes, more than just the expected response length.

An example of a frequent bad response from the inverter:
01 03 02 00 00 00 b8
Another one that demonstrates they clearly have some kind of errant pointer or bad offset in the queue management:
01 03 02 00 00 b8 00
Another example of bad checksum:
01 03 02 ff ff b9 44

They always had bugs in the response processing, including wrong slave address and/or wrong function which led to wrong checksum too, but in another way...
I fear they still haven't learned a lot about Modbus and continue to use their poorly implemented communication!

For sure, I opt out of SofarSolar. Now I switched to APSystems... Much better, more professional, more performance, at the same cost. At least until some consideration pops out of the Sofar management with a more positive attitude.


UPDATE: Also, the failures are systematic when you communicate with the inverter while it is starting in the morning (sun rises). But if you start communicating with it during the day (already started, cruise), it works ok. => Clearly another issue, more related to race conditions at start, which then engender the issues described above.
 
Last edited:
Do you mean Zero export doesn't work at all or just modbus communication of it doesn;t?
I'm currently on v.3.50 and I also need Zero Export function. It kind of works, but in certain situations (load) it becomes unreliable and sometimes export about 100w and sometimes starts limiting output even if I have consumption from grid. I was hoping to solve this witht fw update.
I was never able to find (v.3.50) any modbus address related to CT measurements, can you share yours?
 
My first tests broke everything, including normal operation without Zero Export feature, so I could not make clear what was related to Zero Export and what was more general.
Until now I still could not make it much clear, because the weather here was bad these days. Tomorrow I'm on holiday, and I hope to have enough sun to reach this (last?) step.
=> I'll update this thread afterward.

Regarding what you describe for V3.50 (version that I never got), it really looks like a regression compared to V3.30 and V3.00, for which I obtained from Sofar some fixes to the several bugs I reported. (At that time they were still a little bit collaborative, then they stopped despite of the accurate bug reports and tests I made for them, free of charge and in their own interests.)

My path:
V2.70 = original
V3.00 = first series of fixes, among which several regarding Zero Export that I reported
V3.30 = second series of fixes, but not the most impacting I asked for (ramp-up export at sun rise, despite of Zero Export)
V4.20 = upgrade succeeded but operation fully broken, even when disabling Zero Export
[... many steps to recover the inverter]
V4.20 = more or less working now, unstable, Modbus communications worse than before, Zero Export not yet restored, normal operation "usable" but I had to change my software so as to implement workarounds for their new bugs.
=> next update tomorrow if I can.

PS: According to your description, you could have better results with V3.30 (that I can send if needed). However, I suggest to wait until I try the Zero Export reactivation on V4.20, to avoid taking the risk to go backward in the versions. (Anyway, V3.30 upgrade usually fails on first attempt and requires a second or third attempt to fully succeed... It's really necessary to keep your eyes on the LCD because failure messages are very quick and easy to miss.)
 
At least you didn't try the worst updates, 3.60...3.80, inverter didn't even start at the morning without manual restart.
I can live with current version, I just read some posts telling all their issues been solved in fw. 4.00-4.20.
You didn't answer about the modbus address for CT sensor..?
Wish you nice sunshine for your holiday :)
 
Sorry, I missed the CT register: address 0x0029 in the Holding Registers range. (Thus, to read with function 0x03.)

You can look at function SofarTLG3::read at https://gitlab.com/francois.gerin/optip/-/blame/master/src/meter.cpp?ref_type=heads#L153

Attachment is the registers map corresponding to the TL-G3 sample that I try to recover. (=delivered with original V2.70)
Be careful, the registers map that can be found on Internet does not match and is probably related to another series of inverters.
 

Attachments

  • SofarSolar - Registers.pdf
    78.1 KB · Views: 9
Very few sun here, but got enough to test several things and confirm:

1) The communication issue is unrelated to Zero Export feature. When the communication gets recovered (pause for >6s), the CT measurement looks good.

2) The Zero Export feature is just destroyed: no more possible to get it work, once it derates it sticks to zero production despite of available power and demand... So we consume from the grid while the PV production is forced to zero, and despite it should be used.
Submenu 16 (derating ratio) and submenu 17 (zero export activation+amount) settings have NO effect: once activated, no matters the values, the inverter does not produce anymore!

So, from my side the conclusion is clear: Zero Export is completely broken, not usable anymore, no more a feature of the inverter.
Surprising to see such a maker doing a so huge mistake, but probably a sign of a coming end for SofarSolar. Shame on them.
 
Incredible bug... Are you setting export limits manually or via modbus? Did you ever try fw. v4.00 or 4.10? Guys on german forum were very happy with v.4.xx firmwares.

Thank's for the 0x0029, I was observing that address when I bought my inverter, but values were so strange I didn't realize it was CT. I tried again and at least in my fw. that register gives me CT power (in unit 10W) in Dec when exporting to grid but when importing from grid it gives me (65536-CT power)in Dec. For example while importing 200W I get 65516.
Reading the CT from inverter confirmed me that the "export limiting" logic in my fw. has some problem, if i set submenu 17 to 0W, inverter sometimes go up to 150W before it starts derating, sometimes it already starts derating while I'm importing 50W from grid. Before I thought inverter was seeing the CT current incorrectly.
Anyway I don't get stable CT readings, they are jumping up and down (might be more stable with resistive load, mine is from heatpumps, power regulators, switching power supplies etc.).
 
By the way, I noticed from your gitlab link that we have same scope to maximize self consumption. I'm regulating my water heater power based on my excess pv power, but I need 0-export feature when thermostat switches off.
 
I don't configure anything via Modbus, only manually. I use Modbus exclusively to read the actual export/import power, so has to drive my optip software which turns on/off various loads according to the available power. V3.30 was the less damaging and workable enough version, despite of the ramp-up bug.

Never got access to fw V4.00 or V4.10... Since Sofar does not communicate, hard to know when they release something.
However, now how could I still trust any new firmware from them? => blacklisted

Good to know that some people have it working. Maybe another hardware version? Mine is V1. But here again, how could we still trust Sofar in the versions numbering, since they provide a mess of various numbers, sometime going backward for a same content of a different one... A complete mess.

The CT reading is to be done on two bytes (10W unit), signed value. => negative/positive value according to import/export
Maybe your CT has different properties, there are different conversion ratios on the market. You need a 3000/1 ratio. See the specs in attachment.
Also the distance may impact. I did not notice any downgrade when moving from 1m to 7m wires, but these are data wires.
Now it has been very stables for >12 months with the 7 meters setup, allowing to put the CT directly at the entrance of the house installation.


PS: Regarding the water heater, that's indeed the intent of optip... I use it mainly for the water, but when there is no more need, then I turn on various other loads, in the order of priorities, just not to waste the energy. The Zero Export ensures that nothing reaches the grid. The is less flexible than a dynamic "power router", but it's also much cheaper and by far sufficient.
Another "strategy" is ready but not tested yet, which allows to ensure that a failing Zero Export (cf Sofar) get consumed in some load so that it cannot reach the grid.
 

Attachments

  • SofarSolar - CT Specs.pdf
    103.7 KB · Views: 4
I have correct CT and I tried two other CTs from my Shelly EM, all with 3000:1 ratio. Identical results. I have shielded twisted cable 4meters long...
My neighbor has same setup and fw, identical behavior.
Register 29 values could make more sense if I read it in separate bytes, anyway I got what I was looking for. Thank's!
Anyway this CT inaccuracy makes my heater control more complicated, I cant trust that as an indicator of derating.
I'm regulating my heater with beefy triac and microcontroller for 0-crossing and timing. Updated power every few seconds. At least that part is working with absolute precision. I know there are some interferences from phase trimming, but in practice haven't notice anything. After all washing machines and vacuum cleaners are all using similar triac power control.
 
Oh, if you do this, then I may confirm that acting on the sine wave interferes with the control loop of the inverter which, indeed, shows varying power... It can't work. (That was my first approach, of course, for efficiency and fully manageable power level.)

I tested both a diode to half-cut the power, and a 0-crossing triac that I also expected to drive according to the required power. The inverter is very badly influenced by the triac approach. I could also deduce that their sampling frequency and method is not obvious/natural at all and, of course, it is not possible to synchronize your driving to their sampling. => Their control loop will necessarily be impacted.
I abandoned that approach, and went to the on/off option, and made optip. A cheap solution, by opposition to expensive "power routers".

The diode was working fine, but then the relay sees only DC current, ending its life quite quickly. I had to replace the relay every 2-3 months... I thus also stopped the diode approach. :-(

For water heaters, using a 3-phases one, just connecting the resistors in "Y" or 2 of them in series, allows to reduce the consumed power. Another setup is two resistors in series on 1 relay, the third resistor on a distinct relay... So as to allow three different powers that you can turn on/off according to the available power.

If using a single phase water heater, a powerful dimmer has the benefit to modify the sine wave in a symmetric way, nearly transparent for the inverter. This approach works, but then you're again with a dimmer approach.
(I dislike these approaches, for the harmonics and sine wave disturbances they generate. On a wide scale, we'll face problems in a short future if everybody does this. Just a philosophical issue of mine, and one more reason to fall back to the on/off method, even if it looks archaic. ;-))
 
I don't like phase trimming either as an idea, but it has its advantages. That's why IGBT dimmers /power regulators are almost inexistent. By the way, zero crossing that you find in cheap triac dimmers and solid state relays is a joke. I fine tuned 0-crossing to perfection and added line filters. Not causing any problems. My inverter behaves better when triac controlled heater is on than when it's off. That's probably because of higher load, but anyway, it doesn't cause the problem. But like I wrote before, all my loads are "noisy", I don't basically have resistive loads at all if I'm not cooking. New Daikin heat pumps as a main load doesn't give any better results.
Worst behavior is when I have almost no load, maybe fridge an some small power supplies and at the same time full capacity from solar limited with zero export. My Shelly EM with same class CT located next to inverter CT is reading the power perfectly in line with my grid meter. No jumping or anything weird. My neighbor has a typical residential loads and behavior of inverter is identical to mine.
Based on your trials, now I want to make a try just with pure resistive load.
 
If triac based power control was an uncontrollable evil to electric network, Samsung, Miele, Bosch, Electrolux etc wouldn't use that for their washing machines and vacuum cleaners. And they could not because of emi regulations :)
 
The problem is the scale. of course right now there is no visible problem, yet. Also, only hair driers and a few others use this. The different washing machines I checked don't use this technique, there are systematically parallel coils or resistors.

Just for the record, among the tests I also tried to let only 1 on and 1 on 3 sine wave, to ensure a clean 0-crossing with no other trouble. of course the inverter got crazy also, with very unstable power... It also makes full sense when considering the control loop working, together with a sampling frequency.
 
Yep, I tried also pulse skipping, in theory the best way to control power, no harmonics, no spikes... But in reality, energy meters don't understand that kind of regulation, it's unnatural to common electronics, and they go crazy. Also the grid meter sees 1 cycle in 1 cycle out.
Energy meters do behave well with phase cutting (up to certain level of course), because they have to since normal house loads are full of them: All adjustable power vacuum cleaners, light dimmers, ceiling fan controllers, washing machine motor controller (not heating element), some hairdryers (most of them has only diode for half power) and many more.. Also pv inverters have to be able to deal with all these phase trimmed loads. And they have huge line filters for that.

Just alone my vacuum cleaner has 1600w power controlled with triac, my water heater element is less, 1500w and the control circuit is more sophisticated. Of course on-off power control is way better and should be the first choice, I do that with two mini split, which presents the major load of my house. And I wouldn't do phase trimming on 3kw 3-element water heater since you can get plenty of load combinations connecting them in series or parallel with few cheap and reliable relays.
But dynamic power control is needed for fine tuning (engineer porn) and in my case also to find out how much power my PV can output at this second. If I have zero export set on my inverter, I cant see how much power it is derating. I could switch shortly some dumb load to measure it, but it's not practical because of the production of pv from clouds and loads in my house change continuously. May be PV Dc voltage could be used as an indicator? More it's derating, higher it gets.

Anyway, my inverters ct/export limiting behavior could be firmware related, since yours is stable and my neighbors (and mine) is not.
Also the total energy counter counts whatever cosmic energy who knows, MPPT scan is not working etc.
 
90% of washing machines use triac controller, only newest DC motor washing machines and some inverter ones don't. Not for the heating resistor, for the motor speed control. You know from few turns/min when washing to 1200rpm when centrifuging
 
I logged my inverter behavior yesterday and today in different load situations. Fortunately yesterday was cloudy and today full sun.
I set 100w export limit.
In full sun and constant load inverter is exporting very stable, CT value (0x0029) goes up to 120, then derating more to bring it down to 100W. CT value is always 20-50w below the real export, but that's reasonable.
No difference between resistive load and triac trimmed load!

With very small load in house inverter has trouble to derate and CT value stands in 150W, so he know he's exporting more than allowed. Real export is about 40w higher than CT-value.

When I start my Daikin inverter mini split, CT-values start jumping and if I drive Daikin with low power(modulating at about 15%), values continue jumping up and down few hundreds of watts. If I drive Daikin with high power, CT outputs are more stable. Interesting is that inverter output power doesn't jump like CT values.

Different story yesterday when cloudy and PV-power varies quickly. Inverter has hard time follow the changing PV-power and house load changes.
in certain moments export is going up to 250w.

So the export value seems to be a target for the inverter, not an exact limit. Don't believe (like I did) that with zero export your inverter "doesn't put even one watt in grid", like some sellers advertise. It does and it doesn't even try to limit power in millisecond scale.

My neighbor confirms about 50w average export while limit is set to zero.

This is with fw. v3.50
 
It seems the last "not too bad" firmware was then V3.30. It had the bug allowing export when ramping up in the morning, but then it was ok and was well sticking the real changes.

The inverter/installation I experimented the most had a negative offset (-10W), so I allowed it to export 10W to reach the real zero... It seems I was lucky enough to get the offset in the right direction.

Since rules in Belgium allow to export unbalanced, and since I have permanent loads on the two other phases, I finally increased again the export rate so as to cover those loads two. Now this installation is zero, all phases together.

One of the next "strategies" I'll implement in optip is to also cover the quarter-measurement case. Since we have 15 minutes to make the zero, it's interesting to export more when some load started and consumed more than the PV installation was generating at that time.
(Of course since there is no possible synchronization, it requires to ensure a sliding 15 minutes window...)
 
Lucky you!! 15 minutes is a lifetime for electronics, even 15s would be enough to implement some nice cycling... Just to compare fine tuning zero cross detection at nanosecond scale :)
 

diy solar

diy solar
Back
Top