Download the PHP package dutchie027/wallbox without Composer

On this page you can find all versions of the php package dutchie027/wallbox. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wallbox

wallbox

Packagist Downloads CodeFactor

Overview

This API wrapper was written to allow me to get better metrics and usage out of my wallbox EVSE.

Usage

To start, simply download the package using composer:

After downloading it with composer, open wallbox.ini and enter your variables and credentials.

Once you have all of that, depending on how you want to use it, create a simple PHP file that calls the library:

Running as a monitor

The most common use case for the script(s) are a monitoring system. To accomplish this, there is a function called monitor that uses a lot of defaults and will notify you of changes to the system. It will check the EVSE every 30 seconds by default and notify you of any changes using pushover with the configuration settings in .env. To monitor the system, first create a file called monitor.php using the below:

After you've created the monitoring file, ensure it's executable by running chmod +x monitor.php. Once you've done that, simply trigger it with a nohup so it runs in the background:

Functions

checkLock

Returns true/false if the charger is locked. true if the charger is locked, false if the charger is unlocked.

getStats

Returns a JSON payload of stats for the charger between start and int (epoch times).

getChargerStatus

Returns a JSON payload of status of the specific charger. Sample payload

getFullPayload

Returns a JSON payload of status of the all chargers. Sample payload

getLastChargeDuration

Returns time in xh xm if hours and minutes. If only minutes it returns xm xs.

checkFirmwareStatus

Checks if the firmware is up-to-date. Returns a human string about the status

unlockCharger

Unlocks the charger.

lockCharger

Locks the charger.

getChargerData

Returns JSON payload of the specific charger data sample

getTotalChargeTime

Returns time in xh xm if hours and minutes. If only minutes it returns xm xs.

getTotalSessions

Returns an integer denoting total charge sessions

Dependencies

The code uses a few external libraries, but they're all bundled in the composer.json file.

Acknowledgements

Shout out to the Python work that cliviu74 did. This was the foundation that gave me a lot of the URLs.


All versions of wallbox with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
monolog/monolog Version ^3.0
guzzlehttp/guzzle Version ^7.5
serhiy/pushover Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dutchie027/wallbox contains the following files

Loading the files please wait ....