mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-03 15:04:17 +01:00
Merge pull request #706 from mcspr/mqtt-heartbeat-board
Add 'board' to the MQTT heartbeat
This commit is contained in:
@@ -181,6 +181,7 @@
|
||||
#define HEARTBEAT_REPORT_HOSTNAME 1
|
||||
#define HEARTBEAT_REPORT_APP 1
|
||||
#define HEARTBEAT_REPORT_VERSION 1
|
||||
#define HEARTBEAT_REPORT_BOARD 1
|
||||
#define HEARTBEAT_REPORT_INTERVAL 0
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -617,6 +618,7 @@ PROGMEM const char* const custom_reset_string[] = {
|
||||
#define MQTT_TOPIC_UARTIN "uartin"
|
||||
#define MQTT_TOPIC_UARTOUT "uartout"
|
||||
#define MQTT_TOPIC_LOADAVG "loadavg"
|
||||
#define MQTT_TOPIC_BOARD "board"
|
||||
|
||||
// Light module
|
||||
#define MQTT_TOPIC_CHANNEL "channel"
|
||||
|
||||
@@ -137,6 +137,9 @@ void heartbeat() {
|
||||
#if (HEARTBEAT_REPORT_VERSION)
|
||||
mqttSend(MQTT_TOPIC_VERSION, APP_VERSION);
|
||||
#endif
|
||||
#if (HEARTBEAT_REPORT_BOARD)
|
||||
mqttSend(MQTT_TOPIC_BOARD, getBoardName().c_str());
|
||||
#endif
|
||||
#if (HEARTBEAT_REPORT_HOSTNAME)
|
||||
mqttSend(MQTT_TOPIC_HOSTNAME, getSetting("hostname").c_str());
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user