mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
add back RC30 - Setting mode on a RC30/Moduline400 via MQTT in HA doesn't work #243
This commit is contained in:
@@ -5,9 +5,11 @@
|
|||||||
## Added
|
## Added
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
- lastcode broke MQTT JSON structure [#228]
|
|
||||||
|
- lastcode broke MQTT JSON structure [#228](https://github.com/emsesp/EMS-ESP32/issues/228)
|
||||||
- overlapping while reading sequence of EMS1.0 telegrams
|
- overlapping while reading sequence of EMS1.0 telegrams
|
||||||
- redundant telegram readings (because of offset overflow)
|
- redundant telegram readings (because of offset overflow)
|
||||||
|
- added missing RC30/Moduline400 [#243](https://github.com/emsesp/EMS-ESP32/issues/243)
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
|
|||||||
@@ -2691,6 +2691,17 @@ void Thermostat::register_device_values() {
|
|||||||
case EMS_DEVICE_FLAG_RC20:
|
case EMS_DEVICE_FLAG_RC20:
|
||||||
register_device_value(TAG_THERMOSTAT_DATA, &dateTime_, DeviceValueType::STRING, nullptr, FL_(dateTime), DeviceValueUOM::NONE); // can't set datetime
|
register_device_value(TAG_THERMOSTAT_DATA, &dateTime_, DeviceValueType::STRING, nullptr, FL_(dateTime), DeviceValueUOM::NONE); // can't set datetime
|
||||||
break;
|
break;
|
||||||
|
case EMS_DEVICE_FLAG_RC30:
|
||||||
|
register_device_value(TAG_THERMOSTAT_DATA, &dateTime_, DeviceValueType::STRING, nullptr, FL_(dateTime), DeviceValueUOM::NONE); // can't set datetime
|
||||||
|
register_device_value(TAG_THERMOSTAT_DATA, &ibaMainDisplay_, DeviceValueType::ENUM, FL_(enum_ibaMainDisplay), FL_(ibaMainDisplay), DeviceValueUOM::NONE);
|
||||||
|
register_device_value(TAG_THERMOSTAT_DATA, &ibaLanguage_, DeviceValueType::ENUM, FL_(enum_ibaLanguage), FL_(ibaLanguage), DeviceValueUOM::NONE);
|
||||||
|
register_device_value(TAG_THERMOSTAT_DATA,
|
||||||
|
&ibaClockOffset_,
|
||||||
|
DeviceValueType::INT,
|
||||||
|
nullptr,
|
||||||
|
FL_(ibaClockOffset),
|
||||||
|
DeviceValueUOM::SECONDS); // offset (in sec) to clock, 0xff=-1s, 0x02=2s
|
||||||
|
break;
|
||||||
case EMS_DEVICE_FLAG_RC30_N:
|
case EMS_DEVICE_FLAG_RC30_N:
|
||||||
register_device_value(TAG_THERMOSTAT_DATA, &dateTime_, DeviceValueType::STRING, nullptr, FL_(dateTime), DeviceValueUOM::NONE); // can't set datetime
|
register_device_value(TAG_THERMOSTAT_DATA, &dateTime_, DeviceValueType::STRING, nullptr, FL_(dateTime), DeviceValueUOM::NONE); // can't set datetime
|
||||||
register_device_value(TAG_THERMOSTAT_DATA, &ibaMainDisplay_, DeviceValueType::ENUM, FL_(enum_ibaMainDisplay), FL_(ibaMainDisplay), DeviceValueUOM::NONE);
|
register_device_value(TAG_THERMOSTAT_DATA, &ibaMainDisplay_, DeviceValueType::ENUM, FL_(enum_ibaMainDisplay), FL_(ibaMainDisplay), DeviceValueUOM::NONE);
|
||||||
@@ -2940,6 +2951,9 @@ void Thermostat::register_device_values_hc(std::shared_ptr<Thermostat::HeatingCi
|
|||||||
register_device_value(tag, &hc->summertemp, DeviceValueType::UINT, nullptr, FL_(summertemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_summertemp));
|
register_device_value(tag, &hc->summertemp, DeviceValueType::UINT, nullptr, FL_(summertemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_summertemp));
|
||||||
register_device_value(tag, &hc->summermode, DeviceValueType::BOOL, nullptr, FL_(summermode), DeviceValueUOM::NONE);
|
register_device_value(tag, &hc->summermode, DeviceValueType::BOOL, nullptr, FL_(summermode), DeviceValueUOM::NONE);
|
||||||
break;
|
break;
|
||||||
|
case EMS_DEVICE_FLAG_RC30:
|
||||||
|
register_device_value(tag, &hc->mode, DeviceValueType::ENUM, FL_(enum_mode3), FL_(mode), DeviceValueUOM::NONE, MAKE_CF_CB(set_mode));
|
||||||
|
break;
|
||||||
case EMS_DEVICE_FLAG_RC30_N:
|
case EMS_DEVICE_FLAG_RC30_N:
|
||||||
case EMS_DEVICE_FLAG_RC35:
|
case EMS_DEVICE_FLAG_RC35:
|
||||||
register_device_value(tag, &hc->mode, DeviceValueType::ENUM, FL_(enum_mode3), FL_(mode), DeviceValueUOM::NONE, MAKE_CF_CB(set_mode));
|
register_device_value(tag, &hc->mode, DeviceValueType::ENUM, FL_(enum_mode3), FL_(mode), DeviceValueUOM::NONE, MAKE_CF_CB(set_mode));
|
||||||
|
|||||||
@@ -607,6 +607,7 @@ void TxService::retry_tx(const uint8_t operation, const uint8_t * data, const ui
|
|||||||
tx_telegrams_.emplace_front(tx_telegram_id_++, std::move(telegram_last_), true, get_post_send_query());
|
tx_telegrams_.emplace_front(tx_telegram_id_++, std::move(telegram_last_), true, get_post_send_query());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// send a request to read the next block of data from longer telegrams
|
||||||
uint16_t TxService::read_next_tx(uint8_t offset) {
|
uint16_t TxService::read_next_tx(uint8_t offset) {
|
||||||
// add to the top/front of the queue
|
// add to the top/front of the queue
|
||||||
uint8_t message_data[1] = {EMS_MAX_TELEGRAM_LENGTH}; // request all data, 32 bytes
|
uint8_t message_data[1] = {EMS_MAX_TELEGRAM_LENGTH}; // request all data, 32 bytes
|
||||||
@@ -614,12 +615,12 @@ uint16_t TxService::read_next_tx(uint8_t offset) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t add_offset = 25; //for EMS+ telegram increase offset by 25
|
uint8_t add_offset = 25; // for EMS+ telegram increase offset by 25
|
||||||
if (telegram_last_->type_id < 0x100) { //but for EMS1.0 by 27
|
if (telegram_last_->type_id < 0x100) { // but for EMS1.0 by 27
|
||||||
add_offset = 27;
|
add_offset = 27;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UINT8_MAX - telegram_last_->offset < add_offset) { //stop if new offset would overflow
|
if (UINT8_MAX - telegram_last_->offset < add_offset) { // stop if new offset would overflow
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.3.1b0"
|
#define EMSESP_APP_VERSION "3.3.1b1"
|
||||||
|
|||||||
Reference in New Issue
Block a user