A lightweight implementation of an OCPP 1.6J Central System (CS) tailored for Wallbox chargers, featuring a hybrid control interface that bridges the Wallbox Portal API and the OCPP protocol.
- OCPP 1.6J Central System: Full support for core OCPP actions including
BootNotification,StatusNotification,Heartbeat,MeterValues, and transaction management. - Hybrid Control: Manage chargers through both the official Wallbox Cloud API and direct OCPP commands.
- Web Dashboards:
- OCPP Panel: Real-time monitoring of connected Charge Points, manual command execution (Remote Start/Stop, Reset, Unlock), and live log streaming via SSE.
- Wallbox Controller: A unified interface to sync Portal status with OCPP status.
- Remote Operations: Support for TriggerMessage, ChangeAvailability, Hard/Soft Reset, and Connector Unlocking.
- Async Architecture: Built with
asyncioandwebsocketsfor high-performance message handling.
server.py: The core OCPP 1.6J server (Port 8001) and its management API/UI (Port 8080).wallbox_ocpp.py: Flask-based hybrid controller bridging the Wallbox Portal API.wallbox_controller.py: Helper script for direct charger interactions.wallbox_unlock.py/wallbox_resume.py: Standalone utility scripts for quick actions.
- Python 3.8+
- Active Wallbox Portal credentials
- Charger(s) configured to point to this server's WebSocket URL
-
Clone the repository:
git clone git@github-xembill:xembill/wallbox-api-ocpp.git cd wallbox-api-ocpp -
Install dependencies:
pip install -r requirements.txt
1. Start the OCPP Central System:
python server.py- OCPP WS:
ws://localhost:8001/ocpp/ - Dashboard:
http://localhost:8080
2. Start the Hybrid Controller:
python wallbox_ocpp.py- Web UI:
http://localhost:5000
Update the connection details in server.py and wallbox_ocpp.py:
OCPP_HOST/OCPP_PORT: Network settings for the OCPP server.WALLBOX_EMAIL/WALLBOX_PASSWORD: Your portal credentials for the API bridge.CHARGER_ID: The unique ID of your Wallbox charger.
MIT