From 7a78f3bddb8a27f25e55e36f075923600e9bf059 Mon Sep 17 00:00:00 2001 From: James Date: Sat, 27 Apr 2024 10:53:29 +0100 Subject: [PATCH] new output format --- ESPBMS.ino | 15 +++++++++++++++ victron.ino | 12 ++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ESPBMS.ino b/ESPBMS.ino index 854a306..99c8e3d 100644 --- a/ESPBMS.ino +++ b/ESPBMS.ino @@ -323,6 +323,15 @@ bool processBasicInfo(byte *data, unsigned int dataLen){ Serial.printf("%s Capacity Remain Percent: %d\r\n",currentName, CapacityRemainPercent); Serial.printf("%s Temp1: %f\r\n",currentName, (float)Temp1 / 10); Serial.printf("%s Temp2: %f\r\n",currentName, (float)Temp2 / 10); + + Serial.printf(">>>%s.voltage: %f\r\n",currentName, (float)Volts / 1000); + Serial.printf(">>>%s.amps: %f\r\n",currentName, (float)Amps / 1000); + Serial.printf(">>>%s.watts: %f\r\n",currentName, (float)Watts); + Serial.printf(">>>%s.capacity_remain_ah: %f\r\n",currentName, (float)CapacityRemainAh / 1000); + Serial.printf(">>>%s.capacity_remain_wh: %f\r\n",currentName, ((float)(CapacityRemainAh) / 1000) * ((float)(Volts) / 1000)); + Serial.printf(">>>%s.capacity_remain_percent: %d\r\n",currentName, CapacityRemainPercent); + Serial.printf(">>>%s.temp1: %f\r\n",currentName, (float)Temp1 / 10); + Serial.printf(">>>%s.temp2: %f\r\n",currentName, (float)Temp2 / 10); /* Serial.printf("%s Balance Code Low: 0x%x\r\n",currentName, BalanceCodeLow); Serial.printf("%s Balance Code High: 0x%x\r\n",currentName, BalanceCodeHigh); @@ -356,6 +365,7 @@ bool processCellInfo(byte *data, unsigned int dataLen) _cellMin = CellVolt; } + Serial.printf(">>>%s.cell.%d.voltage: %f\r\n",currentName, i+1,(float)CellVolt/1000); Serial.printf("%s Cell %d Voltage: %f\r\n",currentName, i+1,(float)CellVolt/1000); } @@ -364,6 +374,11 @@ bool processCellInfo(byte *data, unsigned int dataLen) Serial.printf("%s Difference Cell Voltage: %f\r\n",currentName, (float)(_cellMax - _cellMin) / 1000); Serial.printf("%s Average Cell Voltage: %f\r\n",currentName, (float)(_cellSum / NumOfCells) / 1000); + Serial.printf(">>>%s.max_cell_voltage: %f\r\n",currentName, (float)_cellMax / 1000); + Serial.printf(">>>%s.min_cell_voltage: %f\r\n",currentName, (float)_cellMin / 1000); + Serial.printf(">>>%s.difference_cell_voltage: %f\r\n",currentName, (float)(_cellMax - _cellMin) / 1000); + Serial.printf(">>>%s.average_cell_voltage: %f\r\n",currentName, (float)(_cellSum / NumOfCells) / 1000); + gotCellInfo=true; return true; diff --git a/victron.ino b/victron.ino index e1f8406..2b84506 100644 --- a/victron.ino +++ b/victron.ino @@ -185,11 +185,11 @@ void decodeVictron(BLEAdvertisedDevice advertisedDevice) { return; } - Serial.printf("%-31s Battery: %6.2f Volts %6.2f Amps Solar: %6d Watts Yield: %6.0f Wh Load: %6.1f Amps State: %3d\n", - currentName, - batteryVoltage, batteryCurrent, - inputPower, todayYield, - outputCurrent, deviceState - ); + Serial.printf(">>>mppt.battery_volts %f\r\n",batteryVoltage); + Serial.printf(">>>mppt.battery_amps %f\r\n",batteryCurrent); + Serial.printf(">>>mppt.solar_watts %f\r\n",inputPower); + Serial.printf(">>>mppt.output_current %f\r\n",outputCurrent); + Serial.printf(">>>mppt.yield %f\r\n",todayYield); + Serial.printf(">>>mppt.state %d\r\n",deviceState); } }