Browse Source

Rename topic from "energy" to "energy_delta".

fastled
Hermann Kraus 7 years ago
parent
commit
1dea97f7cd
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      code/espurna/config/general.h
  2. +2
    -2
      code/espurna/power.ino

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

@ -429,7 +429,7 @@ PROGMEM const char* const custom_reset_string[] = {
#define MQTT_TOPIC_POWER_APPARENT "apparent" #define MQTT_TOPIC_POWER_APPARENT "apparent"
#define MQTT_TOPIC_POWER_REACTIVE "reactive" #define MQTT_TOPIC_POWER_REACTIVE "reactive"
#define MQTT_TOPIC_POWER_FACTOR "factor" #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" #define MQTT_TOPIC_ENERGY_TOTAL "energy_total"
// Light module // Light module


+ 2
- 2
code/espurna/power.ino View File

@ -201,7 +201,7 @@ void _powerReport() {
{ {
mqttSend(MQTT_TOPIC_CURRENT, buf_current); mqttSend(MQTT_TOPIC_CURRENT, buf_current);
mqttSend(MQTT_TOPIC_POWER_APPARENT, String((int) _power_apparent).c_str()); 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); mqttSend(MQTT_TOPIC_ENERGY_TOTAL, buf_energy_total);
#if POWER_HAS_ACTIVE #if POWER_HAS_ACTIVE
mqttSend(MQTT_TOPIC_POWER_ACTIVE, String((int) _power_active).c_str()); mqttSend(MQTT_TOPIC_POWER_ACTIVE, String((int) _power_active).c_str());
@ -230,7 +230,7 @@ void _powerReport() {
if (influxdbEnabled()) { if (influxdbEnabled()) {
influxDBSend(MQTT_TOPIC_CURRENT, buf_current); influxDBSend(MQTT_TOPIC_CURRENT, buf_current);
influxDBSend(MQTT_TOPIC_POWER_APPARENT, String((int) _power_apparent).c_str()); 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); influxDBSend(MQTT_TOPIC_ENERGY_TOTAL, buf_energy_total);
#if POWER_HAS_ACTIVE #if POWER_HAS_ACTIVE
influxDBSend(MQTT_TOPIC_POWER_ACTIVE, String((int) _power_active).c_str()); influxDBSend(MQTT_TOPIC_POWER_ACTIVE, String((int) _power_active).c_str());


Loading…
Cancel
Save