Skip to content

A CLI to fetch the status of charging stations

License

Notifications You must be signed in to change notification settings

gverm/can-i-charge

 
 

Repository files navigation

Can I charge?

It's a question you might have asked yourself before if you have a BEV/PHEV. This utility allows you to check if your favorite charging stations are available for your car to charge, right from the warmth of your terminal! No need to go outside and physically check if the charging station is available, and possibly return disappointed because it was occupied.

How to install

pip install can-i-charge

How to use

The CLI can be used in the following ways:

# Using arguments
can-i-charge --station <SERIAL1> --station <SERIAL2> --station <SERIAL3>
# Using env variables
export STATIONS="<SERIAL1> <SERIAL2>"
can-i-charge

You can pass as many stations as you want. At least one valid is needed however to actually return some data. The serials for the charging stations can be found on the charging station or on websites like shellrecharge.

See it in action

GIF of an example session interacting with the cli

Container

build

$ docker build -t boosterl/can-i-charge:dev .

run

$ docker run --rm -e STATIONS='BE-TCB-P104146' boosterl/can-i-charge:dev
$ dgoss run boosterl/can-i-charge:dev
 INFO: Starting docker container
 INFO: Container ID: 97851a83
 INFO: Sleeping for 0.2
 INFO: Container health
 INFO: Running Tests
 User: can-i-charge: exists: matches expectation: true
 INFO: Deleting container

Acknowledgments

This library uses the excellent python-shellrecharge package.

About

A CLI to fetch the status of charging stations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.9%
  • Dockerfile 11.1%