Skip to main content

Module for interacting with Wallbox EV charger api

Project description


Python Module interface for Wallbox EV chargers api


Python 3.7 or older Python modules "requests>=2.22.0", "simplejson>=3.16.0"

Python module "aenum>=3.1.8"


pip install wallbox

Implemented methods


  • authenticates to the wallbox api.


  • returns a list of chargers available to the account


  • returns a dictionary containing the charger status data


  • unlocks charger


  • locks charger

setMaxChargingCurrent(chargerId, chargingCurrentValue)

  • sets charger Maximum Charging Current (Amps)


  • pauses a charging session


  • resumes a charging session

getSessionList(chargerId, startDate, endDate)

  • provides the list of charging sessions between startDate and endDate
  • startDate and endDate are provided in Python datetime format (i.e. 2021-05-04 08:41:12.765644)

setEnergyCost(chargerId, energyCost)

  • sets the energy cost for the charger per kWh


  • restarts (reboots) charger
  • a full charger reboot can take a few minutes. Charger status will be slow to update (ie: READY (10s) -> DISCONNECTED (90s) -> READY) CAUTION: use this method with care!! Check if the charger is not in the middle of a firmware upgrade as this can brick your charger.

Simple example

from wallbox import Wallbox, Statuses
import time
import datetime

w = Wallbox("user@email", "password")

# Authenticate with the credentials above

# Print a list of chargers in the account

# Get charger data for all chargers in the list, then lock and unlock chargers
for chargerId in w.getChargersList():
    chargerStatus = w.getChargerStatus(chargerId)
    print(f"Charger Status: {chargerStatus}")
    print(f"Lock Charger {chargerId}")
    endDate =
    startDate = endDate - datetime.timedelta(days = 30)
    sessionList = w.getSessionList(chargerId, startDate, endDate)
    print(f"Session List: {sessionList}")
    chargerStatus = w.getChargerStatus(chargerId)
    print(f"Charger {chargerId} lock status {chargerStatus['config_data']['locked']}")
    print(f"Unlock Charger {chargerId}")
    chargerStatus = w.getChargerStatus(chargerId)
    print(f"Charger {chargerId} lock status {chargerStatus['config_data']['locked']}")
    # Set charger Energy Cost to 0.1€/kWh
    energyCost = w.setEnergyCost(chargerId, 0.1)
    print(f"Charger {chargerId} energy cost {energyCost['energy_price']} {energyCost['currency']['symbol']}")

    # Print the status the charger is currently in using the status id
    print(f"Charger Mode: {Statuses(chargerStatus['status_id']).name}")

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wallbox-0.5.1.tar.gz (7.5 kB view hashes)

Uploaded Source

Built Distribution

wallbox-0.5.1-py3-none-any.whl (8.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page