@@ -30,15 +30,23 @@ Water::Water(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c
3030 int8_t tag = DeviceValueTAG::TAG_DHW1 + dhw_;
3131 if (flags == EMSdevice::EMS_DEVICE_FLAG_SM100) { // device_id 0x2A, DHW3
3232 // telegram handlers
33- register_telegram_type (0x07D6 , " SM100wwTemperature" , false , MAKE_PF_CB (process_SM100wwTemperature));
34- register_telegram_type (0x07AA , " SM100wwStatus" , false , MAKE_PF_CB (process_SM100wwStatus));
35- register_telegram_type (0x07AB , " SM100wwCommand" , false , MAKE_PF_CB (process_SM100wwCommand));
36- register_telegram_type (0x07AC , " SM100wwParam1" , false , MAKE_PF_CB (process_SM100wwParam2));
37- register_telegram_type (0x07A5 , " SM100wwCirc" , true , MAKE_PF_CB (process_SM100wwCirc));
38- register_telegram_type (0x07A6 , " SM100wwParam" , true , MAKE_PF_CB (process_SM100wwParam));
39- register_telegram_type (0x07AE , " SM100wwKeepWarm" , true , MAKE_PF_CB (process_SM100wwKeepWarm));
40- register_telegram_type (0x07E0 , " SM100wwStatus2" , true , MAKE_PF_CB (process_SM100wwStatus2));
41- register_telegram_type (0x07AD , " SM100ValveStatus" , false , MAKE_PF_CB (process_SM100ValveStatus));
33+ if (tag == DeviceValueTAG::TAG_DHW3) {
34+ register_telegram_type (0x07AA , " SM100wwStatus" , false , MAKE_PF_CB (process_SM100wwStatus));
35+ register_telegram_type (0x07AC , " SM100wwParam1" , false , MAKE_PF_CB (process_SM100wwParam2));
36+ register_telegram_type (0x07A5 , " SM100wwCirc" , true , MAKE_PF_CB (process_SM100wwCirc));
37+ register_telegram_type (0x07A6 , " SM100wwParam" , true , MAKE_PF_CB (process_SM100wwParam));
38+ register_telegram_type (0x07AE , " SM100wwKeepWarm" , true , MAKE_PF_CB (process_SM100wwKeepWarm));
39+ register_telegram_type (0x07AD , " SM100ValveStatus" , false , MAKE_PF_CB (process_SM100ValveStatus));
40+ register_telegram_type (0x07AB , " SM100wwCommand" , false , MAKE_PF_CB (process_SM100wwCommand));
41+ register_telegram_type (0x07D6 , " SM100wwTemperature" , false , MAKE_PF_CB (process_SM100wwTemperature));
42+ register_telegram_type (0x07E0 , " SM100wwStatus2" , true , MAKE_PF_CB (process_SM100wwStatus2));
43+ // 0x07C3
44+ } else if (tag == DeviceValueTAG::TAG_DHW4) {
45+ register_telegram_type (0x07A6 , " SM100wwParam" , true , MAKE_PF_CB (process_SM100wwParam));
46+ register_telegram_type (0x07D7 , " SM100wwTemperature" , false , MAKE_PF_CB (process_SM100wwTemperature));
47+ register_telegram_type (0x07E1 , " SM100wwStatus2" , true , MAKE_PF_CB (process_SM100wwStatus2));
48+ register_telegram_type (0x07C3 , " SM100wwCommand" , false , MAKE_PF_CB (process_SM100wwCommand));
49+ }
4250 // device values...
4351 register_device_value (tag, &wwTemp_, DeviceValueType::UINT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_ (wwTemp), DeviceValueUOM::DEGREES);
4452 register_device_value (tag, &wwTemp2_, DeviceValueType::UINT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_ (wwStorageTemp1), DeviceValueUOM::DEGREES);
@@ -100,7 +108,7 @@ Water::Water(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c
100108 }
101109}
102110
103- // SM100wwTemperature - 0x07D6
111+ // SM100wwTemperature - 0x07D6, dhw4: 0x07D7
104112// Solar Module(0x2A) -> (0x00), (0x7D6), data: 01 C1 00 00 02 5B 01 AF 01 AD 80 00 01 90
105113void Water::process_SM100wwTemperature (std::shared_ptr<const Telegram> telegram) {
106114 has_update (telegram, wwTemp_, 0 ); // is *10 TS17
@@ -156,12 +164,10 @@ void Water::process_SM100ValveStatus(std::shared_ptr<const Telegram> telegram) {
156164 has_update (telegram, wwRetValve_, 1 );
157165}
158166
159- /*
160- // SM100ww? - 0x7E0, some kind of status
167+ // SM100ww? - 0x7E0, some kind of status, dhw4: 0x7E1
161168// data: 00 00 46 00 00 01 06 0E 06 0E 00 00 00 00 00 03 03 03 03
162169// publishes single values offset 1/2(16bit), offset 5, offset 6, offset 7, offset 8, offset 9,
163170// status2 = 03:"no heat", 06:"heat request", 08:"disinfecting", 09:"hold"
164- */
165171void Water::process_SM100wwStatus2 (std::shared_ptr<const Telegram> telegram) {
166172 // has_update(telegram, wwFlow_, 7); // single byte, wrong see #1387
167173 has_update (telegram, wwStatus2_, 8 );
@@ -170,6 +176,7 @@ void Water::process_SM100wwStatus2(std::shared_ptr<const Telegram> telegram) {
170176
171177// SM100wwCommand - 0x07AB
172178// Thermostat(0x10) -> Solar Module(0x2A), (0x7AB), data: 01 00 01
179+ // or dhw3 module (0x2A) -> dhw4 module(0x2B), (0x7C3), data: 01 01 00
173180void Water::process_SM100wwCommand (std::shared_ptr<const Telegram> telegram) {
174181 // not implemented yet
175182}
@@ -268,7 +275,7 @@ bool Water::set_wwMaxTemp(const char * value, const int8_t id) {
268275 } else if (flags () == EMSdevice::EMS_DEVICE_FLAG_MMPLUS) {
269276 write_command (0x313 + dhw_, 10 , (uint8_t )temperature, 0x313 + dhw_);
270277 } else { // SM100
271- write_command (0x7A6 , 8 , (uint8_t )temperature, 0x7A6 );
278+ write_command (0x7A6 , 8 , (uint8_t )temperature, 0x7A6 );
272279 }
273280 return true ;
274281}
0 commit comments