diff --git a/src/AlarmRules.cpp b/src/AlarmRules.cpp index 52dac714..ecb11ea7 100644 --- a/src/AlarmRules.cpp +++ b/src/AlarmRules.cpp @@ -627,10 +627,14 @@ void rules_Bms() u8_lAlarmruleBmsNr=WebSettings::getInt(ID_PARAM_ALARM_BTDEV_BMS_SELECT,i,DT_ID_PARAM_ALARM_BTDEV_BMS_SELECT); if(u8_lAlarmruleBmsNr==127) continue; //'AUS' //Ist überhaupt ein Device parametriert? - if((u8_lAlarmruleBmsNr<BT_DEVICES_COUNT && WebSettings::getInt(ID_PARAM_SS_BTDEV,u8_lAlarmruleBmsNr,DT_ID_PARAM_SS_BTDEV)>0 && !WebSettings::getString(ID_PARAM_SS_BTDEVMAC,u8_lAlarmruleBmsNr).equals("")) || - (u8_lAlarmruleBmsNr>=BT_DEVICES_COUNT && WebSettings::getInt(ID_PARAM_SERIAL_CONNECT_DEVICE,u8_lAlarmruleBmsNr-BT_DEVICES_COUNT,DT_ID_PARAM_SERIAL_CONNECT_DEVICE)!=0 ) || - (u8_lAlarmruleBmsNr>(BT_DEVICES_COUNT+2) && u8_lAlarmruleBmsNr<(u8_numberOfBmsOnSerial2+BT_DEVICES_COUNT+2) && (u8_bmsSerial2==ID_SERIAL_DEVICE_SEPLOSBMS || u8_bmsSerial2==ID_SERIAL_DEVICE_SYLCINBMS || - u8_bmsSerial2==ID_SERIAL_DEVICE_GOBELBMS || u8_bmsSerial2==ID_SERIAL_DEVICE_GOBEL_PC200)) ) + if((u8_lAlarmruleBmsNr<BT_DEVICES_COUNT + && WebSettings::getInt(ID_PARAM_SS_BTDEV,u8_lAlarmruleBmsNr,DT_ID_PARAM_SS_BTDEV)>0 + && !WebSettings::getString(ID_PARAM_SS_BTDEVMAC,u8_lAlarmruleBmsNr).equals("")) + ||(u8_lAlarmruleBmsNr>=BT_DEVICES_COUNT + && WebSettings::getInt(ID_PARAM_SERIAL_CONNECT_DEVICE,u8_lAlarmruleBmsNr-BT_DEVICES_COUNT,DT_ID_PARAM_SERIAL_CONNECT_DEVICE)!=0 ) + || (u8_lAlarmruleBmsNr>(BT_DEVICES_COUNT+2) + && u8_lAlarmruleBmsNr<(u8_numberOfBmsOnSerial2+BT_DEVICES_COUNT+2) + && isMultiple485bms(u8_bmsSerial2)) ) { //Wenn Alram für das Device aktiv ist if(WebSettings::getInt(ID_PARAM_ALARM_BTDEV_ALARM_AKTION,i,DT_ID_PARAM_ALARM_BTDEV_ALARM_AKTION)>0) diff --git a/src/BmsData.cpp b/src/BmsData.cpp index 293d8afa..533fe4d0 100644 --- a/src/BmsData.cpp +++ b/src/BmsData.cpp @@ -669,6 +669,7 @@ bool isMultiple485bms(uint8_t bms) case ID_SERIAL_DEVICE_GOBELBMS: case ID_SERIAL_DEVICE_GOBEL_PC200: case ID_SERIAL_DEVICE_JKINVERTERBMS: + case ID_SERIAL_DEVICE_SEPLOSBMS_V3: return true; break;