mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
DHW meter for heatpump #1609, test remote RF sensor
This commit is contained in:
@@ -410,18 +410,18 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
DeviceValueNumOp::DV_NUMOP_DIV100,
|
DeviceValueNumOp::DV_NUMOP_DIV100,
|
||||||
FL_(meterEHeat),
|
FL_(meterEHeat),
|
||||||
DeviceValueUOM::KWH);
|
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,
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||||
&meterHeat_,
|
&meterHeat_,
|
||||||
DeviceValueType::ULONG,
|
DeviceValueType::ULONG,
|
||||||
DeviceValueNumOp::DV_NUMOP_DIV100,
|
DeviceValueNumOp::DV_NUMOP_DIV100,
|
||||||
FL_(meterHeat),
|
FL_(meterHeat),
|
||||||
DeviceValueUOM::KWH);
|
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,
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||||
&upTimeTotal_,
|
&upTimeTotal_,
|
||||||
DeviceValueType::TIME,
|
DeviceValueType::TIME,
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
|
|||||||
MAKE_CF_CB(set_heatDrainPan));
|
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, &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_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, &nrgHeat_, DeviceValueType::ULONG, DeviceValueNumOp::DV_NUMOP_DIV100, FL_(nrgHeat), DeviceValueUOM::KWH);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||||
&meterTotal_,
|
&meterTotal_,
|
||||||
@@ -175,6 +175,7 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
|
|||||||
DeviceValueNumOp::DV_NUMOP_DIV100,
|
DeviceValueNumOp::DV_NUMOP_DIV100,
|
||||||
FL_(meterHeat),
|
FL_(meterHeat),
|
||||||
DeviceValueUOM::KWH);
|
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, meterComp_, 4);
|
||||||
has_update(telegram, meterEHeat_, 8);
|
has_update(telegram, meterEHeat_, 8);
|
||||||
has_update(telegram, meterHeat_, 24);
|
has_update(telegram, meterHeat_, 24);
|
||||||
|
has_update(telegram, meterWw_, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ class Heatpump : public EMSdevice {
|
|||||||
uint32_t meterComp_;
|
uint32_t meterComp_;
|
||||||
uint32_t meterEHeat_;
|
uint32_t meterEHeat_;
|
||||||
uint32_t meterHeat_;
|
uint32_t meterHeat_;
|
||||||
|
uint32_t meterWw_;
|
||||||
|
|
||||||
|
|
||||||
void process_HPMonitor1(std::shared_ptr<const Telegram> telegram);
|
void process_HPMonitor1(std::shared_ptr<const Telegram> telegram);
|
||||||
|
|||||||
@@ -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) {
|
} else if ((model() == EMSdevice::EMS_DEVICE_FLAG_BC400) || model() == EMSdevice::EMS_DEVICE_FLAG_RC300) {
|
||||||
if (hc->control == 1) {
|
if (hc->control == 1) {
|
||||||
Roomctrl::set_remotetemp(Roomctrl::RC200, hc->hc(), hc->remotetemp); // RC200
|
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
|
Roomctrl::set_remotetemp(Roomctrl::RC100H, hc->hc(), hc->remotetemp); // RC100H
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ void Roomctrl::send(uint8_t addr) {
|
|||||||
} else if (type_ == FB10) {
|
} else if (type_ == FB10) {
|
||||||
rc_time_[hc] = uuid::get_uptime();
|
rc_time_[hc] = uuid::get_uptime();
|
||||||
temperature(addr, 0x10, hc); // send to master-thermostat (https://github.com/emsesp/EMS-ESP32/issues/336)
|
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();
|
rc_time_[hc] = uuid::get_uptime();
|
||||||
temperature(addr, 0x00, hc); // send to all
|
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
|
* 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) {
|
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
|
// check address, reply only on addresses 0x18..0x1B
|
||||||
if (hc >= HCS || length < 5) {
|
if (hc >= HCS || length < 5) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.6.5-test.12a"
|
#define EMSESP_APP_VERSION "3.6.5-test.12b"
|
||||||
|
|||||||
Reference in New Issue
Block a user