mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-11 07:56:39 +02:00
add General overview for several inverters
This commit is contained in:
parent
b1311e797c
commit
f89c6e06a3
2 changed files with 65 additions and 6 deletions
|
@ -182,7 +182,16 @@ div.ch {
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, div.ch-iv .head {
|
div.ch-all {
|
||||||
|
width: 100%;
|
||||||
|
background-color: #b06e04;
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, div.ch-iv .head, div.ch-all .value, div.ch-all .info, div.ch-all .head {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -194,17 +203,17 @@ div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, di
|
||||||
width: 220px;
|
width: 220px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.ch .unit, div.ch-iv .unit {
|
div.ch .unit, div.ch-iv .unit, div.ch-all .unit {
|
||||||
font-size: 19px;
|
font-size: 19px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.ch .value, div.ch-iv .value {
|
div.ch .value, div.ch-iv .value, div.ch-all .value {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.ch .info, div.ch-iv .info {
|
div.ch .info, div.ch-iv .info, div.ch-all .info {
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
@ -214,6 +223,11 @@ div.ch .head {
|
||||||
padding: 10px 0 10px 0;
|
padding: 10px 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.ch-all .head {
|
||||||
|
background-color: #8e5903;
|
||||||
|
padding: 10px 0 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
div.ch-iv .head {
|
div.ch-iv .head {
|
||||||
background-color: #1c6800;
|
background-color: #1c6800;
|
||||||
padding: 10px 0 10px 0;
|
padding: 10px 0 10px 0;
|
||||||
|
|
|
@ -437,8 +437,13 @@ void web::showVisualization(void) {
|
||||||
void web::showLiveData(void) {
|
void web::showLiveData(void) {
|
||||||
DPRINTLN(DBG_VERBOSE, F("web::showLiveData"));
|
DPRINTLN(DBG_VERBOSE, F("web::showLiveData"));
|
||||||
|
|
||||||
String modHtml;
|
String modHtml, totalModHtml;
|
||||||
|
float totalYield = 0, totalYieldToday = 0, totalActual = 0;
|
||||||
|
uint8_t count = 0;
|
||||||
|
|
||||||
for (uint8_t id = 0; id < mMain->mSys->getNumInverters(); id++) {
|
for (uint8_t id = 0; id < mMain->mSys->getNumInverters(); id++) {
|
||||||
|
count++;
|
||||||
|
|
||||||
Inverter<> *iv = mMain->mSys->getInverterByPos(id);
|
Inverter<> *iv = mMain->mSys->getInverterByPos(id);
|
||||||
if (NULL != iv) {
|
if (NULL != iv) {
|
||||||
#ifdef LIVEDATA_VISUALIZED
|
#ifdef LIVEDATA_VISUALIZED
|
||||||
|
@ -462,6 +467,19 @@ void web::showLiveData(void) {
|
||||||
|
|
||||||
for (uint8_t fld = 0; fld < 11; fld++) {
|
for (uint8_t fld = 0; fld < 11; fld++) {
|
||||||
pos = (iv->getPosByChFld(CH0, list[fld]));
|
pos = (iv->getPosByChFld(CH0, list[fld]));
|
||||||
|
|
||||||
|
if(fld == 6){
|
||||||
|
totalYield += iv->getValue(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fld == 7){
|
||||||
|
totalYieldToday += iv->getValue(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fld == 2){
|
||||||
|
totalActual += iv->getValue(pos);
|
||||||
|
}
|
||||||
|
|
||||||
if (0xff != pos) {
|
if (0xff != pos) {
|
||||||
modHtml += F("<div class=\"subgrp\">");
|
modHtml += F("<div class=\"subgrp\">");
|
||||||
modHtml += F("<span class=\"value\">") + String(iv->getValue(pos));
|
modHtml += F("<span class=\"value\">") + String(iv->getValue(pos));
|
||||||
|
@ -513,7 +531,34 @@ void web::showLiveData(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mWeb->send(200, F("text/html"), modHtml);
|
if(count > 1){
|
||||||
|
totalModHtml += F("<div class=\"iv\">"
|
||||||
|
"<div class=\"ch-all\"><span class=\"head\">Gesamt</span>");
|
||||||
|
|
||||||
|
totalModHtml += F("<div class=\"subgrp\">");
|
||||||
|
totalModHtml += F("<span class=\"value\">") + String(totalActual);
|
||||||
|
totalModHtml += F("<span class=\"unit\">W</span></span>");
|
||||||
|
totalModHtml += F("<span class=\"info\">P_AC All</span>");
|
||||||
|
totalModHtml += F("</div>");
|
||||||
|
|
||||||
|
totalModHtml += F("<div class=\"subgrp\">");
|
||||||
|
totalModHtml += F("<span class=\"value\">") + String(totalYieldToday);
|
||||||
|
totalModHtml += F("<span class=\"unit\">Wh</span></span>");
|
||||||
|
totalModHtml += F("<span class=\"info\">YieldDayAll</span>");
|
||||||
|
totalModHtml += F("</div>");
|
||||||
|
|
||||||
|
totalModHtml += F("<div class=\"subgrp\">");
|
||||||
|
totalModHtml += F("<span class=\"value\">") + String(totalYield);
|
||||||
|
totalModHtml += F("<span class=\"unit\">kWh</span></span>");
|
||||||
|
totalModHtml += F("<span class=\"info\">YieldTotalAll</span>");
|
||||||
|
totalModHtml += F("</div>");
|
||||||
|
|
||||||
|
totalModHtml += F("</div>");
|
||||||
|
totalModHtml += F("</div>");
|
||||||
|
mWeb->send(200, F("text/html"), totalModHtml + modHtml);
|
||||||
|
} else {
|
||||||
|
mWeb->send(200, F("text/html"), modHtml);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue