From 1dea97f7cd8959d8089c7fe2015623b4621f742f Mon Sep 17 00:00:00 2001 From: Hermann Kraus Date: Thu, 12 Oct 2017 23:27:02 +0200 Subject: [PATCH] Rename topic from "energy" to "energy_delta". --- code/espurna/config/general.h | 2 +- code/espurna/power.ino | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 06d0ba17..e91068e1 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -429,7 +429,7 @@ PROGMEM const char* const custom_reset_string[] = { #define MQTT_TOPIC_POWER_APPARENT "apparent" #define MQTT_TOPIC_POWER_REACTIVE "reactive" #define MQTT_TOPIC_POWER_FACTOR "factor" -#define MQTT_TOPIC_ENERGY "energy" +#define MQTT_TOPIC_ENERGY_DELTA "energy_delta" #define MQTT_TOPIC_ENERGY_TOTAL "energy_total" // Light module diff --git a/code/espurna/power.ino b/code/espurna/power.ino index 8b70cb13..3be7cca0 100644 --- a/code/espurna/power.ino +++ b/code/espurna/power.ino @@ -201,7 +201,7 @@ void _powerReport() { { mqttSend(MQTT_TOPIC_CURRENT, buf_current); mqttSend(MQTT_TOPIC_POWER_APPARENT, String((int) _power_apparent).c_str()); - mqttSend(MQTT_TOPIC_ENERGY, buf_energy); + mqttSend(MQTT_TOPIC_ENERGY_DELTA, buf_energy); mqttSend(MQTT_TOPIC_ENERGY_TOTAL, buf_energy_total); #if POWER_HAS_ACTIVE mqttSend(MQTT_TOPIC_POWER_ACTIVE, String((int) _power_active).c_str()); @@ -230,7 +230,7 @@ void _powerReport() { if (influxdbEnabled()) { influxDBSend(MQTT_TOPIC_CURRENT, buf_current); influxDBSend(MQTT_TOPIC_POWER_APPARENT, String((int) _power_apparent).c_str()); - influxDBSend(MQTT_TOPIC_ENERGY, buf_energy); + influxDBSend(MQTT_TOPIC_ENERGY_DELTA, buf_energy); influxDBSend(MQTT_TOPIC_ENERGY_TOTAL, buf_energy_total); #if POWER_HAS_ACTIVE influxDBSend(MQTT_TOPIC_POWER_ACTIVE, String((int) _power_active).c_str());