From 55b9f2a52f9fc5a225ae4880d15893d15161209f Mon Sep 17 00:00:00 2001 From: Luciano Andrade Date: Sat, 11 May 2019 16:03:29 -0300 Subject: [PATCH] Send Vcc, LoadAvg and Ssid to influxdb (#1714) --- code/espurna/utils.ino | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/espurna/utils.ino b/code/espurna/utils.ino index 3067f45f25..11e6f974d2 100644 --- a/code/espurna/utils.ino +++ b/code/espurna/utils.ino @@ -331,6 +331,15 @@ void heartbeat() { if (hb_cfg & Heartbeat::Rssi) idbSend(MQTT_TOPIC_RSSI, String(WiFi.RSSI()).c_str()); + + if ((hb_cfg & Heartbeat::Vcc) && (ADC_MODE_VALUE == ADC_VCC)) + idbSend(MQTT_TOPIC_VCC, String(ESP.getVcc()).c_str()); + + if (hb_cfg & Heartbeat::Loadavg) + idbSend(MQTT_TOPIC_LOADAVG, String(systemLoadAverage()).c_str()); + + if (hb_cfg & Heartbeat::Ssid) + idbSend(MQTT_TOPIC_SSID, WiFi.SSID().c_str()); #endif }