Not sure if its just a quirk of my batteries (Fogstar 16kwh) but commands to invalid battery indexes always seem to succeed with valid frames, so the method you use to discover batteries always returns 16, CMD_VERSION even returns a completely valid version string on all indexes. worked around the problem by using CMD_ANALOG, still returns a valid frame but just checked the voltage wasn't 0, some other static data (like cell count) in the frame was what would be a valid value though.
Not sure if its just a quirk of my batteries (Fogstar 16kwh) but commands to invalid battery indexes always seem to succeed with valid frames, so the method you use to discover batteries always returns 16,
CMD_VERSIONeven returns a completely valid version string on all indexes. worked around the problem by usingCMD_ANALOG, still returns a valid frame but just checked the voltage wasn't 0, some other static data (like cell count) in the frame was what would be a valid value though.