diff --git a/CHANGELOG.md b/CHANGELOG.md index b2776016c..d1b44f07d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file. - Prometheus: All metrics are prefixed with ``tasmota_`` (#12842) Memory metrics have been cleaned up to work consistently between ESP8266 and ESP32 The device name is reported as an info metric +- Show power status in state message always with power index number like ``POWER1`` ### Fixed - Neopool communication error (#12813) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 7d4304165..c3cc5e998 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -133,6 +133,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo - Disable PSRAM on unsupported hardware - ESP32 remove GPIO initialization to INPUT from not used GPIOs to allow JTAG support - Relax NTP poll if no ntpserver can be resolved by DNS +- Show power status in state message always with power index number like ``POWER1`` - Make Sonoff L1 MusicSync persistent [#12008](https://github.com/arendst/Tasmota/issues/12008) - Simplified configuration for ir-full and removal of tasmota-ircustom [#12428](https://github.com/arendst/Tasmota/issues/12428) - Refactor platformio [#12442](https://github.com/arendst/Tasmota/issues/12442) diff --git a/tasmota/support_tasmota.ino b/tasmota/support_tasmota.ino index 22bb3a136..d45a9bf3d 100644 --- a/tasmota/support_tasmota.ino +++ b/tasmota/support_tasmota.ino @@ -753,7 +753,7 @@ void MqttShowState(void) if (i == LightDevice()) { ResponseLightState(1); } // call it only once } else { #endif - ResponseAppend_P(PSTR(",\"%s\":\"%s\""), GetPowerDevice(stemp1, i, sizeof(stemp1), Settings->flag.device_index_enable), // SetOption26 - Switch between POWER or POWER1 + ResponseAppend_P(PSTR(",\"%s\":\"%s\""), GetPowerDevice(stemp1, i, sizeof(stemp1), 1), // SetOption26 - Switch between POWER or POWER1 GetStateText(bitRead(TasmotaGlobal.power, i-1))); #ifdef USE_SONOFF_IFAN if (IsModuleIfan()) { diff --git a/tasmota/xdrv_59_influxdb.ino b/tasmota/xdrv_59_influxdb.ino index 201b76c3b..6890995d7 100644 --- a/tasmota/xdrv_59_influxdb.ino +++ b/tasmota/xdrv_59_influxdb.ino @@ -39,6 +39,11 @@ * IfxToken - Set Influxdb v2 and token * * Set influxdb update interval with command teleperiod + * + * The following triggers result in automatic influxdb numeric feeds without appended time: + * - this driver initiated state message + * - this driver initiated teleperiod data + * - power commands \*********************************************************************************************/ #define XDRV_59 59 @@ -361,10 +366,18 @@ void InfluxDbLoop(void) { } } } else { + + // {"Time":"2021-08-14T17:19:33","Uptime":"0T00:24:09","UptimeSec":1449,"Heap":29,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"ON","Wifi":{"AP":1,"SSId":"indebuurt_IoT","BSSId":"98:38:C9:CA:17:C1","Channel":11,"Mode":"11n","RSSI":100,"Signal":-44,"LinkCount":1,"Downtime":"0T00:00:03"}} + ResponseClear(); + MqttShowState(); // Pull state data + InfluxDbProcessJson(); + + // {"Time":"2021-08-14T17:19:33","Switch1":"ON","Switch2":"OFF","ANALOG":{"Temperature":184.72},"DS18B20":{"Id":"01144A0CB2AA","Temperature":27.50},"HTU21":{"Temperature":28.23,"Humidity":39.7,"DewPoint":13.20},"Global":{"Temperature":27.50,"Humidity":39.7,"DewPoint":12.55},"TempUnit":"C"} ResponseClear(); if (MqttShowSensor()) { // Pull sensor data InfluxDbProcessJson(); }; + } } }