reverted to TAG_NONE, added HP activities, added some json space

This commit is contained in:
sunbuzz
2021-09-02 15:25:37 +02:00
parent 17db542775
commit e26451fcc0
6 changed files with 48 additions and 12 deletions

View File

@@ -185,12 +185,16 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
register_device_value(TAG_BOILER_DATA, &nrgSuppCooling_, DeviceValueType::ULONG, nullptr, FL_(nrgSuppCooling), DeviceValueUOM::KWH);
register_device_value(TAG_BOILER_DATA, &nrgSuppPool_, DeviceValueType::ULONG, nullptr, FL_(nrgSuppPool), DeviceValueUOM::KWH);
register_device_value(TAG_BOILER_DATA, &hpPower_, DeviceValueType::UINT, FL_(div10), FL_(hpPower), DeviceValueUOM::KW);
register_device_value(TAG_BOILER_DATA, &hpCompRunning_, DeviceValueType::BOOL, nullptr, FL_(hpCompRunning), DeviceValueUOM::BOOLEAN);
register_device_value(TAG_BOILER_DATA, &hpCompOn_, DeviceValueType::BOOL, nullptr, FL_(hpCompOn), DeviceValueUOM::BOOLEAN);
register_device_value(TAG_BOILER_DATA, &hpActivity_, DeviceValueType::ENUM, FL_(enum_hpactivity), FL_(hpActivity), DeviceValueUOM::LIST);
register_device_value(TAG_BOILER_DATA, &hpHeatingOn_, DeviceValueType::BOOL, nullptr, FL_(hpHeatingOn), DeviceValueUOM::BOOLEAN);
register_device_value(TAG_BOILER_DATA, &hpCoolingOn_, DeviceValueType::BOOL, nullptr, FL_(hpCoolingOn), DeviceValueUOM::BOOLEAN);
register_device_value(TAG_BOILER_DATA, &hpWwOn_, DeviceValueType::BOOL, nullptr, FL_(hpWwOn), DeviceValueUOM::BOOLEAN);
register_device_value(TAG_BOILER_DATA, &hpPoolOn_, DeviceValueType::BOOL, nullptr, FL_(hpPoolOn), DeviceValueUOM::BOOLEAN);
register_device_value(TAG_BOILER_DATA, &hpBrinePumpSpd_, DeviceValueType::UINT, nullptr, FL_(hpBrinePumpSpd), DeviceValueUOM::PERCENT);
register_device_value(TAG_BOILER_DATA, &hpSwitchValve_, DeviceValueType::BOOL, nullptr, FL_(hpSwitchValve), DeviceValueUOM::BOOLEAN);
register_device_value(TAG_BOILER_DATA, &hpCompSpd_, DeviceValueType::UINT, nullptr, FL_(hpCompSpd), DeviceValueUOM::PERCENT);
register_device_value(TAG_BOILER_DATA, &hpCircSpd_, DeviceValueType::UINT, nullptr, FL_(hpCircSpd), DeviceValueUOM::PERCENT);
register_device_value(TAG_BOILER_DATA, &hpActivity_, DeviceValueType::ENUM, FL_(enum_hpactivity), FL_(hpActivity), DeviceValueUOM::LIST);
register_device_value(TAG_BOILER_DATA, &hpBrineIn_, DeviceValueType::SHORT, FL_(div10), FL_(hpBrineIn), DeviceValueUOM::DEGREES);
register_device_value(TAG_BOILER_DATA, &hpBrineOut_, DeviceValueType::SHORT, FL_(div10), FL_(hpBrineOut), DeviceValueUOM::DEGREES);
register_device_value(TAG_BOILER_DATA, &hpSuctionGas_, DeviceValueType::SHORT, FL_(div10), FL_(hpSuctionGas), DeviceValueUOM::DEGREES);
@@ -675,13 +679,37 @@ void Boiler::process_UBAEnergySupplied(std::shared_ptr<const Telegram> telegram)
void Boiler::process_HpPower(std::shared_ptr<const Telegram> telegram) {
has_update(telegram->read_value(hpPower_, 11));
has_update(telegram->read_bitvalue(hpCompRunning_, 3, 4));
has_update(telegram->read_bitvalue(hpCompOn_, 3, 4));
has_update(telegram->read_value(hpBrinePumpSpd_, 5));
has_update(telegram->read_value(hpCompSpd_, 17));
has_update(telegram->read_value(hpCircSpd_, 4));
has_update(telegram->read_bitvalue(hpSwitchValve_, 0, 4));
has_update(telegram->read_value(hpActivity_, 7));
hpHeatingOn_ = 0;
hpCoolingOn_ = 0;
hpWwOn_ = 0;
hpPoolOn_ = 0;
switch (hpActivity_) {
case 1: {
hpHeatingOn_ = 0xFF;
break;
}
case 2: {
hpCoolingOn_ = 0xFF;
break;
}
case 3: {
hpWwOn_ = 0xFF;;
break;
}
case 4: {
hpPoolOn_ = 0xFF;;
break;
}
}
}
// Heatpump outdoor unit - type 0x48F

View File

@@ -167,7 +167,7 @@ class Boiler : public EMSdevice {
// heatpump
uint8_t hpPower_;
uint8_t hpCompRunning_;
uint8_t hpCompOn_;
uint8_t hpBrinePumpSpd_;
uint8_t hpCompSpd_;
uint8_t hpCircSpd_;
@@ -177,6 +177,11 @@ class Boiler : public EMSdevice {
uint16_t hpHotGas_;
uint8_t hpSwitchValve_;
uint8_t hpActivity_;
uint8_t hpHeatingOn_;
uint8_t hpCoolingOn_;
uint8_t hpWwOn_;
uint8_t hpPoolOn_;
uint8_t hpHeatingOn;
int16_t hpTc0_;
int16_t hpTc1_;
int16_t hpTc3_;

View File

@@ -26,15 +26,15 @@ uuid::log::Logger Mixer::logger_{F_(mixer), uuid::log::Facility::CONSOLE};
Mixer::Mixer(uint8_t device_type, uint8_t device_id, uint8_t product_id, const std::string & version, const std::string & name, uint8_t flags, uint8_t brand)
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
LOG_DEBUG(F("Adding new Mixer with device ID 0x%02X"), device_id);
if (flags == EMSdevice::EMS_DEVICE_FLAG_MP) {
type_ = Type::MP;
register_telegram_type(0x5BA, F("HpPoolStatus"), true, MAKE_PF_CB(process_HpPoolStatus));
register_device_value(TAG_MP, &poolTemp_, DeviceValueType::SHORT, FL_(div10), FL_(poolTemp), DeviceValueUOM::DEGREES);
register_device_value(TAG_MP, &poolShuntStatus_, DeviceValueType::ENUM, FL_(enum_shunt), FL_(poolShuntStatus), DeviceValueUOM::LIST);
register_device_value(TAG_MP, &poolShunt_, DeviceValueType::UINT, nullptr, FL_(poolShunt), DeviceValueUOM::PERCENT);
register_device_value(TAG_NONE, &poolTemp_, DeviceValueType::SHORT, FL_(div10), FL_(poolTemp), DeviceValueUOM::DEGREES);
register_device_value(TAG_NONE, &poolShuntStatus_, DeviceValueType::ENUM, FL_(enum_shunt), FL_(poolShuntStatus), DeviceValueUOM::LIST);
register_device_value(TAG_NONE, &poolShunt_, DeviceValueType::UINT, nullptr, FL_(poolShunt), DeviceValueUOM::PERCENT);
}
else {