mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
fixes to publish_time
This commit is contained in:
@@ -545,7 +545,6 @@ void publishEMSValues(bool force) {
|
|||||||
char s[20] = {0}; // for formatting strings
|
char s[20] = {0}; // for formatting strings
|
||||||
StaticJsonDocument<MQTT_MAX_PAYLOAD_SIZE> doc;
|
StaticJsonDocument<MQTT_MAX_PAYLOAD_SIZE> doc;
|
||||||
char data[MQTT_MAX_PAYLOAD_SIZE] = {0};
|
char data[MQTT_MAX_PAYLOAD_SIZE] = {0};
|
||||||
uint8_t jsonSize;
|
|
||||||
|
|
||||||
static uint8_t last_boilerActive = 0xFF; // for remembering last setting of the tap water or heating on/off
|
static uint8_t last_boilerActive = 0xFF; // for remembering last setting of the tap water or heating on/off
|
||||||
|
|
||||||
@@ -1924,12 +1923,14 @@ void loop() {
|
|||||||
ds18.loop();
|
ds18.loop();
|
||||||
}
|
}
|
||||||
|
|
||||||
// publish EMS data to MQTT
|
// publish EMS data to MQTT, only if in automatic mode (publish_time=0) otherwise it'll use the timer
|
||||||
// because of the force=false argument, it will see if there is anything received that must be published
|
if (EMSESP_Settings.publish_time == 0) {
|
||||||
publishEMSValues(false);
|
publishEMSValues(false);
|
||||||
|
}
|
||||||
|
|
||||||
// if we have an EMS connect go and fetch some data and MQTT publish it
|
// if we have an EMS connect go and fetch some data and MQTT publish it
|
||||||
if (_need_first_publish) {
|
if (_need_first_publish) {
|
||||||
|
publishEMSValues(false);
|
||||||
publishSensorValues();
|
publishSensorValues();
|
||||||
_need_first_publish = false; // reset flag
|
_need_first_publish = false; // reset flag
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define APP_VERSION "1.9.5b1"
|
#define APP_VERSION "1.9.5b2"
|
||||||
|
|||||||
Reference in New Issue
Block a user