Giter Site home page Giter Site logo

octopuschargingslotpoller's Introduction

Octopus EV Charge Slot Poller

This Python script polls the Octopus Energy API for available charging slots for electric vehicles and logs the information to both a MySQL database and an MQTT server. Installation

Clone this repository to your local machine.
Install the required Python packages by running pip install -r requirements.txt.
Set up a MySQL database and update the config.py file with your database details.
Set up an MQTT server and update the config.py file with your MQTT server details.

Usage

To use the script, simply run python octopus_ev_charge_slot_poller.py. The script will run indefinitely, polling the Octopus Energy API every 5 minutes and logging any available charging slots to both the MySQL database and MQTT server.

You can stop the script at any time by pressing Ctrl + C. Configuration

All configuration options can be found in the config.py file. You can update the following options:

API_KEY: Your Octopus Energy API key.
MYSQL_HOST: The hostname of your MySQL database.
MYSQL_PORT: The port number of your MySQL database.
MYSQL_USER: The username to use when connecting to your MySQL database.
MYSQL_PASSWORD: The password to use when connecting to your MySQL database.
MYSQL_DATABASE: The name of the MySQL database to use.
MQTT_HOST: The hostname of your MQTT server.
MQTT_PORT: The port number of your MQTT server.
MQTT_USER: The username to use when connecting to your MQTT server.
MQTT_PASSWORD: The password to use when connecting to your MQTT server.
MQTT_TOPIC: The MQTT topic to publish charging slot information to.

License

This project is licensed under the MIT License - see the LICENSE file for details.

octopuschargingslotpoller's People

Contributors

crappytan avatar

Stargazers

Merul Patel avatar  avatar AndyG avatar Jon avatar Jonny avatar

Watchers

 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.