mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-05 12:11:39 +02:00
Inverter Ausschalten wenn Aufgrund der Leistung
nicht erforderlich konfigurierbar
This commit is contained in:
parent
3375d3c8a9
commit
9428bdc73a
5 changed files with 30 additions and 3 deletions
|
@ -852,6 +852,7 @@ class RestApi {
|
|||
objGroupInv[F("target")] = (int8_t)mConfig->plugin.zeroExport.groups[group].inverters[inv].target;
|
||||
objGroupInv[F("powerMin")] = (uint16_t)mConfig->plugin.zeroExport.groups[group].inverters[inv].powerMin;
|
||||
objGroupInv[F("powerMax")] = (uint16_t)mConfig->plugin.zeroExport.groups[group].inverters[inv].powerMax;
|
||||
objGroupInv[F("turnOff")] = (uint16_t)mConfig->plugin.zeroExport.groups[group].inverters[inv].turnOff;
|
||||
}
|
||||
// Battery
|
||||
objGroup[F("battEnabled")] = (bool)mConfig->plugin.zeroExport.groups[group].battEnabled;
|
||||
|
@ -1167,6 +1168,7 @@ class RestApi {
|
|||
mConfig->plugin.zeroExport.groups[group].inverters[inv].target = jsonIn[F("inverters")][inv][F("target")];
|
||||
mConfig->plugin.zeroExport.groups[group].inverters[inv].powerMin = jsonIn[F("inverters")][inv][F("powerMin")];
|
||||
mConfig->plugin.zeroExport.groups[group].inverters[inv].powerMax = jsonIn[F("inverters")][inv][F("powerMax")];
|
||||
mConfig->plugin.zeroExport.groups[group].inverters[inv].turnOff = jsonIn[F("inverters")][inv][F("turnOff")];
|
||||
}
|
||||
// Battery
|
||||
mConfig->plugin.zeroExport.groups[group].battEnabled = jsonIn[F("battEnabled")];
|
||||
|
|
|
@ -1324,6 +1324,7 @@
|
|||
ml("th", {}, "{#ZE_GROUP_TAB_INVERTER_SUM}"),
|
||||
ml("th", {style: "width: 15%;"}, "{#ZE_GROUP_TAB_INVERTER_POWERMIN}"),
|
||||
ml("th", {style: "width: 15%;"}, "{#ZE_GROUP_TAB_INVERTER_POWERMAX}"),
|
||||
ml("th", {style: "width: 5%;"}, "{#ZE_GROUP_TAB_INVERTER_TURNOFF}"),
|
||||
]));
|
||||
|
||||
for(var inv = 0; inv < maxInv; inv++) {
|
||||
|
@ -1331,7 +1332,7 @@
|
|||
ml("td", {}, String(inv)),
|
||||
ml("td", {},
|
||||
ml("div", {}, [
|
||||
ml("input", {name: "invEnabled"+inv, class: "text", id: "invEnabled"+inv, type: "checkbox"}, null)
|
||||
ml("input", {name: "invEnabled"+inv, class: "text", id: "invEnabled"+inv, type: "checkbox"}, null)
|
||||
]),
|
||||
),
|
||||
ml("td", {},
|
||||
|
@ -1354,6 +1355,11 @@
|
|||
ml("input", {name: "invPowerMax"+inv, class: "text", id: "invPowerMax"+inv, type: "number", min: "0", max: "65535"}, null)
|
||||
]),
|
||||
),
|
||||
ml("td", {},
|
||||
ml("div", {}, [
|
||||
ml("input", {name: "invTurnOff"+inv, class: "text", id: "invTurnOff"+inv, type: "checkbox"}, null)
|
||||
]),
|
||||
),
|
||||
]));
|
||||
}
|
||||
|
||||
|
@ -1384,6 +1390,10 @@
|
|||
]),
|
||||
// Powermeter
|
||||
ml("div", {id: "div{#ZE_GROUP_TAB_POWERMETER}", class: "tab-content hide"}, [
|
||||
// TODO: add
|
||||
//divRow("{#ZE_GROUP_TAB_POWERMETER_REFRESH}",
|
||||
//ml("select", {name: "pm_refresh", class: "text", type: "text", value: obj.pm_refresh}, null),
|
||||
//),
|
||||
divRow("{#ZE_GROUP_TAB_POWERMETER_TYPE}",
|
||||
ml("select", {name: "pm_type", class: "text", id: "pm_type"}, null),
|
||||
),
|
||||
|
@ -1531,6 +1541,11 @@
|
|||
var e = document.getElementById("invPowerMax"+inv);
|
||||
e.value = (obj.inverters[inv].powerMax);
|
||||
}
|
||||
// - TurnOff
|
||||
for (var inv = 0; inv < maxInv; inv++) {
|
||||
var e = document.getElementById("invTurnOff"+inv);
|
||||
e.checked = (obj.inverters[inv].turnOff);
|
||||
}
|
||||
|
||||
function save() {
|
||||
var o = new Object();
|
||||
|
@ -1560,6 +1575,7 @@
|
|||
q.target = e.options[e.selectedIndex].value;
|
||||
q.powerMin = document.getElementById("invPowerMin"+inv).value;
|
||||
q.powerMax = document.getElementById("invPowerMax"+inv).value;
|
||||
q.turnOff = document.getElementById("invTurnOff"+inv).checked;
|
||||
o.inverters.push(q);
|
||||
}
|
||||
// Battery
|
||||
|
|
|
@ -938,6 +938,11 @@
|
|||
"en": "Power (Max)",
|
||||
"de": "Leistung (Max)"
|
||||
},
|
||||
{
|
||||
"token": "ZE_GROUP_TAB_INVERTER_TURNOFF",
|
||||
"en": "Turn On/Off",
|
||||
"de": "Schalte Ein/Aus"
|
||||
},
|
||||
{
|
||||
"token": "ZE_GROUP_TAB_BATTERY",
|
||||
"en": "Battery",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue