npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wallboxjs

v1.0.1

Published

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

Downloads

12

Readme

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.