This page contains affiliate links. If you purchase through them we may earn a small commission at no extra cost to you. Learn more
BMS-to-Inverter Communication: GitHub Repos and Protocols

Why communication matters
When a hybrid inverter manages a battery, it needs to know:
- Current state of charge (SOC) — how full is the battery?
- Voltage of each cell — are any cells over or under voltage?
- Temperature — is the battery too hot or cold for safe operation?
- Maximum charge/discharge current — how much power can the battery safely accept or deliver?
- Alarm states — is anything wrong?
This information flows from the Battery Management System (BMS) to the inverter via a digital communication link. The BMS acts as the battery's brain, and the inverter acts on its instructions.
If the inverter doesn't receive valid data from the BMS, it will refuse to charge or discharge the battery — a safety feature that prevents damage to unmonitored cells.
Communication protocols
CAN bus (Controller Area Network)
The most common protocol for battery-inverter communication. Originally designed for automotive applications, CAN bus uses two wires (CAN-H and CAN-L) and sends data in structured frames (messages) at speeds typically between 250kbps and 500kbps.
Different inverter brands expect different CAN message formats:
- Pylontech protocol — the de facto standard. Supported by SunSynk, Solis, Growatt, Sofar, and many others. If your BMS can speak Pylontech CAN, it will work with the widest range of inverters.
- BYD protocol — used by BYD batteries and supported by several inverters.
- SMA protocol — specific to SMA inverters.
- Victron protocol — Victron's own CAN implementation (VE.CAN).
- GivEnergy protocol — proprietary, used only with GivEnergy batteries.
RS485
A serial communication protocol used by some inverters and BMS units. Simpler than CAN bus but less standardised. RS485 uses two wires (A and B) and supports multiple devices on the same bus.
- Some Growatt and Solis models use RS485 for battery communication
- Several Chinese BMS boards (JBD, Daly) support RS485 output
- Baud rate and message format vary by manufacturer
Bluetooth / WiFi (BMS monitoring only)
Many aftermarket BMS boards (JBD, Daly, ANT) have Bluetooth or WiFi for monitoring via a phone app. This is useful for checking cell voltages and SOH but doesn't replace the CAN/RS485 link to the inverter — the inverter needs a wired protocol.
Open-source protocol translators
This is where the DIY community shines. Several open-source projects on GitHub translate between BMS protocols and inverter protocols, using cheap microcontrollers as bridges.
Key GitHub projects
Battery-Emulator (github.com/dalathegreat/Battery-Emulator)
The most comprehensive project for repurposing EV batteries with solar inverters. Supports:
- Nissan Leaf battery communication
- BMW i3 battery communication
- Tesla battery module communication
- Output in Pylontech, BYD, SMA, and Victron CAN protocols
- Runs on ESP32 microcontroller (~£5–£10)
- Active community with regular updates
SimpBMS (github.com/Tom-evnut/SimpBMS)
A simple BMS system for DIY battery packs using a Teensy or ESP32 microcontroller. Monitors cells, provides balancing, and outputs data to an inverter via CAN bus.
DIYBMS (github.com/stuartpittaway/diyBMSv4)
A modular BMS system where each cell has its own monitoring board. Communicates with a central controller that can output CAN bus data to an inverter. Well-documented and widely used in the UK DIY solar community.
Batrium-to-Pylontech and similar translation scripts
Various community-developed scripts that take data from one BMS format and output it in a different inverter-compatible format.
Start with the Battery-Emulator project
If you're repurposing EV batteries, the Battery-Emulator project by dalathegreat is the best starting point. It has the broadest vehicle battery support, outputs in the most common inverter protocols, and has an active community that can help with debugging. The hardware cost is minimal (an ESP32 board, a CAN transceiver module, and some cables — under £20 total).
Hardware requirements
For a basic CAN bus translation setup:
| Component | Cost | Purpose |
|---|---|---|
| ESP32 development board | £5–£10 | Runs the translation software |
| MCP2515 CAN transceiver module | £3–£5 | Converts ESP32 signals to CAN bus |
| CAN bus cable (twisted pair) | £5 | Connects to inverter CAN port |
| 120-ohm termination resistors | £1 | Required at each end of CAN bus |
| USB power supply | £5 | Powers the ESP32 |
| Total | ~£20–£25 |
For a complete DIY BMS + translation:
Add the BMS components:
| Component | Cost | Purpose |
|---|---|---|
| BMS board (e.g., JBD/Daly 16S) | £30–£80 | Cell monitoring and balancing |
| Cell voltage sense wires | £10–£20 | Connect BMS to each cell group |
| Temperature sensors | £5–£10 | Monitor pack temperature |
| Contactor/relay | £20–£40 | Main battery disconnect |
| Fuse | £10–£20 | Overcurrent protection |
A practical example
Scenario: 16S Nissan Leaf module pack (48V nominal) with JBD BMS, connected to a SunSynk inverter via Pylontech CAN protocol.
- Wire the Leaf modules in series for 48V nominal (16 cell groups)
- Install JBD 16S BMS — connect balance leads to each cell group, temperature sensors to the pack
- Configure JBD BMS via Bluetooth app — set charge/discharge limits, cell voltage thresholds, temperature limits
- Set up ESP32 with Battery-Emulator — configure for JBD BMS input (via UART/Bluetooth) and Pylontech CAN output
- Connect ESP32 CAN output to SunSynk CAN port (pin 4: CAN-H, pin 5: CAN-L on most SunSynk models)
- Configure SunSynk to expect Pylontech battery on the CAN bus
- Test — verify the SunSynk sees the battery, reads SOC, and charge/discharge cycles work correctly
This is not a beginner project
If terms like CAN bus, UART, termination resistor, and baud rate are unfamiliar, this project requires significant learning before you begin. Start by reading the documentation for your chosen BMS and inverter, understand the communication protocols, and practice with the hardware on a bench before connecting to a live battery pack. Mistakes in configuration can result in overcharging (fire risk) or other dangerous conditions.
Debugging communication issues
Common problems and solutions:
- Inverter doesn't detect battery: Check CAN bus wiring (CAN-H to CAN-H, CAN-L to CAN-L), verify termination resistors, check baud rate matches
- SOC reads incorrectly: Calibrate the BMS — fully charge, then fully discharge to set capacity reference points
- Charge current limited unexpectedly: BMS may be reporting a temperature alarm or cell imbalance — check BMS app for alerts
- Communication drops intermittently: Check for loose connections, electrical noise (route CAN cables away from DC power cables), or WiFi interference with ESP32
- Inverter shows "battery fault": Protocol mismatch — verify the exact CAN message format your inverter expects
Community resources
The UK DIY solar battery community is active and helpful:
- DIYSolarForum.com — extensive threads on BMS-to-inverter integration
- YouTube channels (Off-Grid Garage, DIY Solar with Will Prowse) — build walkthroughs
- GitHub Issues and Discussions on the Battery-Emulator and DIYBMS projects
- Facebook groups for UK DIY solar (several thousand active members)
- Reddit r/diysolar — international community with UK participants
Share this article
Stay informed
Get free solar updates direct to your inbox
Related reading

Repurposing EV Batteries for Home Storage
Using second-life EV batteries for home solar storage in the UK. Sourcing, testing, safety considerations, and whether DIY repurposing is worth the effort.

Battery Capacity Testing: Equipment and Methods
How to test the actual capacity of solar battery cells and modules. Equipment needed, testing methods, and how to assess second-life EV battery health.

Series vs Parallel Battery Configurations
Understanding series and parallel battery configurations for DIY solar storage. Voltage, capacity, and how to build safe battery packs for home use in the UK.
Switch to Octopus Energy
Get 50 credit when you switch. We get 50 too — win-win.
What does this mean for YOUR home?
Design your perfect solar setup in under 3 minutes. Free, no sign-up required.
Build Your Solar System