stuartpittaway / diyBMSv4ESP32

diyBMS v4 code for the ESP32 and new controller hardware
Other
166 stars 78 forks source link

Failed module communication does not trigger rules on reboot #248

Open tobimai opened 8 months ago

tobimai commented 8 months ago

When a module is disconnected, normally the "Internal BMS error" rule is triggered and charging stopped (I have the charger relais programmed on output 4).

But when I then reboot the Controller, it stays in the "Waiting for modules" screen with the outputs in the default state, not triggering the rule despite it being the same "error state" as before.

Software version is from the 2023-10-14, so pretty new and Hardware is the first version of the board that had the INA chip on-board.

stuartpittaway commented 8 months ago

Hi @tobimai this is normal behaviour on boot up - the controller will wait for communication with all the modules before normal operation is performed.

What would you prefer the system to do?

tobimai commented 8 months ago

While it's rather unlikely, there could be a case where the module communication breaks (e.g. broken cable) which turns charging/discharging off (well most setups probably use the outputs for charge/discharge control) as the BMS is unable to monitor cell voltages.

If the controller reboots now for some reason, all these limitations are gone. So IMO it would make sense if it triggers the "Internal BMS error" rule as long as the controller does not have any valid module data.

stuartpittaway commented 8 months ago

The trouble with that is as soon as the BMS is rebooted (during an upgrade for example) it will trigger the rule and potentially disconnect the battery/fuse/breaker etc.

tobimai commented 3 months ago

Sorry kinda forgot this existed. I get the point, maybe a viable solution would be to have a seperate "Boot state" or something like that which it would have while it's trying the establish communication after boot.

In general it's probably rather unlikely for that to happen, but not impossible.