DIYBMS v4

This is a strange one @philips - however great bug reporting, screenshots and lots of info - thanks.

Is the single relay used to disconnect the battery? How is that connected?
Are you using CAN charge control ?

As the MQTT data is only logged out at a fixed interval, I suspect the error is toggling on/off quickly so the disconnect happens, but isn’t caught by the MQTT interval.

In the next release, I’ve changed the MQTT triggers, so it runs on status change rather than just a fixed interval. You can install this release if you wish to. This may help narrow down the problem.

You may need to capture the serial output of the ESP32 for a long period of time until the error occurs.