MCPcopy Create free account
hub / github.com/dalathegreat/Battery-Emulator

github.com/dalathegreat/Battery-Emulator @v10.13.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v10.13.0 ↗ · + Follow
3,274 symbols 6,353 edges 381 files 420 documented · 13% updated 1d agov11.1.0 · 2026-07-17★ 2,79889 open issues

Browse by type

Functions 2,739 Types & classes 535
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Battery-Emulator ⚡🔋

GitHub release (with filter) GitHub Repo stars GitHub forks GitHub actions Static Badge

What is Battery Emulator?

Many manufacturers sell home battery systems to enable homeowners to store power collected from the grid, or renewable sources, to use at times when electricity demand is higher. However almost all of these home battery systems charge a high cost for every kilowatt hour (kWh) of capacity you buy.

At the same time, EV manufacturers have been putting high capacity battery packs into their cars, with no firm plan for what should happen to those batteries if the car is damaged in a crash, or reaches the end of its life as a vehicle.

Battery Emulator enables EV battery packs to be repurposed for stationary storage. It acts as a translation layer between the EV battery and the home inverter. This makes it extremely cheap and easy to use large EV batteries in a true plug'n'play fashion!

[!CAUTION] Working with high voltage is dangerous. Always follow local laws and regulations regarding high voltage work. If you are unsure about the rules in your country, consult a licensed electrician for more information.

Quickstart guide 📜

Installation basics 🪛

  1. Connect your Battery Emulator hardware to your EV battery
  2. Connect your Battery Emulator hardware to your inverter
  3. Wire up high voltage cable between the inverter and the battery
  4. Add a low voltage power supply to your Battery Emulator hardware
  5. Configure any additional requirements to allow Battery Emulator to switch on your EV battery (also referred to as 'closing contactors')
  6. Enjoy a big cheap grid connected battery!

For examples showing wiring, see each battery type's own Wiki page. For instance the Nissan LEAF page

How to install the software 💻

Start by watching this quickstart guide

IMAGE ALT TEXT HERE

  1. Open the webinstaller page
  2. Follow the instructions on that page to install the software
  3. After successful installation, connect to the wireless network (Battery-Emulator , password: 123456789)
  4. Go to setup page and configure component selection
  5. (OPTIONAL, connect the board to your home Wifi)
  6. Connect your battery and inverter to the board and you are done! 🔋⚡

Dependencies 📖

This code uses the following excellent libraries: - adafruit/Adafruit_NeoPixel LGPL-3.0 license - ayushsharma82/ElegantOTA AGPL-3.0 license - bblanchon/ArduinoJson MIT-License - eModbus/eModbus MIT-License - ESP32Async/AsyncTCP LGPL-3.0 license - ESP32Async/ESPAsyncWebServer LGPL-3.0 license - pierremolinaro/acan-esp32 MIT-License - pierremolinaro/acan2517FD MIT-License

It is also based on the information found in the following excellent repositories/websites: - https://gitlab.com/pelle8/inverter_resources //new url - https://github.com/burra/byd_battery - https://github.com/flodorn/TeslaBMSV2 - https://github.com/SunshadeCorp/can-service - https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3 - https://github.com/dalathegreat/leaf_can_bus_messages - https://github.com/rand12345/solax_can_bus - https://github.com/Tom-evnut/BMWI3BMS/ SMA-CAN - https://github.com/FozzieUK/FoxESS-Canbus-Protocol FoxESS-CAN - https://github.com/maciek16c/hyundai-santa-fe-phev-battery - https://github.com/ljames28/Renault-Zoe-PH2-ZE50-Canbus-LBC-Information - Renault Zoe CAN Matrix https://docs.google.com/spreadsheets/u/0/d/1Qnk-yzzcPiMArO-QDzO4a8ptAS2Sa4HhVu441zBzlpM/edit?pli=1#gid=0 - Pylon hacking https://www.eevblog.com/forum/programming/pylontech-sc0500-protocol-hacking/

Like this project? 💖

Leave a ⭐ If you think this project is useful. Consider hopping onto my Patreon to encourage more open-source projects! As a bonus, you will get access to the Discord server, where we hangout, develop, support, share, discuss etc. all things related to DIY EV storage solutions. See you on the server? ;)

<------ Click here to learn more!

image

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 2,150
Function 589
Class 467
Enum 68

Languages

C++100%
Python1%
C1%

Modules by API surface

Software/src/lib/bblanchon-ArduinoJson/ArduinoJson.h759 symbols
Software/src/lib/ESP32Async-ESPAsyncWebServer/src/ESPAsyncWebServer.h108 symbols
Software/src/devboard/hal/hal.h77 symbols
Software/src/lib/mathieucarbou-AsyncTCPSock/src/AsyncTCP.cpp60 symbols
Software/src/devboard/hal/hw_lilygo2can.h53 symbols
Software/src/battery/Battery.h51 symbols
Software/src/lib/pierremolinaro-ACAN2517FD/ACAN2517FD.cpp50 symbols
Software/src/devboard/hal/hw_lilygo.h47 symbols
Software/src/devboard/hal/hw_3LB.h42 symbols
Software/src/lib/ESP32Async-ESPAsyncWebServer/src/WebRequest.cpp40 symbols
Software/src/battery/BMW-IX-BATTERY.cpp38 symbols
Software/src/devboard/hal/hw_stark.h36 symbols

For agents

$ claude mcp add Battery-Emulator \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page