Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6f44aaa
port init
wodor Jan 21, 2026
bcd12e5
Web server
wodor Jan 22, 2026
fb9e6ff
Readme
wodor Jan 22, 2026
60aca2b
Initial plan
Copilot Jan 22, 2026
2b0da3c
Add V2 features: SOC calculation, current sensing, and protection system
Copilot Jan 22, 2026
52f9f09
Enhance web dashboard with V2 features (SOC, current, temps, protection)
Copilot Jan 22, 2026
c59f88d
Update documentation with V2 features implementation details
Copilot Jan 22, 2026
572dfc1
Add comprehensive unit tests for V2 features
Copilot Jan 22, 2026
842403d
Add safety-critical edge case tests and protection guards
Copilot Jan 22, 2026
d4e97b6
Initial plan
Copilot Jan 22, 2026
a3e8e13
Add comprehensive remote logging implementation plan with IoT standar…
Copilot Jan 22, 2026
d1beb76
Update README files with links to remote logging plan
Copilot Jan 22, 2026
fb95ff7
fixes
wodor Jan 23, 2026
5b01b8b
send balancing every 200ms
wodor Jan 23, 2026
0c111a9
Merge pull request #1 from wodor/copilot/port-full-v2-features
wodor Jan 23, 2026
4c6dab3
Merge pull request #2 from wodor/copilot/log-management-strategy
wodor Jan 23, 2026
df35b93
fix native tests
wodor Jan 23, 2026
afc164e
Update readme
wodor Jan 23, 2026
b6751cd
Add GitHub Actions CI for running native tests
google-labs-jules[bot] Jan 31, 2026
5692c54
Update CI workflow to run on PRs against all branches
google-labs-jules[bot] Jan 31, 2026
2beb250
Merge pull request #4 from wodor/ci-workflow-tests-4522963322707578281
wodor Jan 31, 2026
6e54ea7
Add dual CAN bus support for LilyGo T2-Can (#3)
wodor Jan 31, 2026
e85c046
Configure Copilot setup steps to pre-install PlatformIO dependencies …
Copilot Feb 1, 2026
b1f55c2
Add ESS precharge, contactor, and charger control (test-first) (#5)
Copilot Feb 1, 2026
8902526
move docs
wodor Feb 1, 2026
ef07382
Revert "move docs"
wodor Feb 1, 2026
d4f868f
feat(docs): add ESS wiring diagrams and update CMU count
wodor Feb 15, 2026
6b2d8ac
feat(bms): add CAN bus configuration options
wodor Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: PlatformIO CI

on:
push:
branches: [ main ]
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.platformio
~/.cache/pip
key: ${{ runner.os }}-platformio-${{ hashFiles('**/platformio.ini') }}
restore-keys: |
${{ runner.os }}-platformio-

- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install platformio

- name: Pre-install PlatformIO native platform and dependencies
run: |
cd t2can_port
pio pkg install --platform native
pio pkg install -e native

- name: Run PlatformIO tests
run: |
cd t2can_port
pio test -e native
54 changes: 54 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "Copilot Setup Steps"

# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest

# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
# We need contents: read to clone the repository and access platformio.ini
contents: read

# These steps will run before the agent starts to pre-install dependencies
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.platformio
~/.cache/pip
key: ${{ runner.os }}-platformio-${{ hashFiles('**/platformio.ini') }}
restore-keys: |
${{ runner.os }}-platformio-

- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install platformio

- name: Pre-install PlatformIO native platform and dependencies
run: |
cd t2can_port
pio pkg install --platform native
pio pkg install -e native
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# PlatformIO
.pio/
.pioenvs/
.piolibdeps/

# Build artifacts
*.o
*.a
*.so
*.exe
*.out

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Config files with credentials
.config.h

# Test artifacts
/tmp/

# CodeQL artifacts
_codeql_detected_source_root
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
# OutlanderPHEVBMS
Control Over the Mistubishi Outlander CMU modules
# OutlanderPHEVBMS Ported to platfrom.io to run on LilyGo T2-Can

## Port Status

Code is ported using coding agents, the core functionality is meant to be kept as is.
Some tests were added with extra focus on safety features, some problems were discovered and the code was fixed.
One of them is main loop counter reaching maximum value after roughly 2 months of continousus running.
More info in this PR desc https://github.com/wodor/OutlanderPHEVBMS/pull/1

There are some changes in serial console output for convenience.
A web server is added for easier display of module information.
Balancing is sent every 200ms, not 400ms.

![web server](t2can_port/web_server.png)

The code is tested to run with Yuasa LEV40-8S modules (the blue ones).
No resistors added, just the last CMU must be connected with extra 2 wires to CANH and CANL to terminate.
Remember to put the large screws back on the +/- termminal of the modules, if it is left loose CMU will not connect properly. Temps will show ok but voltages will be 65533 or 0.

## Original Project

Control Over the Mitsubishi Outlander CMU modules

Reading out the modules over CAN and triggering them to balance.

This software is designed to run on the SimpBMS.

User Manual that covers some software functions https://github.com/tomdebree/SimpBMS

## Documentation

- [T-2Can Port](t2can_port/README.md) - Modern ESP32-S3 implementation with web dashboard
- [Remote Logging Plan](docs/REMOTE_LOGGING_PLAN.md) - Comprehensive plan for remote logging with MQTT, buffering, and monitoring
3 changes: 3 additions & 0 deletions t2can_port/.config.h.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// WiFi credentials template - Copy to .config.h and edit with your details
#define WIFI_SSID "your_wifi_ssid_here"
#define WIFI_PASSWORD "your_password_here"
7 changes: 7 additions & 0 deletions t2can_port/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.pio
.pio-core
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
.config.h
9 changes: 9 additions & 0 deletions t2can_port/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"pioarduino.pioarduino-ide",
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}
Loading