Skip to content

Commit

Permalink
Send Vcc, LoadAvg and Ssid to influxdb (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucciano authored and mcspr committed May 11, 2019
1 parent 820d8c4 commit 55b9f2a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions code/espurna/utils.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
Expand Down

0 comments on commit 55b9f2a

Please sign in to comment.