diff --git a/src/console.cpp b/src/console.cpp index cc8be210c..06fd98aba 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -346,6 +346,7 @@ static void setup_commands(std::shared_ptr & commands) { return StateUpdateResult::CHANGED; }, "local"); + to_app(shell).uart_init(); }); // diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index a0ac01871..ceebb5e36 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -1149,8 +1149,8 @@ void Boiler::process_UBAFactory(std::shared_ptr telegram) { void Boiler::process_UBAMonitorFast(std::shared_ptr telegram) { has_update(telegram, selFlowTemp_, 0); has_update(telegram, curFlowTemp_, 1); - has_update(telegram, selBurnPow_, 3); // burn power max setting - has_update(telegram, curBurnPow_, 4); + // has_update(telegram, selBurnPow_, 3); // burn power max setting + // has_update(telegram, curBurnPow_, 4); has_update(telegram, boilerState_, 5); // bits 0-heat, 1-dhw, 2-service, 3-flame, 4-preheat, 5-lock-Err, 6-block-err, 7-maint has_bitupdate(telegram, burnGas_, 7, 0); has_bitupdate(telegram, burnGas2_, 7, 1); @@ -1184,7 +1184,20 @@ void Boiler::process_UBAMonitorFast(std::shared_ptr telegram) { has_update(telegram, serviceCodeNumber_, 20); - if (telegram->offset <= 4 && telegram->offset + telegram->message_length > 5) { + if (telegram->offset <= 3 && telegram->offset + telegram->message_length > 7) { + // some boiler only switch burnGas and have no other burner values, https://github.com/emsesp/EMS-ESP32/discussions/1483 + uint8_t selBurnPow = selBurnPow_; + uint8_t curBurnPow = curBurnPow_; + telegram->read_value(selBurnPow, 3); + telegram->read_value(curBurnPow, 4); + if (burnGas_ && selBurnPow == 0 && curBurnPow == 0) { + boilerState_ |= 0x08; // set flame signal + curBurnPow = 100; + selBurnPow = 100; + } + has_update(selBurnPow_, selBurnPow); + has_update(curBurnPow_, curBurnPow); + check_active(); // do a quick check to see if the hot water or heating is active } } @@ -1309,7 +1322,7 @@ void Boiler::process_UBAMonitorFastPlus(std::shared_ptr telegram uint8_t syspress = sysPress_; telegram->read_value(syspress, 21); // 0 means no sensor if (syspress == 0) { - sysPress_ = EMS_VALUE_UINT_NOTSET; + syspress = EMS_VALUE_UINT_NOTSET; } has_update(sysPress_, syspress); @@ -1475,7 +1488,9 @@ void Boiler::process_UBAMonitorWWPlus(std::shared_ptr telegram) has_update(telegram, wwSetTemp_, 0); has_update(telegram, wwCurTemp_, 1); has_update(telegram, wwCurTemp2_, 3); - has_update(telegram, wwCurFlow_, 11); + if (!is_received(0x779)) { // HIUMonitor + has_update(telegram, wwCurFlow_, 11); + } has_update(telegram, wwWorkM_, 14, 3); // force to 3 bytes has_update(telegram, wwStarts_, 17, 3); // force to 3 bytes diff --git a/src/devices/heatpump.cpp b/src/devices/heatpump.cpp index 8a1c214b6..862ba121a 100644 --- a/src/devices/heatpump.cpp +++ b/src/devices/heatpump.cpp @@ -88,7 +88,7 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hybridDHW_, DeviceValueType::ENUM, - FL_(enum_comfort2), + FL_(enum_comfort1), FL_(hybridDHW), DeviceValueUOM::NONE, MAKE_CF_CB(set_hybridDHW)); @@ -332,7 +332,7 @@ bool Heatpump::set_lowNoiseStop(const char * value, const int8_t id) { } bool Heatpump::set_hybridDHW(const char * value, const int8_t id) { uint8_t v; - if (!Helpers::value2enum(value, v, FL_(enum_comfort2))) { + if (!Helpers::value2enum(value, v, FL_(enum_comfort1))) { return false; } write_command(0x998, 1, v, 0x998); diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index c0f6176bb..30602656a 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -712,6 +712,15 @@ void Thermostat::process_RemoteHumidity(std::shared_ptr telegram // has_update(telegram, dewtemperature_, 0); // this is int8 has_update(telegram, humidity_, 1); has_update(telegram, dewtemperature_, 2); // this is int16 + // some thermostats use short telegram with int8 dewpoint, https://github.com/emsesp/EMS-ESP32/issues/1491 + if (telegram->offset == 0 && telegram->message_length < 4) { + int8_t dew = dewtemperature_ / 10; + telegram->read_value(dew, 0); + if (dew != EMS_VALUE_INT_NOTSET && dewtemperature_ != dew * 10) { + dewtemperature_ = dew * 10; + has_update(dewtemperature_); + } + } } // 0x273 - for reading temperaturcorrection from the RC100H remote thermostat (0x38, 0x39, ..) diff --git a/src/emsesp.cpp b/src/emsesp.cpp index 16f2d27cf..86b67b178 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -216,6 +216,7 @@ void EMSESP::uart_init() { } txservice_.start(); // sends out request to EMS bus for all devices + txservice_.tx_mode(tx_mode); // force a fetch for all new values, unless Tx is set to off if (tx_mode != 0) { diff --git a/src/locale_common.h b/src/locale_common.h index 1c69a1870..d793be134 100644 --- a/src/locale_common.h +++ b/src/locale_common.h @@ -277,8 +277,8 @@ MAKE_ENUM(enum_charge, FL_(chargepump), FL_(3wayvalve)) MAKE_ENUM(enum_freq, FL_(off), FL_(1x3min), FL_(2x3min), FL_(3x3min), FL_(4x3min), FL_(5x3min), FL_(6x3min), FL_(continuous)) MAKE_ENUM(enum_off_time_date_manual, FL_(off), FL_(time), FL_(date), FL_(manual)) MAKE_ENUM(enum_comfort, FL_(hot), FL_(eco), FL_(intelligent)) -MAKE_ENUM(enum_comfort1, FL_(high_comfort), FL_(eco)) -MAKE_ENUM(enum_comfort2, FL_(eco), FL_(high_comfort)) +// MAKE_ENUM(enum_comfort1, FL_(high_comfort), FL_(eco)) +MAKE_ENUM(enum_comfort1, FL_(eco), FL_(high_comfort)) MAKE_ENUM(enum_flow, FL_(off), FL_(flow), FL_(bufferedflow), FL_(buffer), FL_(layeredbuffer)) MAKE_ENUM(enum_reset, FL_(dash), FL_(maintenance), FL_(error)) MAKE_ENUM(enum_maxHeat, FL_(0kW), FL_(2kW), FL_(3kW), FL_(4kW), FL_(6kW), FL_(9kW))