Charging station management system (CSMS) for Bhutan Power Corporation Limited
OCPP 1.6-J central system · operator console · operations platform · BPC EV app · scan-to-pay
All screenshots: CSMS v1.15 with demonstration data — no real customers or chargers.
⬇ Download for Windows · Windows program · Deploy on Render · Screenshots
| ⚡ Chargers | OCPP 1.6-J (plus an OCPP 2.0.1 mode): live connector status, remote start and stop, reset, unlock, power limits, firmware updates and diagnostics files. Charger IDs issued by the CSMS, a password per charger and an identity check at every start-up. |
| 🩺 Operations | Health checks every 30 seconds with fault codes explained, alerts with escalation by e-mail, Telegram, SMS or webhook, work orders with SLA timers and a technician page for phones, load management per site. |
| 📈 KPIs and reports | Uptime per charger and site, energy, sessions and outages, the monthly report for DoST, charging history per customer and per station — with CSV and Excel exports. |
| 📱 Drivers | The BPC EV app (installable web app): map, booking of connectors, wallet, live session and receipts. A scan-to-pay QR sticker on every connector, and a free-charging mode with fair-use limits. |
| 💳 Payments | Bhutan QR, RMA Payment Gateway (sandbox), wallet and cash; refunds, tariffs, tiers and promo codes. |
| 🔐 Accounts and data | Personal logins with roles and an audit log, all data in MongoDB Atlas, backups with a checked restore, Bhutan Time in every report. |
All 21 console tabs
| Area | Tabs |
|---|---|
| Chargers | Stations, Map, Message Log, Registration (charger IDs and charger access), Default Config, Log Export, Firmware & logs |
| Drivers and payments | Payments, Customers, RFID Cards, Free charging, Bookings |
| Operations | Users, Health, Alerts, Maintenance, KPIs & reports, Charging history, Load management |
| System | Server (backups and restore), Database |
One HTTPS address serves everything:
| Path | What |
|---|---|
/ |
Operator console (personal login with a role) |
/app/ |
BPC EV customer app (installable web app) |
/pay/<station>/<connector> |
Scan-to-pay page behind the QR sticker on each charger |
/free/<charger> |
Free-charging start page (vehicle plate or mobile number, fair-use limits) |
/tech |
Technician page for phones: work orders, checklists, parts |
wss://<host>/ocpp/<charge point id> |
OCPP 1.6-J endpoint for chargers |
/health, /healthz, /readyz |
Health checks (/readyz also checks the database and the event loop) |
All data — stations, payments, customers, RFID cards and their owners, users and the audit log, alerts, work orders,
bookings, charger IDs, charging sessions, settings and the OCPP log — lives in MongoDB Atlas, so the service can restart
or redeploy without losing anything. Three simulated chargers (BPC-THIMPHU, BPC-PARO, BPC-PUNAKHA) run inside the
container for demonstrations; set CSMS_SIMULATORS to an empty value to switch them off.
The same CSMS runs on one Windows PC, without Python or Docker. Download FlexxfastCSMS_Setup_1.15.1.exe (installer) or
the portable zip from the latest release.
- Run the setup: it installs for the current user, without administrator rights. The programs are not code-signed yet, so Windows SmartScreen may say "Windows protected your PC": choose More info → Run anyway.
- Start Flexxfast CSMS. The first time, its console window asks for the console username and password (kept in
csms_config.jsonnext to the program). - The browser opens the console (normally http://localhost:8080). Allow the program through Windows Firewall when asked, so that chargers on your network can reach it.
- No charger at hand? Start Virtual Charger (one simulated charger) or BPC Demo fleet (12 stations) and accept them in the Stations tab.
The program starts with local JSON files next to it. To keep the data in MongoDB (Atlas or your own server):
- Open the Database tab, choose MongoDB, paste your connection string
(
mongodb+srv://<user>:<password>@<cluster>/) and choose a database name. - Press Test connection, then Save & apply: everything is copied into the database, and every change goes there from then on.
- To point the program at another database later, do the same with the new connection string or database name — or
set
CSMS_MONGODB_URIandCSMS_MONGODB_DBbefore starting the program.
The connection string is kept in database.json next to the program: keep that folder private. Give each CSMS its own
database name.
- New → Web Service → Public Git Repository: paste the URL of this repository.
- Language Docker, branch
main, region Singapore, instance type Free. - Environment variables:
CSMS_PASS— the console password (useradmin). Use a long, unique password: the console is on the internet.CSMS_MONGODB_URI— the MongoDB Atlas connection string (mongodb+srv://<user>:<password>@<cluster>/). The Atlas network access list must allow Render (e.g.0.0.0.0/0with a strong database password).- A second (staging) service on the same cluster gets its own database:
CSMS_MONGODB_DB=bpc_csms_staging.
- Health check path
/health, then Deploy. The first build takes a few minutes.
A service created from the public repository URL does not redeploy on a push: use Manual Deploy → Deploy latest
commit, and Rollback on an earlier deploy to go back. render.yaml describes the same service as a Render Blueprint.
Issue the charger's ID in Registration › Charger IDs (for example BPC-THM-0001): the ID is accepted at once and gets
its own password and a printable setup sheet for the installer. Point the charger (or the Virtual Charger) at
wss://<service>.onrender.com/ocpp with that ID and password, e.g. wss://bpc-csms.onrender.com/ocpp/BPC-THM-0001.
The CSMS checks the charger's manufacturer, model and serial number at every start-up and warns when they change.
A charger without an issued ID waits as Pending until an operator accepts it (Stations or Registration tab), or is
refused when charger access is set to known chargers only. A charger that is not accepted cannot start charging (a
setting, on by default).
| Variable | Default | Meaning |
|---|---|---|
CSMS_USER / CSMS_PASS |
admin / — |
First console login (no password = no login possible); personal accounts are added in the Users tab |
CSMS_MONGODB_URI |
— | MongoDB connection string |
CSMS_MONGODB_DB |
bpc_csms |
Database name |
CSMS_PUBLIC_URL |
Render's address | Public address used in QR stickers, the app poster and payment return URLs |
CSMS_SIMULATORS |
BPC-THIMPHU BPC-PARO BPC-PUNAKHA |
Built-in simulated chargers (space-separated IDs, empty = none) |
CSMS_SIM_SPEED |
20 |
Simulator energy speed-up |
CSMS_OCPP_PORT |
0 |
Extra OCPP-only port (e.g. 9000 for docker run -p 9000:9000); 0 = OCPP only on the web port |
CSMS_OCPP_BIND |
127.0.0.1 |
Address the extra OCPP port listens on |
CSMS_TRUST_PROXY |
1 |
Client IP from X-Forwarded-For (login lock-out and rate limits per client behind Render's proxy) |
CSMS_CLIENT_IP_HEADER |
— | Take the client IP from this header instead (e.g. True-Client-IP behind a proxy that sets one) |
TZ |
Asia/Thimphu |
Time zone for timestamps, daily logs and the morning session expiry |
Free tier
- A free Render service sleeps after 15 minutes without traffic from outside and needs about a minute to wake up. Connected chargers send OCPP messages through Render, which keeps it awake; the built-in simulators run inside the container (they do not keep it awake) and start again with the service when it wakes up.
- 512 MB RAM / 0.1 CPU and an ephemeral disk: fine for pilots, demos and training. For production use a paid instance, an Atlas Flex/M10+ cluster with backups, and a custom domain.
- A free Render service cannot send e-mail (its SMTP ports are blocked): send alerts by Telegram, an SMS gateway or a webhook there.
Security
- The console, the app and the pay page are served over HTTPS; session cookies are
SecureandHttpOnly. - Every staff member has a personal account with a role (admin, operator, technician, viewer); changes and commands are kept in the audit log; repeated wrong passwords lock the account and the address for a while.
- Chargers use OCPP security profile 1–2 (a password per charger, over wss); charger access can be open, known chargers only or strict, with lock-outs after repeated failures, plus the identity check above.
- Never commit
*.jsondata files or connection strings; secrets belong in the Render environment only.
pip install -r requirements.txt
export CSMS_USER=admin CSMS_PASS=change-me
python csms_web_ui_flexxfast1.py --csms-child 1.6 --port 9000 --web-port 8080Then open http://localhost:8080 and point a charger or the Virtual Charger at ws://localhost:9000/<charge point id>.
Each release is also published as a container image, ghcr.io/sukritjaaiproject/bpc-csms-cloud:<version>:
docker run -p 10000:10000 -e CSMS_PASS=change-me -e CSMS_SIMULATORS= ghcr.io/sukritjaaiproject/bpc-csms-cloud:1.15.1The console is then at http://localhost:10000 (user admin), and chargers connect to
ws://localhost:10000/ocpp/<charge point id>. CSMS_SIMULATORS= starts it without the three demo chargers; leave it
out to keep them. The image workflow publishes a tag vX.Y.Z when it is pushed, and Actions → image → Run
workflow builds an existing tag. Pin an image by its digest (shown in the run's summary) where it must not change.
| Version | What it added |
|---|---|
| 1.15.1 | A remote start always names its connector, so chargers that refuse one without it (OCPP 1.6 §5.11) start normally |
| 1.15 | Charging history per customer and per station; the KPI sheet "Daily by charger" |
| 1.14 | RFID card owners (name, mobile, vehicle plate, organisation); CSV / Excel import and export |
| 1.13 | Charger IDs issued by the CSMS, a password and setup sheet per charger, identity check at start-up |
| 1.12 | Pre-booking of connectors (OCPP ReserveNow, or kept by the CSMS) |
| 1.11 | Bhutan Time everywhere, firmware updates, diagnostics files, Dzongkha for the operations tabs |
| 1.10 | Fixes from the 200-charger load test |
| 1.9 | Backups and a checked restore, /healthz and /readyz, staging |
| 1.8 | Load management per site |
| 1.7 | Free charging with fair-use limits |
| 1.6 | Charger security: OCPP security profiles 1–2 |
| 1.5 | Maintenance: work orders, SLA timers, technician page |
| 1.4 | Alerts with escalation |
| 1.3 | Uptime and energy reports, KPI dashboard, the report for DoST |
| 1.2 | Status history and network health |
| 1.1 | Users, roles and audit log |
Apache License 2.0 — see also NOTICE. The name and logo of Bhutan Power Corporation Limited are not covered by the license. The Windows programs contain third-party software under its own licenses: THIRD_PARTY_NOTICES.md.
Prepared for Bhutan Power Corporation Limited. Screenshots show demonstration data.




















