mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
add entities #886
This commit is contained in:
@@ -161,6 +161,12 @@ Heatsource::Heatsource(uint8_t device_type, uint8_t device_id, uint8_t product_i
|
||||
DeviceValueTAG::TAG_AHS1 + ahs, &blockHyst_, DeviceValueType::INT, FL_(blockHyst), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_blockHyst), 0, 50);
|
||||
register_device_value(
|
||||
DeviceValueTAG::TAG_AHS1 + ahs, &releaseWait_, DeviceValueType::UINT, FL_(releaseWait), DeviceValueUOM::MINUTES, MAKE_CF_CB(set_releaseWait), 0, 240);
|
||||
|
||||
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &burner_, DeviceValueType::BOOL, FL_(burner), DeviceValueUOM::NONE);
|
||||
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &aPump_, DeviceValueType::BOOL, FL_(aPump), DeviceValueUOM::NONE);
|
||||
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &heatRequest_, DeviceValueType::UINT, FL_(heatRequest), DeviceValueUOM::PERCENT);
|
||||
// register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &blocking_, DeviceValueType::BOOL, FL_(blocking), DeviceValueUOM::NONE);
|
||||
register_device_value(DeviceValueTAG::TAG_AHS1 + ahs, &blockRemain_, DeviceValueType::UINT, FL_(blockRemain), DeviceValueUOM::MINUTES);
|
||||
}
|
||||
|
||||
// cascaded heating sources, only some values per individual heatsource (hs)
|
||||
@@ -226,14 +232,11 @@ void Heatsource::process_amTempMessage(std::shared_ptr<const Telegram> telegram)
|
||||
void Heatsource::process_amStatusMessage(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, aPumpMod_, 0); // PR1
|
||||
// offset 1: bitfield 01-pump on, 02-VR1 opening, 04-VR1 closing, 08-VB1 opening, 10-VB1 closing
|
||||
// uint8_t stat = aPump_ | setValveBuffer_ << 3 | setValveReturn_ << 1;
|
||||
// if (telegram->read_value(stat, 1)) {
|
||||
// has_update(aPump_, stat & 0x01);
|
||||
// has_update(valveBuffer_, (stat >> 3) & 0x03);
|
||||
// has_update(valveReturn_, (stat >> 1) & 0x03);
|
||||
// }
|
||||
// actually we dont know the offset of VR2
|
||||
// has_update(telegram, valveBypass_, ?); // VR2
|
||||
has_bitupdate(telegram, burner_, 1, 5);
|
||||
has_bitupdate(telegram, aPump_, 1, 0);
|
||||
has_update(telegram, heatRequest_, 2); // percent
|
||||
has_update(telegram, valveReturn_, 4); // VR1, percent
|
||||
has_update(telegram, valveBuffer_, 5); // VB1, percent
|
||||
}
|
||||
@@ -275,6 +278,8 @@ void Heatsource::process_amCommandMessage(std::shared_ptr<const Telegram> telegr
|
||||
// Rx: 60 00 FF 00 04 50 00 FF 00 FF FF 00 0D 00 01 00 00 00 00 01 03 01 00 03 00 2D 19 C8 02 94 00 4A
|
||||
// Rx: 60 00 FF 19 04 50 00 FF FF 39
|
||||
void Heatsource::process_amExtraMessage(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, blockRemain_, 24); // minutes
|
||||
// has_update(telegram, blocking_, 24); // bool
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -47,6 +47,12 @@ class Heatsource : public EMSdevice {
|
||||
// uint8_t valveBypass_; // VR2 position unknown
|
||||
// uint8_t heatSource_; // OEV
|
||||
|
||||
uint8_t burner_; // bit 5, offset 1, 54E
|
||||
uint8_t aPump_; // bit 0, offset 1, 54E
|
||||
uint8_t heatRequest_; // offset 2, percent
|
||||
uint8_t blockRemain_; // offset 24, 550 min
|
||||
// uint8_t blocking_; // bool remain == 0
|
||||
|
||||
// Settings:
|
||||
uint8_t vr2Config_; // pos 12: off(00)/Keelbypass(01)/(hc1pump(02) only standalone)
|
||||
uint8_t ahsActivated_; // pos 00: Alternate heat source activation: No(00),Yes(01)
|
||||
|
||||
@@ -439,8 +439,13 @@ MAKE_PSTR_LIST(sysRetTemp, "sysrettemp", "system return temperature", "System R
|
||||
MAKE_PSTR_LIST(valveByPass, "valvebypass", "bypass valve", "Bypass-Ventil", "Bypass klep", "Bypassventil", "zawór obejścia", "", "vanne dérivation") // TODO translate
|
||||
MAKE_PSTR_LIST(valveBuffer, "valvebuffer", "buffer valve", "Puffer-Ventil", "Bufferklep", "Buffertventil", "zawór bufora", "", "vanne tampon") // TODO translate
|
||||
MAKE_PSTR_LIST(valveReturn, "valvereturn", "return valve", "Rückfluss-Ventil", "Retourklep", "Returventil", "zawór powrotu", "", "vanne retour") // TODO translate
|
||||
MAKE_PSTR_LIST(aPumpMod, "altpumpmod", "alternative hs pump modulation", "Alternativer WE Pumpenmodulation", "Alternatieve warmtebron pomp modulatie", "Alternativ Pumpmodulering Värmekälla", "modulacja pompy alternatywnego źródła ciepła", "alternativ pumpemodulering varmekilde", "modulation alternative pompe hs")
|
||||
MAKE_PSTR_LIST(aPumpMod, "apumpmod", "alternative hs pump modulation", "Alternativer WE Pumpenmodulation", "Alternatieve warmtebron pomp modulatie", "Alternativ Pumpmodulering Värmekälla", "modulacja pompy alternatywnego źródła ciepła", "alternativ pumpemodulering varmekilde", "modulation alternative pompe hs")
|
||||
MAKE_PSTR_LIST(heatSource, "heatsource", "alternative heating active", "Alternativer Wärmeerzeuger aktiv", "Alternatieve warmtebron aktief", "Alternativ Värmekälla aktiv", "aktywne alternatywne źródło ciepła", "alternativ varmekilde aktiv", "chauffage alternatif actif")
|
||||
MAKE_PSTR_LIST(aPump, "apump", "alternative hs pump", "Alternativer WE Pumpe", "Alternatieve warmtebron pomp", "Alternativ Pump Värmekälla", "pompy alternatywnego źródła ciepła", "alternativ pumpe varmekilde", "alternative pompe hs")
|
||||
MAKE_PSTR_LIST(burner, "burner", "burner", "Brenner", "", "", "", "", "") // TODO translate
|
||||
MAKE_PSTR_LIST(heatRequest, "heatrequest", "heat request", "Wärmeanforderung", "", "", "", "", "") // TODO translate
|
||||
MAKE_PSTR_LIST(blockRemain, "blockremain", "remaining blocktime", "verbleibende Blockzeit", "", "", "", "", "") // TODO translate
|
||||
|
||||
|
||||
MAKE_PSTR_LIST(vr2Config, "vr2config", "vr2 configuration", "VR2 Konfiguration", "VR2 configuratie", "VR2 Konfiguration", "konfiguracja VR2", "vr2 konfigurasjon", "configuration vr2")
|
||||
MAKE_PSTR_LIST(ahsActivated, "ahsactivated", "alternate heat source activation", "Alt. Wärmeerzeuger aktiviert", "Altenatieve warmtebron geactiveerd", "Alternativ värmekälla aktivering", "aktywacja alternatywnego źródła ciepła", "alternativ varmekilde aktivering", "activation source chaleur alternative")
|
||||
|
||||
Reference in New Issue
Block a user