Giter Club home page Giter Club logo

psa_car_controller's Introduction

Remote Control of PSA car

Codacy Badge Codacy Badge Publish Docker image Donate

This is a python program to control and get information from a PSA car.

I test it with a Peugeot e-208, but it works with others PSA vehicles (Citroen, Opel, Vauxhall, DS).

With this app you will be able to :

  • get the status of the car (battery level for electric vehicle, position ... )
  • start and stop the charge
  • set a charge threshold to limit the battery level to a certain percentage
  • set a stop hour to charge your vehicle only on off-peak hours
  • control air conditioning
  • control lights and horn if your vehicle is compatible (mine isn't)
  • get consumption statistic
  • visualize your trips on a map or in a table
  • get the list of car charging
  • visualize battery charging curve
  • visualize altitude trip curve
  • get car charging co2 emission
  • get car charging price
  • send live data to ABetterRoutePlanner

The official api is documented here but it is not totally up to date, and contains some errors.

I. Installation

II. Use the app

2.1 Get the car state :
http://localhost:5000/get_vehicleinfo/YOURVIN

2.2 Get the car state from cache to avoid to use psa api too much
http://localhost:5000/get_vehicleinfo/YOURVIN?from_cache=1

2.2 Stop charge
http://localhost:5000/charge_now/YOURVIN/0

2.3 Set hour to stop the charge to 6am
http://localhost:5000/charge_control?vin=yourvin&hour=6&minute=0 

2.4 Change car charge threshold to 80 percent
http://localhost:5000/charge_control?vin=YOURVIN&percentage=80 

2.5 See the dashboard (only if record is enabled)
http://localhost:5000

2.6 Refresh car state (ask car to send its state):
http://localhost:5000/wakeup/YOURVIN

2.7 Start/Stop preconditioning
http://localhost:5000/preconditioning/YOURVIN/1 or 0

2.8 Change charge hour (for example: set it to 22h30)
http://127.0.0.1:5000/charge_hour?vin=YOURVIN&hour=22&minute=30

III. Use the dashboard

You can add the -r argument to record the position of the vehicle and retrieve this information in a dashboard.

python3 psa-car-controller -f config.json -c charge_config.json -r

You will be able to visualize your trips, your consumption and some statistics:

Screenshot_20210128_104519

IV. Charge price calculation

The dashboard can give you the price by kilometer and price by kw that you pay. You just have to set the price in the config file.

After a successful launch of the app, a config.ini file will be created. In this file you can set the price you pay for electricity in the following format "0.15".

If you have a special price during the night you can set "night price", "night hour start" and "night hour end". Hours need to be in the following format "23h12"?

You can modify a price manually in the dashboard. It can be useful if you use public charge point.

V. Connection to other services:

FAQ

If you have a problem, or a question please check if the answer isn't in the FAQ.

Contribute

If you need information to contribute or edit this program go here.

Donation

If you want to thank me for my work ๐Ÿ˜„

donate

psa_car_controller's People

Contributors

acesyde avatar camuxx86 avatar capu-bia avatar cbruegg avatar chpego avatar farom57 avatar flobz avatar florianhinrichsen avatar gino54 avatar henkiejan1 avatar ihelland avatar jlayec avatar jumpjack avatar matty87a avatar mbrentini avatar mdkeil avatar petapton avatar proximagr avatar rchiileea avatar sharkezz avatar sockhamster avatar somberland avatar stevoh6 avatar vinnie1234 avatar virtualj avatar vlycop avatar x3n0n10 avatar xammmue avatar zamzon avatar zwordi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.