Feature: show "Smart Battery Sense" temperature in web UI (#1292)

a battery temperature value measured by a Victron smart battery sense
and communicated to a connected Victron MPPT charge controller will now
appear in the live view card.
This commit is contained in:
Niko 2024-10-13 21:05:39 +02:00 committed by GitHub
parent 4bdfd655f8
commit 844d92008b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 3 deletions

View File

@ -190,6 +190,11 @@ void WebApiWsVedirectLiveClass::populateJson(const JsonObject &root, const VeDir
output["E"]["v"] = mpptData.mpptEfficiency_Percent; output["E"]["v"] = mpptData.mpptEfficiency_Percent;
output["E"]["u"] = "%"; output["E"]["u"] = "%";
output["E"]["d"] = 1; output["E"]["d"] = 1;
if (mpptData.SmartBatterySenseTemperatureMilliCelsius.first > 0) {
output["SBSTemperature"]["v"] = mpptData.SmartBatterySenseTemperatureMilliCelsius.second / 1000.0;
output["SBSTemperature"]["u"] = "°C";
output["SBSTemperature"]["d"] = "0";
}
const JsonObject input = values["input"].to<JsonObject>(); const JsonObject input = values["input"].to<JsonObject>();
if (mpptData.NetworkTotalDcInputPowerMilliWatts.first > 0) { if (mpptData.NetworkTotalDcInputPowerMilliWatts.first > 0) {

View File

@ -187,7 +187,8 @@
"P": "Leistung (berechnet)", "P": "Leistung (berechnet)",
"V": "Spannung", "V": "Spannung",
"I": "Strom", "I": "Strom",
"E": "Effizienz (berechnet)" "E": "Effizienz (berechnet)",
"SBSTemperature": "SBS Temperatur"
}, },
"section_input": "Eingang (Solarpanele)", "section_input": "Eingang (Solarpanele)",
"input": { "input": {

View File

@ -187,7 +187,8 @@
"P": "Power (calculated)", "P": "Power (calculated)",
"V": "Voltage", "V": "Voltage",
"I": "Current", "I": "Current",
"E": "Efficiency (calculated)" "E": "Efficiency (calculated)",
"SBSTemperature": "SBS temperature"
}, },
"section_input": "Input (Solar Panels)", "section_input": "Input (Solar Panels)",
"input": { "input": {

View File

@ -187,7 +187,8 @@
"P": "Power (calculated)", "P": "Power (calculated)",
"V": "Voltage", "V": "Voltage",
"I": "Current", "I": "Current",
"E": "Efficiency (calculated)" "E": "Efficiency (calculated)",
"SBSTemperature": "SBS temperature"
}, },
"section_input": "Input (Solar Panels)", "section_input": "Input (Solar Panels)",
"input": { "input": {