Browse Source

Report color on hearbeat (#128)

fastled
Xose Pérez 7 years ago
parent
commit
ed2671b73b
2 changed files with 6 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/general.h
  2. +5
    -0
      code/espurna/espurna.ino

+ 1
- 0
code/espurna/config/general.h View File

@ -194,6 +194,7 @@
#define MQTT_REPORT_FREEHEAP 1 #define MQTT_REPORT_FREEHEAP 1
#define MQTT_REPORT_VCC 1 #define MQTT_REPORT_VCC 1
#define MQTT_REPORT_RELAY 1 #define MQTT_REPORT_RELAY 1
#define MQTT_REPORT_COLOR 1
#define MQTT_REPORT_HOSTNAME 1 #define MQTT_REPORT_HOSTNAME 1
#define MQTT_REPORT_APP 1 #define MQTT_REPORT_APP 1
#define MQTT_REPORT_VERSION 1 #define MQTT_REPORT_VERSION 1


+ 5
- 0
code/espurna/espurna.ino View File

@ -81,6 +81,11 @@ void heartbeat() {
#if (MQTT_REPORT_RELAY) #if (MQTT_REPORT_RELAY)
relayMQTT(); relayMQTT();
#endif #endif
#if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE
#if (MQTT_REPORT_COLOR)
mqttSend(MQTT_TOPIC_COLOR, lightColor().c_str());
#endif
#endif
#if (MQTT_REPORT_VCC) #if (MQTT_REPORT_VCC)
#if ENABLE_ADC_VCC #if ENABLE_ADC_VCC
mqttSend(MQTT_TOPIC_VCC, String(ESP.getVcc()).c_str()); mqttSend(MQTT_TOPIC_VCC, String(ESP.getVcc()).c_str());


Loading…
Cancel
Save