add ISM2 and DHW module #437

This commit is contained in:
MichaelDvP
2022-04-02 19:10:04 +02:00
parent d747ba0b14
commit 4c2408dfda
5 changed files with 40 additions and 1 deletions

View File

@@ -112,6 +112,7 @@
// Solar Modules - 0x30, 0x2A (for ww) // Solar Modules - 0x30, 0x2A (for ww)
{ 73, DeviceType::SOLAR, F("SM10"), DeviceFlags::EMS_DEVICE_FLAG_SM10}, { 73, DeviceType::SOLAR, F("SM10"), DeviceFlags::EMS_DEVICE_FLAG_SM10},
{101, DeviceType::SOLAR, F("ISM1"), DeviceFlags::EMS_DEVICE_FLAG_ISM}, {101, DeviceType::SOLAR, F("ISM1"), DeviceFlags::EMS_DEVICE_FLAG_ISM},
{103, DeviceType::SOLAR, F("ISM2"), DeviceFlags::EMS_DEVICE_FLAG_ISM},
{162, DeviceType::SOLAR, F("SM50"), DeviceFlags::EMS_DEVICE_FLAG_SM100}, {162, DeviceType::SOLAR, F("SM50"), DeviceFlags::EMS_DEVICE_FLAG_SM100},
{163, DeviceType::SOLAR, F("SM100/MS100"), DeviceFlags::EMS_DEVICE_FLAG_SM100}, {163, DeviceType::SOLAR, F("SM100/MS100"), DeviceFlags::EMS_DEVICE_FLAG_SM100},
{164, DeviceType::SOLAR, F("SM200/MS200"), DeviceFlags::EMS_DEVICE_FLAG_SM100}, {164, DeviceType::SOLAR, F("SM200/MS200"), DeviceFlags::EMS_DEVICE_FLAG_SM100},
@@ -143,6 +144,9 @@
// Gateways - 0x48 // Gateways - 0x48
{189, DeviceType::GATEWAY, F("KM200/MB LAN 2"), DeviceFlags::EMS_DEVICE_FLAG_NONE}, {189, DeviceType::GATEWAY, F("KM200/MB LAN 2"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
// generic 0x41 DHW module
{100, DeviceType::GENERIC, F("DHW module"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
// Generic - 0x40 or other with no product-id and no version // Generic - 0x40 or other with no product-id and no version
{0, DeviceType::GENERIC, F("unknown"), DeviceFlags::EMS_DEVICE_FLAG_NONE} {0, DeviceType::GENERIC, F("unknown"), DeviceFlags::EMS_DEVICE_FLAG_NONE}

View File

@@ -31,11 +31,28 @@ Generic::Generic(uint8_t device_type, uint8_t device_id, uint8_t product_id, con
register_telegram_type(0x435, F("RFSensorMessage"), false, MAKE_PF_CB(process_RFSensorMessage)); register_telegram_type(0x435, F("RFSensorMessage"), false, MAKE_PF_CB(process_RFSensorMessage));
register_device_value(DeviceValueTAG::TAG_NONE, &rfTemp_, DeviceValueType::SHORT, FL_(div10), FL_(RFTemp), DeviceValueUOM::DEGREES); register_device_value(DeviceValueTAG::TAG_NONE, &rfTemp_, DeviceValueType::SHORT, FL_(div10), FL_(RFTemp), DeviceValueUOM::DEGREES);
} }
if (device_id == 0x41) { // DHW module
register_telegram_type(0x34, F("MonitorWW"), false, MAKE_PF_CB(process_MonitorWW));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA_WW, &wwSetTemp_, DeviceValueType::UINT, nullptr, FL_(wwSetTemp), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA_WW, &wwCurTemp_, DeviceValueType::USHORT, FL_(div10), FL_(wwCurTemp), DeviceValueUOM::DEGREES);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA_WW, &wwCurTemp2_, DeviceValueType::USHORT, FL_(div10), FL_(wwCurTemp2), DeviceValueUOM::DEGREES);
}
} }
// type 0x435 rf remote sensor // type 0x435 rf remote sensor
void Generic::process_RFSensorMessage(std::shared_ptr<const Telegram> telegram) { void Generic::process_RFSensorMessage(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, rfTemp_, 0); // is * 10 has_update(telegram, rfTemp_, 0); // is * 10
} }
/*
* MonitorWW - type 0x34 - dhw monitor. 10 bytes long
* received every 10 seconds
* Unknown(0x41) -> All(0x00), UBAMonitorWW(0x34), data: 37 02 25 02 25 00 00 00 00
*/
void Generic::process_MonitorWW(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, wwSetTemp_, 0);
has_update(telegram, wwCurTemp_, 1);
has_update(telegram, wwCurTemp2_, 3);
}
} // namespace emsesp } // namespace emsesp

View File

@@ -30,9 +30,13 @@ class Generic : public EMSdevice {
private: private:
static uuid::log::Logger logger_; static uuid::log::Logger logger_;
int16_t rfTemp_; int16_t rfTemp_;
uint8_t wwSetTemp_; // DHW set temperature
uint16_t wwCurTemp_; // DHW current temperature
uint16_t wwCurTemp2_; // DHW current temperature storage
void process_RFSensorMessage(std::shared_ptr<const Telegram> telegram); void process_RFSensorMessage(std::shared_ptr<const Telegram> telegram);
void process_MonitorWW(std::shared_ptr<const Telegram> telegram);
}; };
} // namespace emsesp } // namespace emsesp

View File

@@ -65,6 +65,7 @@ Solar::Solar(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c
if (flags == EMSdevice::EMS_DEVICE_FLAG_ISM) { if (flags == EMSdevice::EMS_DEVICE_FLAG_ISM) {
register_telegram_type(0x0103, F("ISM1StatusMessage"), true, MAKE_PF_CB(process_ISM1StatusMessage)); register_telegram_type(0x0103, F("ISM1StatusMessage"), true, MAKE_PF_CB(process_ISM1StatusMessage));
register_telegram_type(0x0101, F("ISM1Set"), true, MAKE_PF_CB(process_ISM1Set)); register_telegram_type(0x0101, F("ISM1Set"), true, MAKE_PF_CB(process_ISM1Set));
register_telegram_type(0x0104, F("ISM2StatusMessage"), false, MAKE_PF_CB(process_ISM2StatusMessage));
} }
// device values... // device values...
@@ -762,6 +763,18 @@ void Solar::process_ISM1StatusMessage(std::shared_ptr<const Telegram> telegram)
has_bitupdate(telegram, cylHeated_, 9, 2); // cyl full has_bitupdate(telegram, cylHeated_, 9, 2); // cyl full
} }
/*
* Junkers ISM12 Solar Module - type 0x0104 EMS+ for heat assist
* ?(0x103), data: 00 00 00 00 00 7A 01 15 00 00 05 37 F0
* ?(0x104), data: 01 A9 01 22 27 0F 27 0F 27 0F 27 0F 27 0F 27 0F
* ?(0x104), data: 01 01 00 00 00 00 00 27 0F 27 0F (offset 16)
*/
void Solar::process_ISM2StatusMessage(std::shared_ptr<const Telegram> telegram) {
has_update(telegram, cylMiddleTemp_, 0); // Temperature Middle of Solar Boiler cyl
has_update(telegram, retHeatAssist_, 2); // return temperature from heating T4
has_bitupdate(telegram, m1Valve_, 17, 0); // return valve DUW1 (also 16,0)
}
/* /*
* Junkers ISM1 Solar Module - type 0x0101 EMS+ for setting values * Junkers ISM1 Solar Module - type 0x0101 EMS+ for setting values
*/ */

View File

@@ -187,6 +187,7 @@ class Solar : public EMSdevice {
void process_ISM1StatusMessage(std::shared_ptr<const Telegram> telegram); void process_ISM1StatusMessage(std::shared_ptr<const Telegram> telegram);
void process_ISM1Set(std::shared_ptr<const Telegram> telegram); void process_ISM1Set(std::shared_ptr<const Telegram> telegram);
void process_ISM2StatusMessage(std::shared_ptr<const Telegram> telegram);
bool set_CollectorMaxTemp(const char * value, const int8_t id); bool set_CollectorMaxTemp(const char * value, const int8_t id);