Skip to content

Commit

Permalink
Probleme Alarmtrigger JK Inverter BMS behoben (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
shining-man committed Oct 27, 2024
1 parent 387a5a9 commit 9782593
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/AlarmRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/BmsData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9782593

Please sign in to comment.