|
@ -59,19 +59,22 @@ void hardwareLoop() { |
|
|
DEBUG_MSG("[MAIN] Power: %d mV\n", ESP.getVcc()); |
|
|
DEBUG_MSG("[MAIN] Power: %d mV\n", ESP.getVcc()); |
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
#if (MQTT_REPORTS | MQTT_STATUS_REPORT)
|
|
|
|
|
|
|
|
|
#if (MQTT_REPORTS & MQTT_STATUS_REPORT)
|
|
|
mqttSend(MQTT_STATUS_TOPIC, "1"); |
|
|
mqttSend(MQTT_STATUS_TOPIC, "1"); |
|
|
#endif
|
|
|
#endif
|
|
|
#if (MQTT_REPORTS | MQTT_IP_REPORT)
|
|
|
|
|
|
|
|
|
#if (MQTT_REPORTS & MQTT_IP_REPORT)
|
|
|
mqttSend(MQTT_IP_TOPIC, getIP().c_str()); |
|
|
mqttSend(MQTT_IP_TOPIC, getIP().c_str()); |
|
|
#endif
|
|
|
#endif
|
|
|
#if (MQTT_REPORTS | MQTT_UPTIME_REPORT)
|
|
|
|
|
|
|
|
|
#if (MQTT_REPORTS & MQTT_UPTIME_REPORT)
|
|
|
mqttSend(MQTT_UPTIME_TOPIC, String(uptime_seconds).c_str()); |
|
|
mqttSend(MQTT_UPTIME_TOPIC, String(uptime_seconds).c_str()); |
|
|
#endif
|
|
|
#endif
|
|
|
#if (MQTT_REPORTS | MQTT_FREEHEAP_REPORT)
|
|
|
|
|
|
|
|
|
#if (MQTT_REPORTS & MQTT_FREEHEAP_REPORT)
|
|
|
mqttSend(MQTT_FREEHEAP_TOPIC, String(ESP.getFreeHeap()).c_str()); |
|
|
mqttSend(MQTT_FREEHEAP_TOPIC, String(ESP.getFreeHeap()).c_str()); |
|
|
#endif
|
|
|
#endif
|
|
|
#if (MQTT_REPORTS | MQTT_VCC_REPORT)
|
|
|
|
|
|
|
|
|
#if (MQTT_REPORTS & MQTT_RELAY_REPORT)
|
|
|
|
|
|
relayMQTT(); |
|
|
|
|
|
#endif
|
|
|
|
|
|
#if (MQTT_REPORTS & MQTT_VCC_REPORT)
|
|
|
#if ENABLE_ADC_VCC
|
|
|
#if ENABLE_ADC_VCC
|
|
|
mqttSend(MQTT_VCC_TOPIC, String(ESP.getVcc()).c_str()); |
|
|
mqttSend(MQTT_VCC_TOPIC, String(ESP.getVcc()).c_str()); |
|
|
#endif
|
|
|
#endif
|
|
|