mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
Merge pull request #2582 from MichaelDvP/dev
hybrid csh5800iG and fix crashes
This commit is contained in:
@@ -13,6 +13,7 @@ For more details go to [docs.emsesp.org](https://docs.emsesp.org/).
|
|||||||
- boiler 0xC6 telegram [#1963](https://github.com/emsesp/EMS-ESP32/issues/1963)
|
- boiler 0xC6 telegram [#1963](https://github.com/emsesp/EMS-ESP32/issues/1963)
|
||||||
- CS6800i changes [#2448](https://github.com/emsesp/EMS-ESP32/issues/2448), [#2449](https://github.com/emsesp/EMS-ESP32/issues/2449)
|
- CS6800i changes [#2448](https://github.com/emsesp/EMS-ESP32/issues/2448), [#2449](https://github.com/emsesp/EMS-ESP32/issues/2449)
|
||||||
- charging pump [#2544](https://github.com/emsesp/EMS-ESP32/issues/2544)
|
- charging pump [#2544](https://github.com/emsesp/EMS-ESP32/issues/2544)
|
||||||
|
- Hybrid CSH5800iG [#2569](https://github.com/emsesp/EMS-ESP32/issues/2569)
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ framework = arduino
|
|||||||
board_build.partitions = partitions/esp32_partition_16M.csv
|
board_build.partitions = partitions/esp32_partition_16M.csv
|
||||||
board_upload.flash_size = 16MB
|
board_upload.flash_size = 16MB
|
||||||
board_build.app_partition_name = app0
|
board_build.app_partition_name = app0
|
||||||
platform = espressif32@6.11.0 ; Arduino Core v2.0.17 / IDF v4.4.7
|
platform = espressif32@6.10.0 ; Arduino Core v2.0.17 / IDF v4.4.7
|
||||||
|
|
||||||
; 32MB Flash variants
|
; 32MB Flash variants
|
||||||
[espressif32_base_32M]
|
[espressif32_base_32M]
|
||||||
@@ -62,7 +62,7 @@ framework = arduino
|
|||||||
board_build.partitions = partitions/esp32_partition_32M.csv
|
board_build.partitions = partitions/esp32_partition_32M.csv
|
||||||
board_upload.flash_size = 32MB
|
board_upload.flash_size = 32MB
|
||||||
board_build.app_partition_name = app0
|
board_build.app_partition_name = app0
|
||||||
platform = espressif32@6.11.0 ; Arduino Core 2.0.17 / IDF 4.4.7
|
platform = espressif32@6.10.0 ; Arduino Core 2.0.17 / IDF 4.4.7
|
||||||
|
|
||||||
; use Tasmota's library for 4MB Flash variants.
|
; use Tasmota's library for 4MB Flash variants.
|
||||||
; Removes libs (like mbedtsl, so no WiFi_secure.h) to increase available heap
|
; Removes libs (like mbedtsl, so no WiFi_secure.h) to increase available heap
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void AnalogSensor::reload(bool get_nvs) {
|
|||||||
sensors_.clear();
|
sensors_.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
changed_ = true;
|
||||||
// load the list of analog sensors from the customization service
|
// load the list of analog sensors from the customization service
|
||||||
// and store them locally and then activate them
|
// and store them locally and then activate them
|
||||||
EMSESP::webCustomizationService.read([&](WebCustomization & settings) {
|
EMSESP::webCustomizationService.read([&](WebCustomization & settings) {
|
||||||
@@ -74,10 +74,15 @@ void AnalogSensor::reload(bool get_nvs) {
|
|||||||
for (const auto & sensor : settings.analogCustomizations) { // search customlist
|
for (const auto & sensor : settings.analogCustomizations) { // search customlist
|
||||||
if (sensor_.gpio() == sensor.gpio) {
|
if (sensor_.gpio() == sensor.gpio) {
|
||||||
// for output sensors set value to new start-value
|
// for output sensors set value to new start-value
|
||||||
if ((sensor.type == AnalogType::COUNTER || sensor.type >= AnalogType::DIGITAL_OUT)
|
if (sensor.type >= AnalogType::DIGITAL_OUT
|
||||||
&& (sensor_.type() != sensor.type || sensor_.offset() != sensor.offset || sensor_.factor() != sensor.factor)) {
|
&& (sensor_.type() != sensor.type || sensor_.offset() != sensor.offset || sensor_.factor() != sensor.factor)) {
|
||||||
sensor_.set_value(sensor.offset);
|
sensor_.set_value(sensor.offset);
|
||||||
}
|
}
|
||||||
|
if (sensor.type == AnalogType::COUNTER && sensor_.offset() != sensor.offset
|
||||||
|
&& sensor.offset != EMSESP::nvs_.getDouble(sensor.name.c_str(), 0)) {
|
||||||
|
EMSESP::nvs_.putDouble(sensor.name.c_str(), sensor.offset);
|
||||||
|
sensor_.set_value(sensor.offset);
|
||||||
|
}
|
||||||
sensor_.set_name(sensor.name);
|
sensor_.set_name(sensor.name);
|
||||||
sensor_.set_type(sensor.type);
|
sensor_.set_type(sensor.type);
|
||||||
sensor_.set_offset(sensor.offset);
|
sensor_.set_offset(sensor.offset);
|
||||||
@@ -800,7 +805,8 @@ bool AnalogSensor::command_setvalue(const char * value, const int8_t gpio) {
|
|||||||
// sensor.set_offset(val);
|
// sensor.set_offset(val);
|
||||||
sensor.set_value(val);
|
sensor.set_value(val);
|
||||||
}
|
}
|
||||||
if (oldoffset != sensor.offset() && sensor.offset() != EMSESP::nvs_.getDouble(sensor.name().c_str())) {
|
sensor.set_offset(sensor.value());
|
||||||
|
if (sensor.value() != EMSESP::nvs_.getDouble(sensor.name().c_str(), 0)) {
|
||||||
EMSESP::nvs_.putDouble(sensor.name().c_str(), sensor.value());
|
EMSESP::nvs_.putDouble(sensor.name().c_str(), sensor.value());
|
||||||
}
|
}
|
||||||
} else if (sensor.type() == AnalogType::ADC) {
|
} else if (sensor.type() == AnalogType::ADC) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
// Boilers - 0x08
|
// Boilers - 0x08
|
||||||
{ 8, DeviceType::BOILER, "CS5800i, CS6800i, WLW176i, WLW186i", DeviceFlags::EMS_DEVICE_FLAG_CS6800},
|
{ 8, DeviceType::BOILER, "CS5800i, CS6800i, WLW176i, WLW186i", DeviceFlags::EMS_DEVICE_FLAG_CS6800},
|
||||||
{ 12, DeviceType::BOILER, "C1200W", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
{ 12, DeviceType::BOILER, "C1200W", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
{ 16, DeviceType::BOILER, "CS5800iG", DeviceFlags::EMS_DEVICE_FLAG_CS6800},
|
{ 16, DeviceType::BOILER, "CS5800iG", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
{ 64, DeviceType::BOILER, "BK13/BK15, Smartline, GB1*2", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
{ 64, DeviceType::BOILER, "BK13/BK15, Smartline, GB1*2", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
{ 72, DeviceType::BOILER, "Logano GB1*5, Logamatic MC10", DeviceFlags::EMS_DEVICE_FLAG_EMS},
|
{ 72, DeviceType::BOILER, "Logano GB1*5, Logamatic MC10", DeviceFlags::EMS_DEVICE_FLAG_EMS},
|
||||||
{ 81, DeviceType::BOILER, "Cascade CM10", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
{ 81, DeviceType::BOILER, "Cascade CM10", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
@@ -154,6 +154,7 @@
|
|||||||
|
|
||||||
// Heat Pumps - 0x53
|
// Heat Pumps - 0x53
|
||||||
{248, DeviceType::HEATPUMP, "Hybrid Manager HM200", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
{248, DeviceType::HEATPUMP, "Hybrid Manager HM200", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
|
{16, DeviceType::HEATPUMP, "CSH5800iG", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
|
|
||||||
// Ventilation - 0x51
|
// Ventilation - 0x51
|
||||||
{231, DeviceType::VENTILATION, "Logavent HRV176", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
{231, DeviceType::VENTILATION, "Logavent HRV176", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
|
|||||||
@@ -1002,11 +1002,16 @@ void EMSESP::process_deviceName(std::shared_ptr<const Telegram> telegram) {
|
|||||||
// e.g. 09 0B 02 00 PP V1 V2
|
// e.g. 09 0B 02 00 PP V1 V2
|
||||||
void EMSESP::process_version(std::shared_ptr<const Telegram> telegram) {
|
void EMSESP::process_version(std::shared_ptr<const Telegram> telegram) {
|
||||||
// check for valid telegram, just in case
|
// check for valid telegram, just in case
|
||||||
if (telegram->message_length < 3) {
|
if (telegram->offset != 0) {
|
||||||
// for empty telegram add device with empty product, version and brand
|
return;
|
||||||
if (!telegram->message_length) {
|
}
|
||||||
(void)add_device(telegram->src, 0, "00.00", 0);
|
// for empty telegram add device with empty product, version and brand
|
||||||
}
|
if (telegram->message_length == 0) {
|
||||||
|
(void)add_device(telegram->src, 0, "00.00", 0);
|
||||||
|
return;
|
||||||
|
} else if (telegram->message_length < 3) {
|
||||||
|
(void)add_device(telegram->src, telegram->message_data[0], "00.00", 0);
|
||||||
|
send_read_request(EMSdevice::EMS_TYPE_NAME, telegram->src, 27);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1014,7 +1019,7 @@ void EMSESP::process_version(std::shared_ptr<const Telegram> telegram) {
|
|||||||
uint8_t offset = 0;
|
uint8_t offset = 0;
|
||||||
if (telegram->message_data[0] == 0x00) {
|
if (telegram->message_data[0] == 0x00) {
|
||||||
// see if we have a 2nd subscriber
|
// see if we have a 2nd subscriber
|
||||||
if (telegram->message_data[3] != 0x00) {
|
if (telegram->message_length > 5 && telegram->message_data[3] != 0x00) {
|
||||||
offset = 3;
|
offset = 3;
|
||||||
} else {
|
} else {
|
||||||
return; // ignore whole telegram
|
return; // ignore whole telegram
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.7.3-dev.12"
|
#define EMSESP_APP_VERSION "3.7.3-dev.13"
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) {
|
|||||||
String nvs_boot = EMSESP::nvs_.getString("boot");
|
String nvs_boot = EMSESP::nvs_.getString("boot");
|
||||||
if (!nvs_boot.isEmpty()) {
|
if (!nvs_boot.isEmpty()) {
|
||||||
#if defined(EMSESP_DEBUG)
|
#if defined(EMSESP_DEBUG)
|
||||||
EMSESP::logger().debug("Overriding board profile with NVS boot value %s");
|
EMSESP::logger().debug("Overriding board profile with NVS boot value %s", nvs_boot.c_str());
|
||||||
#endif
|
#endif
|
||||||
settings.board_profile = nvs_boot;
|
settings.board_profile = nvs_boot;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user