DHW meter for heatpump #1609, test remote RF sensor

This commit is contained in:
MichaelDvP
2024-02-09 09:04:55 +01:00
parent f765d7c31b
commit 464341c2cb
6 changed files with 19 additions and 11 deletions

View File

@@ -410,18 +410,18 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
DeviceValueNumOp::DV_NUMOP_DIV100,
FL_(meterEHeat),
DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
&meterWw_,
DeviceValueType::ULONG,
DeviceValueNumOp::DV_NUMOP_DIV100,
FL_(meterWw),
DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&meterHeat_,
DeviceValueType::ULONG,
DeviceValueNumOp::DV_NUMOP_DIV100,
FL_(meterHeat),
DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
&meterWw_,
DeviceValueType::ULONG,
DeviceValueNumOp::DV_NUMOP_DIV100,
FL_(meterWw),
DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&upTimeTotal_,
DeviceValueType::TIME,

View File

@@ -149,7 +149,7 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
MAKE_CF_CB(set_heatDrainPan));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &heatCable_, DeviceValueType::BOOL, FL_(heatCable), DeviceValueUOM::NONE, MAKE_CF_CB(set_heatCable));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nrgTotal_, DeviceValueType::ULONG, DeviceValueNumOp::DV_NUMOP_DIV100, FL_(nrgTotal), DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW, &nrgWw_, DeviceValueType::ULONG, DeviceValueNumOp::DV_NUMOP_DIV100, FL_(nrgWw), DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA_WW, &nrgWw_, DeviceValueType::ULONG, DeviceValueNumOp::DV_NUMOP_DIV100, FL_(nrgWw), DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nrgHeat_, DeviceValueType::ULONG, DeviceValueNumOp::DV_NUMOP_DIV100, FL_(nrgHeat), DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&meterTotal_,
@@ -175,6 +175,7 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
DeviceValueNumOp::DV_NUMOP_DIV100,
FL_(meterHeat),
DeviceValueUOM::KWH);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA_WW, &meterWw_, DeviceValueType::ULONG, DeviceValueNumOp::DV_NUMOP_DIV100, FL_(meterWw), DeviceValueUOM::KWH);
}
/*
@@ -271,6 +272,7 @@ void Heatpump::process_HpMeters(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, meterComp_, 4);
has_update(telegram, meterEHeat_, 8);
has_update(telegram, meterHeat_, 24);
has_update(telegram, meterWw_, 32);
}
/*

View File

@@ -74,6 +74,7 @@ class Heatpump : public EMSdevice {
uint32_t meterComp_;
uint32_t meterEHeat_;
uint32_t meterHeat_;
uint32_t meterWw_;
void process_HPMonitor1(std::shared_ptr<const Telegram> telegram);

View File

@@ -1839,7 +1839,9 @@ bool Thermostat::set_remotetemp(const char * value, const int8_t id) {
} else if ((model() == EMSdevice::EMS_DEVICE_FLAG_BC400) || model() == EMSdevice::EMS_DEVICE_FLAG_RC300) {
if (hc->control == 1) {
Roomctrl::set_remotetemp(Roomctrl::RC200, hc->hc(), hc->remotetemp); // RC200
} else {
} else if (hc->control == 0) {
Roomctrl::set_remotetemp(Roomctrl::SENSOR, hc->hc(), hc->remotetemp); // RF Sensor
} else { // RC100(2) and RC100H(3)
Roomctrl::set_remotetemp(Roomctrl::RC100H, hc->hc(), hc->remotetemp); // RC100H
}
}

View File

@@ -114,7 +114,7 @@ void Roomctrl::send(uint8_t addr) {
} else if (type_ == FB10) {
rc_time_[hc] = uuid::get_uptime();
temperature(addr, 0x10, hc); // send to master-thermostat (https://github.com/emsesp/EMS-ESP32/issues/336)
} else { // type==RC20
} else { // type==RC20 or SENSOR
rc_time_[hc] = uuid::get_uptime();
temperature(addr, 0x00, hc); // send to all
}
@@ -131,8 +131,11 @@ void Roomctrl::send(uint8_t addr) {
* check if there is a message for the remote room controller
*/
void Roomctrl::check(uint8_t addr, const uint8_t * data, const uint8_t length) {
uint8_t hc = get_hc(addr);
if (type_ == SENSOR) {
return;
}
uint8_t hc = get_hc(addr);
// check address, reply only on addresses 0x18..0x1B
if (hc >= HCS || length < 5) {
return;

View File

@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.6.5-test.12a"
#define EMSESP_APP_VERSION "3.6.5-test.12b"