refactor how values are rendered to screen and to json. added space before suffix

This commit is contained in:
proddy
2020-10-07 19:16:21 +02:00
parent 442349fa33
commit f6da8d7406
9 changed files with 345 additions and 297 deletions

View File

@@ -167,68 +167,73 @@ void Boiler::register_mqtt_ha_config() {
// send stuff to the Web UI
void Boiler::device_info_web(JsonArray & root) {
JsonObject dataElement;
// fetch the values into a JSON document
StaticJsonDocument<EMSESP_MAX_JSON_SIZE_LARGE> doc;
JsonObject output = doc.to<JsonObject>();
if (!export_values(output)) {
return; // empty
}
render_value_json(root, "", F_(heatingActive), heatingActive_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(tapwaterActive), tapwaterActive_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(serviceCode), serviceCode_, nullptr);
render_value_json(root, "", F_(serviceCodeNumber), serviceCodeNumber_, nullptr);
render_value_json(root, "", F_(wWSelTemp), wWSelTemp_, F_(degrees));
render_value_json(root, "", F_(wWSetTemp), wWSetTemp_, F_(degrees));
render_value_json(root, "", F_(wWDisinfectionTemp), wWDisinfectionTemp_, F_(degrees));
render_value_json(root, "", F_(selFlowTemp), selFlowTemp_, F_(degrees));
render_value_json(root, "", F_(selBurnPow), selBurnPow_, F_(percent));
render_value_json(root, "", F_(curBurnPow), curBurnPow_, F_(percent));
render_value_json(root, "", F_(pumpMod), pumpMod_, F_(percent));
render_value_json(root, "", F_(pumpMod2), pumpMod2_, F_(percent));
render_value_json(root, "", F_(wWType), wWType_, nullptr);
render_value_json(root, "", F_(wWChargeType), wWChargeType_, nullptr);
render_value_json(root, "", F_(wWCircPump), wWCircPump_, nullptr);
render_value_json(root, "", F_(wWCircPumpMode), wWCircPumpMode_, nullptr);
render_value_json(root, "", F_(wWCirc), wWCirc_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(outdoorTemp), outdoorTemp_, F_(degrees), 10);
render_value_json(root, "", F_(wWCurTemp), wWCurTemp_, F_(degrees), 10);
render_value_json(root, "", F_(wWCurTemp2), wWCurTemp2_, F_(degrees), 10);
render_value_json(root, "", F_(wWCurFlow), wWCurFlow_, F("l/min"), 10);
render_value_json(root, "", F_(curFlowTemp), curFlowTemp_, F_(degrees), 10);
render_value_json(root, "", F_(retTemp), retTemp_, F_(degrees), 10);
render_value_json(root, "", F_(switchTemp), switchTemp_, F_(degrees), 10);
render_value_json(root, "", F_(sysPress), sysPress_, F_(bar), 10);
render_value_json(root, "", F_(boilTemp), boilTemp_, F_(degrees), 10);
render_value_json(root, "", F_(wwStorageTemp1), wwStorageTemp1_, F_(degrees), 10);
render_value_json(root, "", F_(wwStorageTemp2), wwStorageTemp2_, F_(degrees), 10);
render_value_json(root, "", F_(exhaustTemp), exhaustTemp_, F_(degrees), 10);
render_value_json(root, "", F_(wWActivated), wWActivated_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(wWOneTime), wWOneTime_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(wWDisinfecting), wWDisinfecting_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(wWCharging), wWCharging_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(wWRecharging), wWRecharging_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(wWTempOK), wWTempOK_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(wWActive), wWActive_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(burnGas), burnGas_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(flameCurr), flameCurr_, F_(uA), 10);
render_value_json(root, "", F_(heatPump), heatPump_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(fanWork), fanWork_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(ignWork), ignWork_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(wWHeat), wWHeat_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(heatingActivated), heatingActivated_, nullptr, EMS_VALUE_BOOL);
render_value_json(root, "", F_(heatingTemp), heatingTemp_, F_(degrees));
render_value_json(root, "", F_(pumpModMax), pumpModMax_, F_(percent));
render_value_json(root, "", F_(pumpModMin), pumpModMin_, F_(percent));
render_value_json(root, "", F_(pumpDelay), pumpDelay_, F_(min));
render_value_json(root, "", F_(burnMinPeriod), burnMinPeriod_, F_(min));
render_value_json(root, "", F_(burnMinPower), burnMinPower_, F_(percent));
render_value_json(root, "", F_(burnMaxPower), burnMaxPower_, F_(percent));
render_value_json(root, "", F_(boilHystOn), boilHystOn_, F_(degrees));
render_value_json(root, "", F_(boilHystOff), boilHystOff_, F_(degrees));
render_value_json(root, "", F_(setFlowTemp), setFlowTemp_, F_(degrees));
render_value_json(root, "", F_(wWSetPumpPower), wWSetPumpPower_, F_(percent));
render_value_json(root, "", F_(wwMixTemperature), wwMixTemperature_, F_(degrees));
render_value_json(root, "", F_(wwBufferBoilerTemperature), wwBufferBoilerTemperature_, F_(degrees));
render_value_json(root, "", F_(wWStarts), wWStarts_, nullptr);
render_value_json(root, "", F_(wWWorkM), wWWorkM_, nullptr);
render_value_json(root, "", F_(setBurnPow), setBurnPow_, F_(percent));
render_value_json(root, "", F_(burnStarts), burnStarts_, nullptr);
print_value_json(root, F("heatingActive"), nullptr, F_(heatingActive), nullptr, output);
print_value_json(root, F("tapwaterActive"), nullptr, F_(tapwaterActive), nullptr, output);
print_value_json(root, F("serviceCode"), nullptr, F_(serviceCode), nullptr, output);
print_value_json(root, F("serviceCodeNumber"), nullptr, F_(serviceCodeNumber), nullptr, output);
print_value_json(root, F("wWSelTemp"), nullptr, F_(wWSelTemp), F_(degrees), output);
print_value_json(root, F("wWSetTemp"), nullptr, F_(wWSetTemp), F_(degrees), output);
print_value_json(root, F("wWDisinfectionTemp"), nullptr, F_(wWDisinfectionTemp), F_(degrees), output);
print_value_json(root, F("selFlowTemp"), nullptr, F_(selFlowTemp), F_(degrees), output);
print_value_json(root, F("selBurnPow"), nullptr, F_(selBurnPow), F_(percent), output);
print_value_json(root, F("curBurnPow"), nullptr, F_(curBurnPow), F_(percent), output);
print_value_json(root, F("pumpMod"), nullptr, F_(pumpMod), F_(percent), output);
print_value_json(root, F("pumpMod2"), nullptr, F_(pumpMod2), F_(percent), output);
print_value_json(root, F("wWType"), nullptr, F_(wWType), nullptr, output);
print_value_json(root, F("wWChargeType"), nullptr, F_(wWChargeType), nullptr, output);
print_value_json(root, F("wWCircPump"), nullptr, F_(wWCircPump), nullptr, output);
print_value_json(root, F("wWCircPumpMode"), nullptr, F_(wWCircPumpMode), nullptr, output);
print_value_json(root, F("wWCirc"), nullptr, F_(wWCirc), nullptr, output);
print_value_json(root, F("outdoorTemp"), nullptr, F_(outdoorTemp), F_(degrees), output);
print_value_json(root, F("wWCurTemp"), nullptr, F_(wWCurTemp), F_(degrees), output);
print_value_json(root, F("wWCurTemp2"), nullptr, F_(wWCurTemp2), F_(degrees), output);
print_value_json(root, F("wWCurFlow"), nullptr, F_(wWCurFlow), F("l/min"), output);
print_value_json(root, F("curFlowTemp"), nullptr, F_(curFlowTemp), F_(degrees), output);
print_value_json(root, F("retTemp"), nullptr, F_(retTemp), F_(degrees), output);
print_value_json(root, F("switchTemp"), nullptr, F_(switchTemp), F_(degrees), output);
print_value_json(root, F("sysPress"), nullptr, F_(sysPress), nullptr, output);
print_value_json(root, F("boilTemp"), nullptr, F_(boilTemp), F_(degrees), output);
print_value_json(root, F("wwStorageTemp1"), nullptr, F_(wwStorageTemp1), F_(degrees), output);
print_value_json(root, F("wwStorageTemp2"), nullptr, F_(wwStorageTemp2), F_(degrees), output);
print_value_json(root, F("exhaustTemp"), nullptr, F_(exhaustTemp), F_(degrees), output);
print_value_json(root, F("wWActivated"), nullptr, F_(wWActivated), nullptr, output);
print_value_json(root, F("wWOneTime"), nullptr, F_(wWOneTime), nullptr, output);
print_value_json(root, F("wWDisinfecting"), nullptr, F_(wWDisinfecting), nullptr, output);
print_value_json(root, F("wWCharging"), nullptr, F_(wWCharging), nullptr, output);
print_value_json(root, F("wWRecharging"), nullptr, F_(wWRecharging), nullptr, output);
print_value_json(root, F("wWTempOK"), nullptr, F_(wWTempOK), nullptr, output);
print_value_json(root, F("wWActive"), nullptr, F_(wWActive), nullptr, output);
print_value_json(root, F("burnGas"), nullptr, F_(burnGas), nullptr, output);
print_value_json(root, F("flameCurr"), nullptr, F_(flameCurr), F_(uA), output);
print_value_json(root, F("heatPump"), nullptr, F_(heatPump), nullptr, output);
print_value_json(root, F("fanWork"), nullptr, F_(fanWork), nullptr, output);
print_value_json(root, F("ignWork"), nullptr, F_(ignWork), nullptr, output);
print_value_json(root, F("wWHeat"), nullptr, F_(wWHeat), nullptr, output);
print_value_json(root, F("heatingActivated"), nullptr, F_(heatingActivated), nullptr, output);
print_value_json(root, F("heatingTemp"), nullptr, F_(heatingTemp), F_(degrees), output);
print_value_json(root, F("pumpModMax"), nullptr, F_(pumpModMax), F_(percent), output);
print_value_json(root, F("pumpModMin"), nullptr, F_(pumpModMin), F_(percent), output);
print_value_json(root, F("pumpDelay"), nullptr, F_(pumpDelay), F_(min), output);
print_value_json(root, F("burnMinPeriod"), nullptr, F_(burnMinPeriod), F_(min), output);
print_value_json(root, F("burnMinPower"), nullptr, F_(burnMinPower), F_(percent), output);
print_value_json(root, F("burnMaxPower"), nullptr, F_(burnMaxPower), F_(percent), output);
print_value_json(root, F("boilHystOn"), nullptr, F_(boilHystOn), F_(degrees), output);
print_value_json(root, F("boilHystOff"), nullptr, F_(boilHystOff), F_(degrees), output);
print_value_json(root, F("setFlowTemp"), nullptr, F_(setFlowTemp), F_(degrees), output);
print_value_json(root, F("wWSetPumpPower"), nullptr, F_(wWSetPumpPower), F_(percent), output);
print_value_json(root, F("wwMixTemperature"), nullptr, F_(wwMixTemperature), F_(degrees), output);
print_value_json(root, F("wwBufferBoilerTemperature"), nullptr, F_(wwBufferBoilerTemperature), F_(degrees), output);
print_value_json(root, F("wWStarts"), nullptr, F_(wWStarts), nullptr, output);
print_value_json(root, F("wWWorkM"), nullptr, F_(wWWorkM), nullptr, output);
print_value_json(root, F("setBurnPow"), nullptr, F_(setBurnPow), F_(percent), output);
print_value_json(root, F("burnStarts"), nullptr, F_(burnStarts), nullptr, output);
}
bool Boiler::command_info(const char * value, const int8_t id, JsonObject & output) {
@@ -623,66 +628,66 @@ void Boiler::show_values(uuid::console::Shell & shell) {
return; // empty
}
print_value_json(shell, F("heatingActive"), F_(heatingActive), nullptr, output);
print_value_json(shell, F("tapwaterActive"), F_(tapwaterActive), nullptr, output);
print_value_json(shell, F("serviceCode"), F_(serviceCode), nullptr, output);
print_value_json(shell, F("serviceCodeNumber"), F_(serviceCodeNumber), nullptr, output);
print_value_json(shell, F("wWSelTemp"), F_(wWSelTemp), F_(degrees), output);
print_value_json(shell, F("wWSetTemp"), F_(wWSetTemp), F_(degrees), output);
print_value_json(shell, F("wWDisinfectionTemp"), F_(wWDisinfectionTemp), F_(degrees), output);
print_value_json(shell, F("selFlowTemp"), F_(selFlowTemp), F_(degrees), output);
print_value_json(shell, F("selBurnPow"), F_(selBurnPow), F_(percent), output);
print_value_json(shell, F("curBurnPow"), F_(curBurnPow), F_(percent), output);
print_value_json(shell, F("pumpMod"), F_(pumpMod), F_(percent), output);
print_value_json(shell, F("pumpMod2"), F_(pumpMod2), F_(percent), output);
print_value_json(shell, F("wWType"), F_(wWType), nullptr, output);
print_value_json(shell, F("wWChargeType"), F_(wWChargeType), nullptr, output);
print_value_json(shell, F("wWCircPump"), F_(wWCircPump), nullptr, output);
print_value_json(shell, F("wWCircPumpMode"), F_(wWCircPumpMode), nullptr, output);
print_value_json(shell, F("wWCirc"), F_(wWCirc), nullptr, output);
print_value_json(shell, F("outdoorTemp"), F_(outdoorTemp), F_(degrees), output);
print_value_json(shell, F("wWCurTemp"), F_(wWCurTemp), F_(degrees), output);
print_value_json(shell, F("wWCurTemp2"), F_(wWCurTemp2), F_(degrees), output);
print_value_json(shell, F("wWCurFlow"), F_(wWCurFlow), F("l/min"), output);
print_value_json(shell, F("curFlowTemp"), F_(curFlowTemp), F_(degrees), output);
print_value_json(shell, F("retTemp"), F_(retTemp), F_(degrees), output);
print_value_json(shell, F("switchTemp"), F_(switchTemp), F_(degrees), output);
print_value_json(shell, F("sysPress"), F_(sysPress), nullptr, output);
print_value_json(shell, F("boilTemp"), F_(boilTemp), F_(degrees), output);
print_value_json(shell, F("wwStorageTemp1"), F_(wwStorageTemp1), F_(degrees), output);
print_value_json(shell, F("wwStorageTemp2"), F_(wwStorageTemp2), F_(degrees), output);
print_value_json(shell, F("exhaustTemp"), F_(exhaustTemp), F_(degrees), output);
print_value_json(shell, F("wWActivated"), F_(wWActivated), nullptr, output);
print_value_json(shell, F("wWOneTime"), F_(wWOneTime), nullptr, output);
print_value_json(shell, F("wWDisinfecting"), F_(wWDisinfecting), nullptr, output);
print_value_json(shell, F("wWCharging"), F_(wWCharging), nullptr, output);
print_value_json(shell, F("wWRecharging"), F_(wWRecharging), nullptr, output);
print_value_json(shell, F("wWTempOK"), F_(wWTempOK), nullptr, output);
print_value_json(shell, F("wWActive"), F_(wWActive), nullptr, output);
print_value_json(shell, F("burnGas"), F_(burnGas), nullptr, output);
print_value_json(shell, F("flameCurr"), F_(flameCurr), F_(uA), output);
print_value_json(shell, F("heatPump"), F_(heatPump), nullptr, output);
print_value_json(shell, F("fanWork"), F_(fanWork), nullptr, output);
print_value_json(shell, F("ignWork"), F_(ignWork), nullptr, output);
print_value_json(shell, F("wWHeat"), F_(wWHeat), nullptr, output);
print_value_json(shell, F("heatingActivated"), F_(heatingActivated), nullptr, output);
print_value_json(shell, F("heatingTemp"), F_(heatingTemp), F_(degrees), output);
print_value_json(shell, F("pumpModMax"), F_(pumpModMax), F_(percent), output);
print_value_json(shell, F("pumpModMin"), F_(pumpModMin), F_(percent), output);
print_value_json(shell, F("pumpDelay"), F_(pumpDelay), F_(min), output);
print_value_json(shell, F("burnMinPeriod"), F_(burnMinPeriod), F_(min), output);
print_value_json(shell, F("burnMinPower"), F_(burnMinPower), F_(percent), output);
print_value_json(shell, F("burnMaxPower"), F_(burnMaxPower), F_(percent), output);
print_value_json(shell, F("boilHystOn"), F_(boilHystOn), F_(degrees), output);
print_value_json(shell, F("boilHystOff"), F_(boilHystOff), F_(degrees), output);
print_value_json(shell, F("setFlowTemp"), F_(setFlowTemp), F_(degrees), output);
print_value_json(shell, F("wWSetPumpPower"), F_(wWSetPumpPower), F_(percent), output);
print_value_json(shell, F("wwMixTemperature"), F_(wwMixTemperature), F_(degrees), output);
print_value_json(shell, F("wwBufferBoilerTemperature"), F_(wwBufferBoilerTemperature), F_(degrees), output);
print_value_json(shell, F("wWStarts"), F_(wWStarts), nullptr, output);
print_value_json(shell, F("wWWorkM"), F_(wWWorkM), nullptr, output);
print_value_json(shell, F("setBurnPow"), F_(setBurnPow), F_(percent), output);
print_value_json(shell, F("burnStarts"), F_(burnStarts), nullptr, output);
print_value_json(shell, F("heatingActive"), nullptr, F_(heatingActive), nullptr, output);
print_value_json(shell, F("tapwaterActive"), nullptr, F_(tapwaterActive), nullptr, output);
print_value_json(shell, F("serviceCode"), nullptr, F_(serviceCode), nullptr, output);
print_value_json(shell, F("serviceCodeNumber"), nullptr, F_(serviceCodeNumber), nullptr, output);
print_value_json(shell, F("wWSelTemp"), nullptr, F_(wWSelTemp), F_(degrees), output);
print_value_json(shell, F("wWSetTemp"), nullptr, F_(wWSetTemp), F_(degrees), output);
print_value_json(shell, F("wWDisinfectionTemp"), nullptr, F_(wWDisinfectionTemp), F_(degrees), output);
print_value_json(shell, F("selFlowTemp"), nullptr, F_(selFlowTemp), F_(degrees), output);
print_value_json(shell, F("selBurnPow"), nullptr, F_(selBurnPow), F_(percent), output);
print_value_json(shell, F("curBurnPow"), nullptr, F_(curBurnPow), F_(percent), output);
print_value_json(shell, F("pumpMod"), nullptr, F_(pumpMod), F_(percent), output);
print_value_json(shell, F("pumpMod2"), nullptr, F_(pumpMod2), F_(percent), output);
print_value_json(shell, F("wWType"), nullptr, F_(wWType), nullptr, output);
print_value_json(shell, F("wWChargeType"), nullptr, F_(wWChargeType), nullptr, output);
print_value_json(shell, F("wWCircPump"), nullptr, F_(wWCircPump), nullptr, output);
print_value_json(shell, F("wWCircPumpMode"), nullptr, F_(wWCircPumpMode), nullptr, output);
print_value_json(shell, F("wWCirc"), nullptr, F_(wWCirc), nullptr, output);
print_value_json(shell, F("outdoorTemp"), nullptr, F_(outdoorTemp), F_(degrees), output);
print_value_json(shell, F("wWCurTemp"), nullptr, F_(wWCurTemp), F_(degrees), output);
print_value_json(shell, F("wWCurTemp2"), nullptr, F_(wWCurTemp2), F_(degrees), output);
print_value_json(shell, F("wWCurFlow"), nullptr, F_(wWCurFlow), F("l/min"), output);
print_value_json(shell, F("curFlowTemp"), nullptr, F_(curFlowTemp), F_(degrees), output);
print_value_json(shell, F("retTemp"), nullptr, F_(retTemp), F_(degrees), output);
print_value_json(shell, F("switchTemp"), nullptr, F_(switchTemp), F_(degrees), output);
print_value_json(shell, F("sysPress"), nullptr, F_(sysPress), nullptr, output);
print_value_json(shell, F("boilTemp"), nullptr, F_(boilTemp), F_(degrees), output);
print_value_json(shell, F("wwStorageTemp1"), nullptr, F_(wwStorageTemp1), F_(degrees), output);
print_value_json(shell, F("wwStorageTemp2"), nullptr, F_(wwStorageTemp2), F_(degrees), output);
print_value_json(shell, F("exhaustTemp"), nullptr, F_(exhaustTemp), F_(degrees), output);
print_value_json(shell, F("wWActivated"), nullptr, F_(wWActivated), nullptr, output);
print_value_json(shell, F("wWOneTime"), nullptr, F_(wWOneTime), nullptr, output);
print_value_json(shell, F("wWDisinfecting"), nullptr, F_(wWDisinfecting), nullptr, output);
print_value_json(shell, F("wWCharging"), nullptr, F_(wWCharging), nullptr, output);
print_value_json(shell, F("wWRecharging"), nullptr, F_(wWRecharging), nullptr, output);
print_value_json(shell, F("wWTempOK"), nullptr, F_(wWTempOK), nullptr, output);
print_value_json(shell, F("wWActive"), nullptr, F_(wWActive), nullptr, output);
print_value_json(shell, F("burnGas"), nullptr, F_(burnGas), nullptr, output);
print_value_json(shell, F("flameCurr"), nullptr, F_(flameCurr), F_(uA), output);
print_value_json(shell, F("heatPump"), nullptr, F_(heatPump), nullptr, output);
print_value_json(shell, F("fanWork"), nullptr, F_(fanWork), nullptr, output);
print_value_json(shell, F("ignWork"), nullptr, F_(ignWork), nullptr, output);
print_value_json(shell, F("wWHeat"), nullptr, F_(wWHeat), nullptr, output);
print_value_json(shell, F("heatingActivated"), nullptr, F_(heatingActivated), nullptr, output);
print_value_json(shell, F("heatingTemp"), nullptr, F_(heatingTemp), F_(degrees), output);
print_value_json(shell, F("pumpModMax"), nullptr, F_(pumpModMax), F_(percent), output);
print_value_json(shell, F("pumpModMin"), nullptr, F_(pumpModMin), F_(percent), output);
print_value_json(shell, F("pumpDelay"), nullptr, F_(pumpDelay), F_(min), output);
print_value_json(shell, F("burnMinPeriod"), nullptr, F_(burnMinPeriod), F_(min), output);
print_value_json(shell, F("burnMinPower"), nullptr, F_(burnMinPower), F_(percent), output);
print_value_json(shell, F("burnMaxPower"), nullptr, F_(burnMaxPower), F_(percent), output);
print_value_json(shell, F("boilHystOn"), nullptr, F_(boilHystOn), F_(degrees), output);
print_value_json(shell, F("boilHystOff"), nullptr, F_(boilHystOff), F_(degrees), output);
print_value_json(shell, F("setFlowTemp"), nullptr, F_(setFlowTemp), F_(degrees), output);
print_value_json(shell, F("wWSetPumpPower"), nullptr, F_(wWSetPumpPower), F_(percent), output);
print_value_json(shell, F("wwMixTemperature"), nullptr, F_(wwMixTemperature), F_(degrees), output);
print_value_json(shell, F("wwBufferBoilerTemperature"), nullptr, F_(wwBufferBoilerTemperature), F_(degrees), output);
print_value_json(shell, F("wWStarts"), nullptr, F_(wWStarts), nullptr, output);
print_value_json(shell, F("wWWorkM"), nullptr, F_(wWWorkM), nullptr, output);
print_value_json(shell, F("setBurnPow"), nullptr, F_(setBurnPow), F_(percent), output);
print_value_json(shell, F("burnStarts"), nullptr, F_(burnStarts), nullptr, output);
if (Helpers::hasValue(wWWorkM_)) {
shell.printfln(F(" Warm Water active time: %d days %d hours %d minutes"), wWWorkM_ / 1440, (wWWorkM_ % 1440) / 60, wWWorkM_ % 60);