Hi Elbow, thank you for making the pyloncom.py script available. I am having some funny values when using this script on my US3000C battery as follows:
Conecting to addr 2
Get charge info reply, addr 2 : 02d002b3b00000fe8e40
VER: 0x20, ADR: 0x02, CID1: 0x46, CID2: 0x00, LENGTH: 20, len(INFO): 10, CHKSUM: 0xF950
> VoltageUpLimit: 53.25, VoltageDownLimit: 46.0, MaxChargeCurrent: 0.0, MaxDischargeCurrent: -37.0, Status: 0x40
Get analog: VER: 0x20, ADR: 0x02, CID1: 0x46, CID2: 0x42, LENGTH: 2, len(INFO): 1, CHKSUM: 0x0000, Command: 2
Get analog reply, addr 2 : VER: 0x20, ADR: 0x02, CID1: 0x46, CID2: 0x00, LENGTH: 122, len(INFO): 61, CHKSUM: 0xE270
> CellsCount: 15, TemperaturesCount: 5
> TotalCurrent: 127.900A, TotalVoltage: 65.280V, RemainingCapacity: 0.001Ah, P: 8349.31
> Quantity: 33, TotalCapacity: 4.097Ah, Cycles: 8464
> CellVoltages: [3.466, 3.468, 3.468, 3.456, 3.465, 3.467, 3.467, 3.467, 3.456, 3.469, 3.465, 3.468, 3.467, 3.467, 3.465]
> Temperatures: [21.3, 16.6, 16.4, 16.1, 18.9]
Send { "time":1628776109, "VoltageUpperLimit":53.25, "VoltageLowerLimit":46.0, "MaxChargeAmps":0.0, "MaxDischargeAmps":-37.0, "BatteryCycles":8464, "BatteryVoltage":65.28, "BatteryAmps":127.9, "BatteryWatts":8349.312, "BatterySOC":0.002, "RemainingAh":0.001, "RemainingWh":0, "MinutesToRun":9999, "CellMaxVoltage":3.65, "CellLowVoltage":3.05, "CellUnderVoltage":2.8, "cellVoltage0":3.466, "cellVoltage1":3.468, "cellVoltage2":3.468, "cellVoltage3":3.456, "cellVoltage4":3.465, "cellVoltage5":3.467, "cellVoltage6":3.467, "cellVoltage7":3.467, "cellVoltage8":3.456, "cellVoltage9":3.469, "cellVoltage10":3.465, "cellVoltage11":3.468, "cellVoltage12":3.467, "cellVoltage13":3.467, "cellVoltage14":3.465, "highestCellVoltage":3.469, "lowestCellVoltage":3.456, "cellImbalancePct":0.3, "temp0":21.3, "temp1":16.6, "temp2":16.4, "temp3":16.1, "temp4":18.9, "highestTemp":21.3, "lowestTemp":16.1 } to emon/pylonPPTCR03101168345
As you can see, the values for Totalcurrent, TotalVoltage, RemainingCapacity etc. seem to be incorrect, as well as the value for Cycles seems to remain the same.
I would assume that the response string being returned is not getting parsed correctly for these values to show up as they do. I have tried to use the RS485 protocol manual to make sense of it, but i just dont seem to be able to work out how the parsing gets done. Is there any more reading i can do to understand this or do you have some tips for me to follow to get this fixed please