mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-07-29 01:52:51 +00:00
calcutae dewtemp for Easycontrol, #3135
This commit is contained in:
@@ -18,3 +18,4 @@ For more details go to [emsesp.org](https://emsesp.org/).
|
|||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
- call compute value direct, enlarge TCP stack [#3127](https://github.com/emsesp/EMS-ESP32/discussions/3127)
|
- call compute value direct, enlarge TCP stack [#3127](https://github.com/emsesp/EMS-ESP32/discussions/3127)
|
||||||
|
- Dewtemperature for Easycontrol calculated by ems-esp [3135](https://github.com/emsesp/EMS-ESP32/issues/3135)
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ class Roomctrl {
|
|||||||
static bool is_remote(const uint8_t hc) {
|
static bool is_remote(const uint8_t hc) {
|
||||||
return (hc < 4 && remotetemp_[hc] != EMS_VALUE_INT16_NOTSET);
|
return (hc < 4 && remotetemp_[hc] != EMS_VALUE_INT16_NOTSET);
|
||||||
}
|
}
|
||||||
static void set_timeout(uint8_t t);
|
static void set_timeout(uint8_t t);
|
||||||
|
static int16_t calc_dew(int16_t temp, uint8_t hum);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr uint32_t SEND_INTERVAL = 15000; // 15 sec
|
static constexpr uint32_t SEND_INTERVAL = 15000; // 15 sec
|
||||||
@@ -50,7 +51,6 @@ class Roomctrl {
|
|||||||
static void nack_write();
|
static void nack_write();
|
||||||
static void ack_write();
|
static void ack_write();
|
||||||
static void replyF7(uint8_t addr, uint8_t dst, uint8_t offset, uint8_t typehh, uint8_t typeh, uint8_t typel, uint8_t hc);
|
static void replyF7(uint8_t addr, uint8_t dst, uint8_t offset, uint8_t typehh, uint8_t typeh, uint8_t typel, uint8_t hc);
|
||||||
static int16_t calc_dew(int16_t temp, uint8_t hum);
|
|
||||||
|
|
||||||
static bool switch_off_[HCS];
|
static bool switch_off_[HCS];
|
||||||
static uint32_t send_time_[HCS];
|
static uint32_t send_time_[HCS];
|
||||||
|
|||||||
@@ -810,16 +810,15 @@ void Thermostat::process_RemoteTemp(std::shared_ptr<const Telegram> telegram) {
|
|||||||
// e.g. "38 10 FF 00 03 7B 08 24 00 4B"
|
// e.g. "38 10 FF 00 03 7B 08 24 00 4B"
|
||||||
void Thermostat::process_RemoteHumidity(std::shared_ptr<const Telegram> telegram) {
|
void Thermostat::process_RemoteHumidity(std::shared_ptr<const Telegram> telegram) {
|
||||||
// has_update(telegram, dewtemperature_, 0); // this is int8
|
// 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
|
// some thermostats use short telegram with int8 dewpoint, https://github.com/emsesp/EMS-ESP32/issues/1491
|
||||||
if (telegram->offset == 0 && telegram->message_length < 4) {
|
// but it's not a dewpoint in offset 0, removed, see https://github.com/emsesp/EMS-ESP32/issues/3135
|
||||||
int8_t dew = dewtemperature_ / 10;
|
has_update(telegram, humidity_, 1);
|
||||||
telegram->read_value(dew, 0);
|
// has_update(telegram, dewtemperature_, 2); // this is int16
|
||||||
if (dew != EMS_VALUE_INT8_NOTSET && dewtemperature_ != dew * 10) {
|
int16_t dew = EMS_VALUE_INT16_NOTSET;
|
||||||
dewtemperature_ = dew * 10;
|
if (telegram->read_value(dew, 2)) {
|
||||||
has_update(dewtemperature_);
|
has_update(dewtemperature_, dew);
|
||||||
}
|
} else if (telegram->offset == 0 && telegram->message_length < 4) {
|
||||||
|
has_update(dewtemperature_, Roomctrl::calc_dew(tempsensor1_, humidity_));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.8.3-dev.7"
|
#define EMSESP_APP_VERSION "3.8.3-dev.8"
|
||||||
|
|||||||
Reference in New Issue
Block a user