Extra for toggle switches: PC connection

This separate add-on connects the four Uno toggle switches to BMS 4.38 and also handles the OLED and LEDs. It is for users who want to configure this additional step themselves. It requires Windows, Python 3.11 or later, pyserial and a BMS keyfile with suitable key combinations. Instructions and files are in the separate download.

PC bridge: replace COM5 with your port. Start in observation mode; use --live only with your active BMS keyfile. Inputs are sent only while BMS is in the foreground and In3D. There is no automatic switch-position sync at startup: move switches deliberately. Ctrl+C stops the bridge.

Open only one connection per Uno port: Live Hub or the PC bridge. In bridge mode, the bridge also drives the OLED and LEDs.

py -m pip install -r PC-Bruecke/requirements.txt

py PC-Bruecke/uno_bridge.py --port COM5

py PC-Bruecke/uno_bridge.py --port COM5 --keyfile "C:/BMS/MyBindings.key" --live

valid#0 switches all LEDs off and displays BMS OFFLINE. The PC bridge sends regularly; if no data arrives for 1.5 seconds, the sketch switches the outputs off. Live Hub sends on changes: in that mode the Uno retains the last received values, even if the connection later fails. The quick start explains both modes.

Compiled for Arduino Uno and checked with automated offline tests. Testing the complete setup with a physical panel, OLED and running BMS is still pending.

https://cockpitsuite.com/en/bms-schalter-led-panel.html#arduino-code
