mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
add hm200 entities #500
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
## Added
|
## Added
|
||||||
|
|
||||||
- Detect old Tado thermostat, device-id 0x19, no entities
|
- Detect old Tado thermostat, device-id 0x19, no entities
|
||||||
|
- Some more HM200 entities [#500](https://github.com/emsesp/EMS-ESP32/issues/500)
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
|
|||||||
12715
interface/package-lock.json
generated
12715
interface/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -512,13 +512,17 @@ void AnalogSensor::publish_values(const bool force) {
|
|||||||
config["mode"] = "box"; // auto, slider or box
|
config["mode"] = "box"; // auto, slider or box
|
||||||
config["step"] = 0.1;
|
config["step"] = 0.1;
|
||||||
} else if (sensor.type() == AnalogType::COUNTER) {
|
} else if (sensor.type() == AnalogType::COUNTER) {
|
||||||
snprintf(topic, sizeof(topic), "number/%s/analogsensor_%02d/config", Mqtt::basename().c_str(), sensor.gpio());
|
snprintf(topic, sizeof(topic), "sensor/%s/analogsensor_%02d/config", Mqtt::basename().c_str(), sensor.gpio());
|
||||||
snprintf(command_topic, sizeof(command_topic), "%s/analogsensor/%s", Mqtt::basename().c_str(), sensor.name().c_str());
|
snprintf(command_topic, sizeof(command_topic), "%s/analogsensor/%s", Mqtt::basename().c_str(), sensor.name().c_str());
|
||||||
config["cmd_t"] = command_topic;
|
config["cmd_t"] = command_topic;
|
||||||
config["mode"] = "box"; // auto, slider or box
|
config["stat_cla"] = "total_increasing";
|
||||||
config["step"] = sensor.factor();
|
// config["mode"] = "box"; // auto, slider or box
|
||||||
|
// config["step"] = sensor.factor();
|
||||||
|
} else if (sensor.type() == AnalogType::DIGITAL_IN) {
|
||||||
|
snprintf(topic, sizeof(topic), "binary-sensor/%s/analogsensor_%02d/config", Mqtt::basename().c_str(), sensor.gpio());
|
||||||
} else {
|
} else {
|
||||||
snprintf(topic, sizeof(topic), "sensor/%s/analogsensor_%02d/config", Mqtt::basename().c_str(), sensor.gpio());
|
snprintf(topic, sizeof(topic), "sensor/%s/analogsensor_%02d/config", Mqtt::basename().c_str(), sensor.gpio());
|
||||||
|
config["stat_cla"] = "measurement";
|
||||||
}
|
}
|
||||||
|
|
||||||
JsonObject dev = config.createNestedObject("dev");
|
JsonObject dev = config.createNestedObject("dev");
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
|
|||||||
register_telegram_type(0x999, "HPFunctionTest", true, MAKE_PF_CB(process_HPFunctionTest));
|
register_telegram_type(0x999, "HPFunctionTest", true, MAKE_PF_CB(process_HPFunctionTest));
|
||||||
register_telegram_type(0x9A0, "HPTemperature", false, MAKE_PF_CB(process_HPTemperature));
|
register_telegram_type(0x9A0, "HPTemperature", false, MAKE_PF_CB(process_HPTemperature));
|
||||||
register_telegram_type(0x99B, "HPFlowTemp", false, MAKE_PF_CB(process_HPFlowTemp));
|
register_telegram_type(0x99B, "HPFlowTemp", false, MAKE_PF_CB(process_HPFlowTemp));
|
||||||
|
register_telegram_type(0x99C, "HPComp", false, MAKE_PF_CB(process_HPComp));
|
||||||
|
|
||||||
// device values
|
// device values
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &airHumidity_, DeviceValueType::UINT, FL_(airHumidity), DeviceValueUOM::PERCENT);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &airHumidity_, DeviceValueType::UINT, FL_(airHumidity), DeviceValueUOM::PERCENT);
|
||||||
@@ -51,6 +52,9 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
|
|||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpJr0_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpPl1), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpJr0_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpPl1), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpJr1_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpPh1), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpJr1_, DeviceValueType::SHORT, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(hpPh1), DeviceValueUOM::DEGREES);
|
||||||
|
|
||||||
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &heatingPumpMod_, DeviceValueType::UINT, FL_(heatingPumpMod), DeviceValueUOM::PERCENT);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpCompSpd_, DeviceValueType::UINT, FL_(hpCompSpd), DeviceValueUOM::PERCENT);
|
||||||
|
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||||
&controlStrategy_,
|
&controlStrategy_,
|
||||||
DeviceValueType::ENUM,
|
DeviceValueType::ENUM,
|
||||||
@@ -177,6 +181,7 @@ void Heatpump::process_HPFlowTemp(std::shared_ptr<const Telegram> telegram) {
|
|||||||
has_update(telegram, flowTemp_, 4);
|
has_update(telegram, flowTemp_, 4);
|
||||||
has_update(telegram, retTemp_, 6);
|
has_update(telegram, retTemp_, 6);
|
||||||
has_update(telegram, sysRetTemp_, 14);
|
has_update(telegram, sysRetTemp_, 14);
|
||||||
|
has_update(telegram, heatingPumpMod_, 19);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x0998 HPSettings
|
// 0x0998 HPSettings
|
||||||
@@ -193,6 +198,14 @@ void Heatpump::process_HPSettings(std::shared_ptr<const Telegram> telegram) {
|
|||||||
has_update(telegram, switchOverTemp_, 14);
|
has_update(telegram, switchOverTemp_, 14);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 0x099C HPComp
|
||||||
|
// Broadcast (0x099C), data: 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 76 00 00
|
||||||
|
// data: 00 2B 00 03 04 13 00 00 00 00 00 02 02 02 (offset 24)
|
||||||
|
void Heatpump::process_HPComp(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
has_update(telegram, hpCompSpd_, 51);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 0x999 HPFunctionTest
|
||||||
void Heatpump::process_HPFunctionTest(std::shared_ptr<const Telegram> telegram) {
|
void Heatpump::process_HPFunctionTest(std::shared_ptr<const Telegram> telegram) {
|
||||||
has_update(telegram, airPurgeMode_, 0);
|
has_update(telegram, airPurgeMode_, 0);
|
||||||
has_update(telegram, heatPumpOutput_, 2);
|
has_update(telegram, heatPumpOutput_, 2);
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ class Heatpump : public EMSdevice {
|
|||||||
uint8_t energyPriceEl_;
|
uint8_t energyPriceEl_;
|
||||||
uint8_t energyPricePV_;
|
uint8_t energyPricePV_;
|
||||||
int8_t switchOverTemp_;
|
int8_t switchOverTemp_;
|
||||||
|
uint8_t heatingPumpMod_;
|
||||||
|
uint8_t hpCompSpd_;
|
||||||
|
|
||||||
// Function test
|
// Function test
|
||||||
uint8_t airPurgeMode_;
|
uint8_t airPurgeMode_;
|
||||||
@@ -51,19 +53,19 @@ class Heatpump : public EMSdevice {
|
|||||||
uint8_t heatCable_;
|
uint8_t heatCable_;
|
||||||
|
|
||||||
// HM200 temperature
|
// HM200 temperature
|
||||||
int16_t flowTemp_;
|
int16_t flowTemp_; // TH1
|
||||||
int16_t retTemp_;
|
int16_t retTemp_; // TH2
|
||||||
int16_t sysRetTemp_;
|
int16_t sysRetTemp_; // TH3
|
||||||
int16_t hpTc3_; // condenser temp.
|
int16_t hpTc3_; // condenser temp.
|
||||||
int16_t hpTr1_; // compressor temp.
|
int16_t hpTr1_; // compressor temp.
|
||||||
int16_t hpTr3_; // cond. temp. heating
|
int16_t hpTr3_; // cond. temp. heating
|
||||||
int16_t hpTr4_; // cond. temp. clg
|
int16_t hpTr4_; // cond. temp. clg
|
||||||
int16_t hpTr5_; // suction line temp.
|
int16_t hpTr5_; // suction line temp.
|
||||||
int16_t hpTr6_; // hot gas temp.
|
int16_t hpTr6_; // hot gas temp.
|
||||||
int16_t hpTl2_; // inlet air temperature
|
int16_t hpTl2_; // inlet air temperature
|
||||||
int16_t hpTa4_; // drain pan temp.
|
int16_t hpTa4_; // drain pan temp.
|
||||||
int16_t hpJr0_; // low pressure sensor
|
int16_t hpJr0_; // low pressure sensor
|
||||||
int16_t hpJr1_; // high pressure sensor
|
int16_t hpJr1_; // high pressure sensor
|
||||||
|
|
||||||
void process_HPMonitor1(std::shared_ptr<const Telegram> telegram);
|
void process_HPMonitor1(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_HPMonitor2(std::shared_ptr<const Telegram> telegram);
|
void process_HPMonitor2(std::shared_ptr<const Telegram> telegram);
|
||||||
@@ -71,6 +73,8 @@ class Heatpump : public EMSdevice {
|
|||||||
void process_HPFunctionTest(std::shared_ptr<const Telegram> telegram);
|
void process_HPFunctionTest(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_HPTemperature(std::shared_ptr<const Telegram> telegram);
|
void process_HPTemperature(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_HPFlowTemp(std::shared_ptr<const Telegram> telegram);
|
void process_HPFlowTemp(std::shared_ptr<const Telegram> telegram);
|
||||||
|
void process_HPComp(std::shared_ptr<const Telegram> telegram);
|
||||||
|
|
||||||
bool set_controlStrategy(const char * value, const int8_t id);
|
bool set_controlStrategy(const char * value, const int8_t id);
|
||||||
bool set_lowNoiseMode(const char * value, const int8_t id);
|
bool set_lowNoiseMode(const char * value, const int8_t id);
|
||||||
bool set_lowNoiseStart(const char * value, const int8_t id);
|
bool set_lowNoiseStart(const char * value, const int8_t id);
|
||||||
|
|||||||
Reference in New Issue
Block a user