mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-06-16 21:06:31 +03:00
Compare commits
11 Commits
24ae72a7d1
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8a63aeac6 | ||
|
|
908a9ebbfc | ||
|
|
dbf970d869 | ||
|
|
9cb2455af2 | ||
|
|
f99ca7f013 | ||
|
|
7349bc9ebf | ||
|
|
ccd3a7b223 | ||
|
|
33602f65f3 | ||
|
|
1ae547a710 | ||
|
|
70cfbd96e2 | ||
|
|
b441fd83dd |
@@ -88,34 +88,6 @@ def bin_copy(source, target, env):
|
|||||||
print(f"MD5: {md5_hash}")
|
print(f"MD5: {md5_hash}")
|
||||||
md5_file.write_text(md5_hash)
|
md5_file.write_text(md5_hash)
|
||||||
|
|
||||||
# Make a copy using the old 3.6.x filename format for backwards compatibility
|
|
||||||
# Note: there is a chance newer E32V2s (which use the 16MB partition table and PSRAM)
|
|
||||||
# are running a custom build of the 3.6.5 firmware as 3.6.5 was released before
|
|
||||||
# production of the gateway board. Updating via the WebUI will break the system
|
|
||||||
# and require a manual update.
|
|
||||||
|
|
||||||
pio_env = env.get('PIOENV', '')
|
|
||||||
extra_variant = None
|
|
||||||
|
|
||||||
if pio_env == "s3_16M_P":
|
|
||||||
extra_variant = f"EMS-ESP-{app_version.replace('.', '_')}-ESP32_S3"
|
|
||||||
elif pio_env == "s_4M":
|
|
||||||
extra_variant = f"EMS-ESP-{app_version.replace('.', '_')}-ESP32"
|
|
||||||
|
|
||||||
if extra_variant:
|
|
||||||
extra_bin_file = firmware_dir / f"{extra_variant}.bin"
|
|
||||||
extra_md5_file = firmware_dir / f"{extra_variant}.md5"
|
|
||||||
|
|
||||||
# Remove existing files if they exist
|
|
||||||
for file_path in [extra_bin_file, extra_md5_file]:
|
|
||||||
if file_path.exists():
|
|
||||||
file_path.unlink()
|
|
||||||
|
|
||||||
# Copy files
|
|
||||||
shutil.copy2(str(bin_file), str(extra_bin_file))
|
|
||||||
shutil.copy2(str(md5_file), str(extra_md5_file))
|
|
||||||
print(f"Filename copy for 3.6.x: {extra_bin_file}")
|
|
||||||
|
|
||||||
print("=" * 90)
|
print("=" * 90)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1864,16 +1864,9 @@ void EMSESP::loop() {
|
|||||||
webLogService.loop(); // log in Web UI
|
webLogService.loop(); // log in Web UI
|
||||||
|
|
||||||
// run the loop, unless we're in the middle of an OTA upload
|
// run the loop, unless we're in the middle of an OTA upload
|
||||||
if (EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_NORMAL || EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_INVALID_GPIO) {
|
// if (EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_NORMAL || EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_INVALID_GPIO) {
|
||||||
// check for GPIO Errors - this is called once when booting
|
if (EMSESP::system_.systemStatus() != SYSTEM_STATUS::SYSTEM_STATUS_PENDING_UPLOAD
|
||||||
if (EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_INVALID_GPIO) {
|
&& EMSESP::system_.systemStatus() != SYSTEM_STATUS::SYSTEM_STATUS_UPLOADING) {
|
||||||
static bool only_once = false;
|
|
||||||
if (!only_once) {
|
|
||||||
LOG_ERROR("Invalid GPIOs used. Please check your settings and the system log");
|
|
||||||
only_once = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// loop through the services
|
// loop through the services
|
||||||
rxservice_.loop(); // process any incoming Rx telegrams
|
rxservice_.loop(); // process any incoming Rx telegrams
|
||||||
shower_.loop(); // check for shower on/off
|
shower_.loop(); // check for shower on/off
|
||||||
@@ -1887,6 +1880,14 @@ void EMSESP::loop() {
|
|||||||
}
|
}
|
||||||
scheduled_fetch_values(); // force a query on the EMS devices to fetch latest data at a set interval (1 min)
|
scheduled_fetch_values(); // force a query on the EMS devices to fetch latest data at a set interval (1 min)
|
||||||
}
|
}
|
||||||
|
// check for GPIO Errors - this is called once when booting
|
||||||
|
if (EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_INVALID_GPIO) {
|
||||||
|
static bool only_once = false;
|
||||||
|
if (!only_once) {
|
||||||
|
LOG_ERROR("Invalid GPIOs used. Please check your settings and the system log");
|
||||||
|
only_once = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_PENDING_UPLOAD) {
|
if (EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_PENDING_UPLOAD) {
|
||||||
// start an upload from a URL, assuming the URL exists and set from a previous pass
|
// start an upload from a URL, assuming the URL exists and set from a previous pass
|
||||||
@@ -1899,6 +1900,17 @@ void EMSESP::loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// reset status after 5 Minutes
|
||||||
|
if (EMSESP::system_.systemStatus() != SYSTEM_STATUS::SYSTEM_STATUS_NORMAL) {
|
||||||
|
static uint32_t starttime = 0;
|
||||||
|
if (starttime == 0) {
|
||||||
|
starttime = uuid::get_uptime_ms();
|
||||||
|
} else if (uuid::get_uptime_ms() - starttime > 300000) {
|
||||||
|
starttime = 0;
|
||||||
|
EMSESP::system_.systemStatus(SYSTEM_STATUS::SYSTEM_STATUS_NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// telnet service
|
// telnet service
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
if (system_.telnet_enabled()) {
|
if (system_.telnet_enabled()) {
|
||||||
|
|||||||
@@ -4189,7 +4189,7 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co
|
|||||||
if (model == EMSdevice::EMS_DEVICE_FLAG_CR120 && mode_ == HeatingCircuit::Mode::MANUAL) {
|
if (model == EMSdevice::EMS_DEVICE_FLAG_CR120 && mode_ == HeatingCircuit::Mode::MANUAL) {
|
||||||
offset = 22; // manual offset CR120
|
offset = 22; // manual offset CR120
|
||||||
} else if (mode_ == HeatingCircuit::Mode::MANUAL) {
|
} else if (mode_ == HeatingCircuit::Mode::MANUAL) {
|
||||||
offset = 10; // manual offset
|
offset = hc->hpoperatingstate == 2 ? 17 : 10; // cooling or manual offset
|
||||||
} else {
|
} else {
|
||||||
offset = 8; // auto offset
|
offset = 8; // auto offset
|
||||||
// special case to reactivate auto temperature, see #737, #746
|
// special case to reactivate auto temperature, see #737, #746
|
||||||
|
|||||||
@@ -177,6 +177,10 @@ void WebStatusService::systemStatus(AsyncWebServerRequest * request) {
|
|||||||
// we're ready to do the actual restart ASAP
|
// we're ready to do the actual restart ASAP
|
||||||
EMSESP::system_.systemStatus(SYSTEM_STATUS::SYSTEM_STATUS_RESTART_REQUESTED);
|
EMSESP::system_.systemStatus(SYSTEM_STATUS::SYSTEM_STATUS_RESTART_REQUESTED);
|
||||||
}
|
}
|
||||||
|
if (EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_ERROR_UPLOAD) {
|
||||||
|
// error is reported, back to normal state
|
||||||
|
EMSESP::system_.systemStatus(SYSTEM_STATUS::SYSTEM_STATUS_NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user