Export current entry temperatures as metrics

This commit is contained in:
2025-10-24 16:19:49 +02:00
parent e8c62a1bd7
commit 524d94c515
4 changed files with 42 additions and 13 deletions

View File

@ -254,6 +254,31 @@ void taskMetrics(void *pvParameters)
aMetrics[u16MetricCounter].u8MetricValue = getControlState();
u16MetricCounter++;
// Control Current Weekday
strcpy(aMetrics[u16MetricCounter].caMetricName, "control_current_weekday");
aMetrics[u16MetricCounter].type = INTEGER_U8;
aMetrics[u16MetricCounter].u8MetricValue = getControlCurrentWeekday();
u16MetricCounter++;
// Control Current Entry Time
strcpy(aMetrics[u16MetricCounter].caMetricName, "control_current_entry_time");
aMetrics[u16MetricCounter].type = INTEGER_64;
int64_t i64SecondsSinceMidnight = (getControlCurrentTemperatureEntry().timestamp.hour * 60U * 60U) + (getControlCurrentTemperatureEntry().timestamp.minute * 60U);
aMetrics[u16MetricCounter].i64MetricValue = i64SecondsSinceMidnight;
u16MetricCounter++;
// Control Current Entry Chamber Temperature
strcpy(aMetrics[u16MetricCounter].caMetricName, "control_current_entry_chamber_temperature");
aMetrics[u16MetricCounter].type = FLOAT;
aMetrics[u16MetricCounter].fMetricValue = getControlCurrentTemperatureEntry().fChamberTemperature;
u16MetricCounter++;
// Control Current Entry Return Flow Temperature
strcpy(aMetrics[u16MetricCounter].caMetricName, "control_current_entry_return_flow_temperature");
aMetrics[u16MetricCounter].type = FLOAT;
aMetrics[u16MetricCounter].fMetricValue = getControlCurrentTemperatureEntry().fReturnFlowTemperature;
u16MetricCounter++;
// SNTP State
strcpy(aMetrics[u16MetricCounter].caMetricName, "sntp_state");
aMetrics[u16MetricCounter].type = INTEGER_U8;