rename stats to data

This commit is contained in:
Paul
2020-01-19 14:54:20 +01:00
parent cd84881769
commit cdb12e99e0

View File

@@ -212,13 +212,11 @@ _EMS_THERMOSTAT_MODE _getThermostatDayMode(uint8_t hc_num) {
return thermoMode; return thermoMode;
} }
// Info - display stats on an 'info' command // Info - display status and data on an 'info' command
void showInfo() { void showInfo() {
// General stats from EMS bus
static char buffer_type[128] = {0}; static char buffer_type[128] = {0};
myDebug_P(PSTR("%sEMS-ESP system stats:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF); myDebug_P(PSTR("%sEMS-ESP system status:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF);
_EMS_SYS_LOGGING sysLog = ems_getLogging(); _EMS_SYS_LOGGING sysLog = ems_getLogging();
if (sysLog == EMS_SYS_LOGGING_BASIC) { if (sysLog == EMS_SYS_LOGGING_BASIC) {
myDebug_P(PSTR(" System logging set to Basic")); myDebug_P(PSTR(" System logging set to Basic"));
@@ -251,7 +249,7 @@ void showInfo() {
((EMSESP_Settings.shower_timer) ? "enabled" : "disabled"), ((EMSESP_Settings.shower_timer) ? "enabled" : "disabled"),
((EMSESP_Settings.shower_alert) ? "enabled" : "disabled")); ((EMSESP_Settings.shower_alert) ? "enabled" : "disabled"));
myDebug_P(PSTR("\n%sEMS Bus stats:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF); myDebug_P(PSTR("\n%sEMS Bus status:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF);
if (ems_getBusConnected()) { if (ems_getBusConnected()) {
myDebug_P(PSTR(" Bus is connected, protocol: %s"), (ems_isHT3() ? "HT3" : "Buderus")); myDebug_P(PSTR(" Bus is connected, protocol: %s"), (ems_isHT3() ? "HT3" : "Buderus"));
@@ -271,14 +269,13 @@ void showInfo() {
myDebug_P(PSTR("")); myDebug_P(PSTR(""));
// show boiler stats if connected // show boiler data if connected
if (ems_getBoilerEnabled()) { if (ems_getBoilerEnabled()) {
myDebug_P(PSTR("%sBoiler stats:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF); myDebug_P(PSTR("%sBoiler data:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF);
// version details // version details
myDebug_P(PSTR(" Boiler: %s"), ems_getDeviceDescription(EMS_DEVICE_TYPE_BOILER, buffer_type)); myDebug_P(PSTR(" Boiler: %s"), ems_getDeviceDescription(EMS_DEVICE_TYPE_BOILER, buffer_type));
// active stats
if (ems_getBusConnected()) { if (ems_getBusConnected()) {
if (EMS_Boiler.tapwaterActive != EMS_VALUE_INT_NOTSET) { if (EMS_Boiler.tapwaterActive != EMS_VALUE_INT_NOTSET) {
myDebug_P(PSTR(" Hot tap water: %s"), EMS_Boiler.tapwaterActive ? "running" : "off"); myDebug_P(PSTR(" Hot tap water: %s"), EMS_Boiler.tapwaterActive ? "running" : "off");
@@ -370,7 +367,7 @@ void showInfo() {
// For SM10/SM100/SM200 Solar Module // For SM10/SM100/SM200 Solar Module
if (ems_getSolarModuleEnabled()) { if (ems_getSolarModuleEnabled()) {
myDebug_P(PSTR("")); // newline myDebug_P(PSTR("")); // newline
myDebug_P(PSTR("%sSolar Module stats:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF); myDebug_P(PSTR("%sSolar Module data:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF);
myDebug_P(PSTR(" Solar module: %s"), ems_getDeviceDescription(EMS_DEVICE_TYPE_SOLAR, buffer_type)); myDebug_P(PSTR(" Solar module: %s"), ems_getDeviceDescription(EMS_DEVICE_TYPE_SOLAR, buffer_type));
_renderShortValue("Collector temperature", "C", EMS_SolarModule.collectorTemp); _renderShortValue("Collector temperature", "C", EMS_SolarModule.collectorTemp);
_renderShortValue("Bottom temperature", "C", EMS_SolarModule.bottomTemp); _renderShortValue("Bottom temperature", "C", EMS_SolarModule.bottomTemp);
@@ -390,16 +387,16 @@ void showInfo() {
// For HeatPumps // For HeatPumps
if (ems_getHeatPumpEnabled()) { if (ems_getHeatPumpEnabled()) {
myDebug_P(PSTR("")); // newline myDebug_P(PSTR("")); // newline
myDebug_P(PSTR("%sHeat Pump stats:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF); myDebug_P(PSTR("%sHeat Pump data:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF);
myDebug_P(PSTR(" Heat Pump module: %s"), ems_getDeviceDescription(EMS_DEVICE_TYPE_HEATPUMP, buffer_type)); myDebug_P(PSTR(" Heat Pump module: %s"), ems_getDeviceDescription(EMS_DEVICE_TYPE_HEATPUMP, buffer_type));
_renderIntValue("Pump modulation", "%", EMS_HeatPump.HPModulation); _renderIntValue("Pump modulation", "%", EMS_HeatPump.HPModulation);
_renderIntValue("Pump speed", "%", EMS_HeatPump.HPSpeed); _renderIntValue("Pump speed", "%", EMS_HeatPump.HPSpeed);
} }
// Thermostat stats // Thermostat data
if (ems_getThermostatEnabled()) { if (ems_getThermostatEnabled()) {
myDebug_P(PSTR("")); // newline myDebug_P(PSTR("")); // newline
myDebug_P(PSTR("%sThermostat stats:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF); myDebug_P(PSTR("%sThermostat data:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF);
myDebug_P(PSTR(" Thermostat: %s"), ems_getDeviceDescription(EMS_DEVICE_TYPE_THERMOSTAT, buffer_type, false)); myDebug_P(PSTR(" Thermostat: %s"), ems_getDeviceDescription(EMS_DEVICE_TYPE_THERMOSTAT, buffer_type, false));
// Render Thermostat Date & Time // Render Thermostat Date & Time
@@ -475,7 +472,7 @@ void showInfo() {
// Mixing modules sensors // Mixing modules sensors
if (ems_getMixingDeviceEnabled()) { if (ems_getMixingDeviceEnabled()) {
myDebug_P(PSTR("")); // newline myDebug_P(PSTR("")); // newline
myDebug_P(PSTR("%sMixing module stats:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF); myDebug_P(PSTR("%sMixing module data:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF);
_renderUShortValue("Switch temperature", "C", EMS_Boiler.switchTemp); _renderUShortValue("Switch temperature", "C", EMS_Boiler.switchTemp);
for (uint8_t hc_num = 1; hc_num <= EMS_THERMOSTAT_MAXHC; hc_num++) { for (uint8_t hc_num = 1; hc_num <= EMS_THERMOSTAT_MAXHC; hc_num++) {
@@ -964,6 +961,11 @@ bool LoadSaveCallback(MYESP_FSACTION_t action, JsonObject settings) {
EMSESP_Settings.shower_alert = settings["shower_alert"]; EMSESP_Settings.shower_alert = settings["shower_alert"];
EMSESP_Settings.publish_time = settings["publish_time"] | DEFAULT_PUBLISHTIME; EMSESP_Settings.publish_time = settings["publish_time"] | DEFAULT_PUBLISHTIME;
// can't be 0 which could be the case coming from earlier builds < 1.9.5b12
if (EMSESP_Settings.publish_time == 0) {
EMSESP_Settings.publish_time = DEFAULT_PUBLISHTIME;
}
EMSESP_Settings.listen_mode = settings["listen_mode"]; EMSESP_Settings.listen_mode = settings["listen_mode"];
ems_setTxDisabled(EMSESP_Settings.listen_mode); ems_setTxDisabled(EMSESP_Settings.listen_mode);
@@ -1978,7 +1980,7 @@ void setup() {
void loop() { void loop() {
myESP.loop(); // handle telnet, mqtt, wifi etc myESP.loop(); // handle telnet, mqtt, wifi etc
// check Dallas sensors, using same schedule as publish_time (default 2 mins in DS18_READ_INTERVAL) // Dallas sensors which are polled every 2 seconds (see DS18_READ_INTERVAL)
if (EMSESP_Settings.dallas_sensors) { if (EMSESP_Settings.dallas_sensors) {
ds18.loop(); ds18.loop();
} }