New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

wallboxjs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wallboxjs

An API to control your Wallbox charger (EV). Includes functions like start/stop, scheduling, and pricing details.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

WallboxJS

A JavaScript library that can control your Wallbox Charger (EV). It provides functionalities like start/stop charging, scheduling, and pushing pricing details.

Installation

Use the package manager npm to install WallboxJS.

npm install wallboxjs

Usage

Firstly, import the library:

const Wallbox = require('wallboxjs');

You can use the library like this:

const wallbox = new Wallbox('username', 'password');

//Get all chargers
const chargerList = await wallbox.getChargers();
chargerID = chargerList[0].id;
console.log(chargerID);

// Get charger status
const response = await wallbox.getChargerStatus(chargerID);
console.log(response.data);

// Push price to API
wallbox.setEnergyCost(chargerID, hourPrice);

Library Methods

This package includes the following methods:

  • authenticate(): Authenticate with the Wallbox API. This happens within the other methods as well so no need to authenticate seperatly.
  • getChargers(): Get a list of all your chargers.
  • getChargerStatus(chargerId): Get the status of a specific charger.
  • getSessionList(chargerId, startDate, endDate): Get a list of charging sessions for a specific charger within a specific date range.
  • setEnergyCost(chargerId, energyCost): Set the energy cost for a specific charger.
  • pauseChargingSession(chargerId): Pause the charging session for a specific charger.
  • resumeChargingSession(chargerId): Resume the charging session for a specific charger.
  • setMaxChargingCurrent(chargerId, maxChargingCurrent): Set the maximum charging current for a specific charger.
  • unlockCharger(chargerId): Unlock a specific charger.
  • lockCharger(chargerId): Lock a specific charger.
  • setSchedule(chargerId, startTime, endTime): Set the charging schedule for a specific charger. Enter time as string ("HH:MM").

Dependencies

This library is using axios for the http requests.

Contributing

Contributions are welcome! Please feel free to submit issues or propose new features through GitLab. More detailed contribution guidelines will be added in the future.

Testing

Testing can be performed by executing the commands in your application and verifying the expected behavior on your Wallbox charger.

License

This project is licensed under the MIT License.

Keywords

wallbox

FAQs

Package last updated on 31 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts