SunVolt R10 battery on CAN, reporting charge when in discharge and vice versa

I recall reading something about this on the forum, but my search-foo is letting me down.

TLDR: How to swap the sign on the current being reported by the BMS

I have a customer who purchased a SunVolt LiFePO4 battery, these apparently support CAN, and are the flotsam from the shipwreck that was SolarZero in NZ. There are a number of these batteries on TradeMe at the moment, i think usually found on grid-tied systems (as was SolarZero’s primary market).

The customer has been very resourceful, and found that a Victron to Dyness cable (the type where pins 4,5 go to pins 7,8) works, but only with CAN terminators in place. As an aside; We always use the terminators as per the manual, but find that Dyness work without them, as do our own RoarPower batteries, but we always install the terminator. So i suspect that the BMS doesn’t do software termination, but that’s fine.

The primary problem:
The battery is reporting the charge or discharge current, with the wrong sign. So when the battery is discharging, the GX / VRM / etc shows charging, and vice versa.

I’m hoping @lxonline or @nickdb or @alexpescaru will remember the hack that can fix this.

To be clear; the battery has other issues too, such as reporting that there are 1 batteries online, and 26,742 offline, and i’m pretty confident that it doesn’t meet the Victron CAN standard, but the customer would be happy to just get the charge/discharge sorted.

My memory says that someone wrote a custom driver and dropped that into the GX?

Thanks team.

@RoarPowerNZ
Other than the cusom driver, we had a funny one where all we had to do was open the battery and change connection on the shunt internally. That may or may not apply here.
Does switching on SCS help?
Is it also mixing DCL and CCL?

I suspect that if we changed the shunt direction, it would mess up the BMS’s accounting for Ah, and therefore SOC.

It’s hard to know if its mixing DCL and CCL as both are often 100A

Thats is odd, if it shows charging when discharging but soc is correct, then it is firmware.

Do you mean firmware on the BMS, or on the GX?

The SOC is being calculated correctly on the BMS, which means the battery knows the current (sign), but its just publishing the value with the wrong sign when it formats the CAN message.
I’m sure its just a case of the BMS talking a dialog of CAN that is mostly Victron compliant, but the typical SunVolt inverter is expecting negative current for charging, and positive for discharging.

This is what i was thinking. Some inverters systems have it the other way.

So the BMS firmware.