Browse Source

Add RSSI report

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

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

@ -158,6 +158,7 @@
#define MQTT_TOPIC_VCC "/vcc"
#define MQTT_TOPIC_STATUS "/status"
#define MQTT_TOPIC_MAC "/mac"
#define MQTT_TOPIC_RSSI "/rssi"
#define MQTT_TOPIC_APP "/app"
#define MQTT_TOPIC_INTERVAL "/interval"
#define MQTT_TOPIC_HOSTNAME "/hostname"
@ -166,6 +167,7 @@
#define MQTT_REPORT_STATUS 1
#define MQTT_REPORT_IP 1
#define MQTT_REPORT_MAC 1
#define MQTT_REPORT_RSSI 1
#define MQTT_REPORT_UPTIME 1
#define MQTT_REPORT_FREEHEAP 1
#define MQTT_REPORT_VCC 1


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

@ -69,6 +69,9 @@ void heartbeat() {
#if (MQTT_REPORT_MAC)
mqttSend(MQTT_TOPIC_MAC, WiFi.macAddress().c_str());
#endif
#if (MQTT_REPORT_RSSI)
mqttSend(MQTT_TOPIC_RSSI, String(WiFi.RSSI()).c_str());
#endif
#if (MQTT_REPORT_UPTIME)
mqttSend(MQTT_TOPIC_UPTIME, String(uptime_seconds).c_str());
#endif


Loading…
Cancel
Save