Skip to content

Commit

Permalink
Feature: show "Smart Battery Sense" temperature in web UI (#1292)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SW-Niko authored Oct 13, 2024
1 parent 4bdfd65 commit 844d920
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/WebApi_ws_vedirect_live.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ void WebApiWsVedirectLiveClass::populateJson(const JsonObject &root, const VeDir
output["E"]["v"] = mpptData.mpptEfficiency_Percent;
output["E"]["u"] = "%";
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>();
if (mpptData.NetworkTotalDcInputPowerMilliWatts.first > 0) {
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@
"P": "Leistung (berechnet)",
"V": "Spannung",
"I": "Strom",
"E": "Effizienz (berechnet)"
"E": "Effizienz (berechnet)",
"SBSTemperature": "SBS Temperatur"
},
"section_input": "Eingang (Solarpanele)",
"input": {
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@
"P": "Power (calculated)",
"V": "Voltage",
"I": "Current",
"E": "Efficiency (calculated)"
"E": "Efficiency (calculated)",
"SBSTemperature": "SBS temperature"
},
"section_input": "Input (Solar Panels)",
"input": {
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@
"P": "Power (calculated)",
"V": "Voltage",
"I": "Current",
"E": "Efficiency (calculated)"
"E": "Efficiency (calculated)",
"SBSTemperature": "SBS temperature"
},
"section_input": "Input (Solar Panels)",
"input": {
Expand Down

0 comments on commit 844d920

Please sign in to comment.