diff --git a/src/device_library.h b/src/device_library.h index 8d89f7591..f375910e3 100644 --- a/src/device_library.h +++ b/src/device_library.h @@ -112,6 +112,7 @@ // Solar Modules - 0x30, 0x2A (for ww) { 73, DeviceType::SOLAR, F("SM10"), DeviceFlags::EMS_DEVICE_FLAG_SM10}, {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}, {163, DeviceType::SOLAR, F("SM100/MS100"), DeviceFlags::EMS_DEVICE_FLAG_SM100}, {164, DeviceType::SOLAR, F("SM200/MS200"), DeviceFlags::EMS_DEVICE_FLAG_SM100}, @@ -143,6 +144,9 @@ // Gateways - 0x48 {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 {0, DeviceType::GENERIC, F("unknown"), DeviceFlags::EMS_DEVICE_FLAG_NONE} diff --git a/src/devices/generic.cpp b/src/devices/generic.cpp index d5a5a72c6..2cb1dfc8d 100644 --- a/src/devices/generic.cpp +++ b/src/devices/generic.cpp @@ -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_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 void Generic::process_RFSensorMessage(std::shared_ptr telegram) { 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 telegram) { + has_update(telegram, wwSetTemp_, 0); + has_update(telegram, wwCurTemp_, 1); + has_update(telegram, wwCurTemp2_, 3); +} } // namespace emsesp diff --git a/src/devices/generic.h b/src/devices/generic.h index 8c1e6427a..e4beb5a44 100644 --- a/src/devices/generic.h +++ b/src/devices/generic.h @@ -30,9 +30,13 @@ class Generic : public EMSdevice { private: 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 telegram); + void process_MonitorWW(std::shared_ptr telegram); }; } // namespace emsesp diff --git a/src/devices/solar.cpp b/src/devices/solar.cpp index 68650deaa..c7a97ad96 100644 --- a/src/devices/solar.cpp +++ b/src/devices/solar.cpp @@ -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) { 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(0x0104, F("ISM2StatusMessage"), false, MAKE_PF_CB(process_ISM2StatusMessage)); } // device values... @@ -762,6 +763,18 @@ void Solar::process_ISM1StatusMessage(std::shared_ptr telegram) 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 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 */ diff --git a/src/devices/solar.h b/src/devices/solar.h index 54920ac84..6d664d81f 100644 --- a/src/devices/solar.h +++ b/src/devices/solar.h @@ -187,6 +187,7 @@ class Solar : public EMSdevice { void process_ISM1StatusMessage(std::shared_ptr telegram); void process_ISM1Set(std::shared_ptr telegram); + void process_ISM2StatusMessage(std::shared_ptr telegram); bool set_CollectorMaxTemp(const char * value, const int8_t id);