add rego3000 holiday, dev9, update pkg

This commit is contained in:
MichaelDvP
2024-05-04 12:41:04 +02:00
parent f54b6959ab
commit e84bf9a181
6 changed files with 53 additions and 21 deletions

View File

@@ -17,6 +17,7 @@
- heatpump entities `fan` and `shutdown` [#1690](https://github.com/emsesp/EMS-ESP32/discussions/1690) - heatpump entities `fan` and `shutdown` [#1690](https://github.com/emsesp/EMS-ESP32/discussions/1690)
- mqtt HA-mode 3 for v3.6 compatible HA entities, set on update v3.6->v3.7 - mqtt HA-mode 3 for v3.6 compatible HA entities, set on update v3.6->v3.7
- HP input states [#1723](https://github.com/emsesp/EMS-ESP32/discussions/1723) - HP input states [#1723](https://github.com/emsesp/EMS-ESP32/discussions/1723)
- holiday settings for rego 3000 [#1735](https://github.com/emsesp/EMS-ESP32/issues/1735)
## Fixed ## Fixed

View File

@@ -50,12 +50,12 @@
"typescript": "^5.4.5" "typescript": "^5.4.5"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.1.1", "@eslint/js": "^9.2.0",
"@preact/compat": "^17.1.2", "@preact/compat": "^17.1.2",
"@preact/preset-vite": "^2.8.2", "@preact/preset-vite": "^2.8.2",
"@trivago/prettier-plugin-sort-imports": "^4.3.0", "@trivago/prettier-plugin-sort-imports": "^4.3.0",
"concurrently": "^8.2.2", "concurrently": "^8.2.2",
"eslint": "^9.1.1", "eslint": "^9.2.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"preact": "^10.21.0", "preact": "^10.21.0",
"prettier": "^3.2.5", "prettier": "^3.2.5",

View File

@@ -705,10 +705,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@eslint/js@npm:9.1.1, @eslint/js@npm:^9.1.1": "@eslint/js@npm:9.2.0, @eslint/js@npm:^9.2.0":
version: 9.1.1 version: 9.2.0
resolution: "@eslint/js@npm:9.1.1" resolution: "@eslint/js@npm:9.2.0"
checksum: 10c0/b25d11736b91d8df44dd217e88adb1f43d2bd5911ef4f4033e51faffe370f28d329731ffbf841d0b8303c8eedb60bda8c3a9efe803bb3b3737a06bb22c09ad0c checksum: 10c0/89632466d329d9dd68c6ec24290e407f0950ca8c4b7f3750b82457daa7f6233799ccbc956cd84231f9544efbefddd69833ee82658883ca673cfca9e4b8e0713a
languageName: node languageName: node
linkType: hard linkType: hard
@@ -1707,7 +1707,7 @@ __metadata:
"@alova/scene-react": "npm:^1.5.0" "@alova/scene-react": "npm:^1.5.0"
"@emotion/react": "npm:^11.11.4" "@emotion/react": "npm:^11.11.4"
"@emotion/styled": "npm:^11.11.5" "@emotion/styled": "npm:^11.11.5"
"@eslint/js": "npm:^9.1.1" "@eslint/js": "npm:^9.2.0"
"@mui/icons-material": "npm:^5.15.16" "@mui/icons-material": "npm:^5.15.16"
"@mui/material": "npm:^5.15.16" "@mui/material": "npm:^5.15.16"
"@preact/compat": "npm:^17.1.2" "@preact/compat": "npm:^17.1.2"
@@ -1722,7 +1722,7 @@ __metadata:
alova: "npm:^2.20.3" alova: "npm:^2.20.3"
async-validator: "npm:^4.2.5" async-validator: "npm:^4.2.5"
concurrently: "npm:^8.2.2" concurrently: "npm:^8.2.2"
eslint: "npm:^9.1.1" eslint: "npm:^9.2.0"
eslint-config-prettier: "npm:^9.1.0" eslint-config-prettier: "npm:^9.1.0"
history: "npm:^5.3.0" history: "npm:^5.3.0"
jwt-decode: "npm:^4.0.0" jwt-decode: "npm:^4.0.0"
@@ -3209,14 +3209,14 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"eslint@npm:^9.1.1": "eslint@npm:^9.2.0":
version: 9.1.1 version: 9.2.0
resolution: "eslint@npm:9.1.1" resolution: "eslint@npm:9.2.0"
dependencies: dependencies:
"@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/eslint-utils": "npm:^4.2.0"
"@eslint-community/regexpp": "npm:^4.6.1" "@eslint-community/regexpp": "npm:^4.6.1"
"@eslint/eslintrc": "npm:^3.0.2" "@eslint/eslintrc": "npm:^3.0.2"
"@eslint/js": "npm:9.1.1" "@eslint/js": "npm:9.2.0"
"@humanwhocodes/config-array": "npm:^0.13.0" "@humanwhocodes/config-array": "npm:^0.13.0"
"@humanwhocodes/module-importer": "npm:^1.0.1" "@humanwhocodes/module-importer": "npm:^1.0.1"
"@humanwhocodes/retry": "npm:^0.2.3" "@humanwhocodes/retry": "npm:^0.2.3"
@@ -3249,7 +3249,7 @@ __metadata:
text-table: "npm:^0.2.0" text-table: "npm:^0.2.0"
bin: bin:
eslint: bin/eslint.js eslint: bin/eslint.js
checksum: 10c0/0173fbc561d2272802315726283f63df0cf7197949ca1f80afd8ef92e95867677d54601ff6cad5467c44745160ba0f9cef7ac1154ccbd097d0269a4c6eb21041 checksum: 10c0/eab3265100a359a486e40e1d9d4d3ecff936d2f4d952f4ab107d404e0684fffbe186ecd0fb41791af5bcb13570a27032ddf9a2e628927ed33473f64255b0037b
languageName: node languageName: node
linkType: hard linkType: hard

View File

@@ -174,6 +174,7 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i
register_telegram_type(0x240, "RC300Settings", true, MAKE_PF_CB(process_RC300Settings)); register_telegram_type(0x240, "RC300Settings", true, MAKE_PF_CB(process_RC300Settings));
register_telegram_type(0xBB, "HybridSettings", true, MAKE_PF_CB(process_HybridSettings)); register_telegram_type(0xBB, "HybridSettings", true, MAKE_PF_CB(process_HybridSettings));
register_telegram_type(0x23E, "PVSettings", true, MAKE_PF_CB(process_PVSettings)); register_telegram_type(0x23E, "PVSettings", true, MAKE_PF_CB(process_PVSettings));
register_telegram_type(0x269, "RC300Holiday1", true, MAKE_PF_CB(process_RC300Holiday));
// JUNKERS/HT3 // JUNKERS/HT3
} else if (model == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) { } else if (model == EMSdevice::EMS_DEVICE_FLAG_JUNKERS) {
@@ -1289,6 +1290,25 @@ void Thermostat::process_RC300Floordry(std::shared_ptr<const Telegram> telegram)
has_update(telegram, floordrytemp_, 1); has_update(telegram, floordrytemp_, 1);
} }
// 0x269 - 0x26D RC300 EMS+ holidaymodes 1 to 5
// special case R3000 only date in 0x269
void Thermostat::process_RC300Holiday(std::shared_ptr<const Telegram> telegram) {
if (telegram->offset || telegram->message_length < 6) {
return;
}
char data[sizeof(vacation[0]) + 4];
snprintf(data,
sizeof(data),
"%02d.%02d.%04d-%02d.%02d.%04d",
telegram->message_data[2],
telegram->message_data[1],
telegram->message_data[0] + 2000,
telegram->message_data[5],
telegram->message_data[4],
telegram->message_data[3] + 2000);
has_update(vacation[0], data, sizeof(vacation[0]));
}
// 0x291 ff. HP mode // 0x291 ff. HP mode
// thermostat(0x10) -W-> Me(0x0B), HPMode(0x0291), data: 01 00 00 03 FF 00 // thermostat(0x10) -W-> Me(0x0B), HPMode(0x0291), data: 01 00 00 03 FF 00
void Thermostat::process_HPMode(std::shared_ptr<const Telegram> telegram) { void Thermostat::process_HPMode(std::shared_ptr<const Telegram> telegram) {
@@ -2433,14 +2453,9 @@ bool Thermostat::set_holiday(const char * value, const int8_t id, const bool vac
data[4] = (value[14] - '0') * 10 + (value[15] - '0'); data[4] = (value[14] - '0') * 10 + (value[15] - '0');
data[5] = (value[18] - '0') * 100 + (value[19] - '0') * 10 + (value[20] - '0'); data[5] = (value[18] - '0') * 100 + (value[19] - '0') * 10 + (value[20] - '0');
if (data[0] > 31 || data[1] > 12 || data[3] > 31 || data[4] > 12) { if (!data[0] || data[0] > 31 || !data[1] || data[1] > 12 || !data[3] || data[3] > 31 || !data[4] || data[4] > 12) {
return false; return false;
} }
if (model() == EMSdevice::EMS_DEVICE_FLAG_RC30) {
write_command(0xA9 + hc->hc(), 1, data, 6, 0x9A + hc->hc());
return true;
}
if (!vacation || value[10] == '+') { // + for compatibility if (!vacation || value[10] == '+') { // + for compatibility
if (hc) { if (hc) {
write_command(timer_typeids[hc->hc()], 93, data, 6, timer_typeids[hc->hc()]); write_command(timer_typeids[hc->hc()], 93, data, 6, timer_typeids[hc->hc()]);
@@ -2462,6 +2477,7 @@ bool Thermostat::set_holiday(const char * value, const int8_t id, const bool vac
} }
// set vacations as string dd.mm.yyyy-dd.mm.yyyy // set vacations as string dd.mm.yyyy-dd.mm.yyyy
// RC30 and rego 3000
bool Thermostat::set_RC30Vacation(const char * value, const int8_t id) { bool Thermostat::set_RC30Vacation(const char * value, const int8_t id) {
if (strlen(value) != 21) { if (strlen(value) != 21) {
return false; return false;
@@ -2478,6 +2494,11 @@ bool Thermostat::set_RC30Vacation(const char * value, const int8_t id) {
if (!data[0] || data[0] > 31 || !data[1] || data[1] > 12 || !data[3] || data[3] > 31 || !data[4] || data[4] > 12) { if (!data[0] || data[0] > 31 || !data[1] || data[1] > 12 || !data[3] || data[3] > 31 || !data[4] || data[4] > 12) {
return false; return false;
} }
if (model() == EMSdevice::EMS_DEVICE_FLAG_R3000) {
write_command(0x269, 0, data, 6, 0x269);
return true;
}
// RC30
write_command(0xA9, 1 + 7 * (id - 1), data, 6, 0x9A); write_command(0xA9, 1 + 7 * (id - 1), data, 6, 0x9A);
return true; return true;
} }
@@ -3908,6 +3929,15 @@ void Thermostat::register_device_values() {
DeviceValueUOM::DEGREES, DeviceValueUOM::DEGREES,
MAKE_CF_CB(set_minexttemp)); MAKE_CF_CB(set_minexttemp));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &ibaDamping_, DeviceValueType::BOOL, FL_(damping), DeviceValueUOM::NONE, MAKE_CF_CB(set_damping)); register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &ibaDamping_, DeviceValueType::BOOL, FL_(damping), DeviceValueUOM::NONE, MAKE_CF_CB(set_damping));
if (model() == EMSdevice::EMS_DEVICE_FLAG_R3000) {
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&vacation[0],
DeviceValueType::STRING,
FL_(tpl_holidays),
FL_(holiday),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_RC30Vacation));
}
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&hybridStrategy_, &hybridStrategy_,
DeviceValueType::ENUM, DeviceValueType::ENUM,

View File

@@ -271,7 +271,7 @@ class Thermostat : public EMSdevice {
uint8_t humidity_; uint8_t humidity_;
uint8_t battery_; uint8_t battery_;
char vacation[8][22]; // RC30 only, only one hc char vacation[8][22]; // RC30, R3000 only, only one hc
// HybridHP // HybridHP
uint8_t hybridStrategy_; // co2 = 1, cost = 2, temperature = 3, mix = 4 uint8_t hybridStrategy_; // co2 = 1, cost = 2, temperature = 3, mix = 4
@@ -431,6 +431,7 @@ class Thermostat : public EMSdevice {
void process_RC300OutdoorTemp(std::shared_ptr<const Telegram> telegram); void process_RC300OutdoorTemp(std::shared_ptr<const Telegram> telegram);
void process_RC300Settings(std::shared_ptr<const Telegram> telegram); void process_RC300Settings(std::shared_ptr<const Telegram> telegram);
void process_RC300Floordry(std::shared_ptr<const Telegram> telegram); void process_RC300Floordry(std::shared_ptr<const Telegram> telegram);
void process_RC300Holiday(std::shared_ptr<const Telegram> telegram);
void process_RC300Curve(std::shared_ptr<const Telegram> telegram); void process_RC300Curve(std::shared_ptr<const Telegram> telegram);
void process_JunkersMonitor(std::shared_ptr<const Telegram> telegram); void process_JunkersMonitor(std::shared_ptr<const Telegram> telegram);
void process_JunkersSet(std::shared_ptr<const Telegram> telegram); void process_JunkersSet(std::shared_ptr<const Telegram> telegram);

View File

@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.7.0-dev.8" #define EMSESP_APP_VERSION "3.7.0-dev.9"