As of November 27, 2023, Tesla has started disabling the core API endpoints crucial for the functionality of this app. Specifially, vehicle location information (impacting geofencing of the charge management functionality) and commands to pause and enable charging. The intended replacement is Tesla's new Fleet API; however, this is a paid service and not a viable option for this project's intended audience. Unfortunately, this means it's time to move on (for now), but it was a great learning experience.
Welcome to the Tesla Clean Grid Charging App – a tool designed for environmentally conscious Tesla owners with a passion for technology. This app allows users to optimize their vehicle charging based on the availability of fossil-free energy on the grid, providing near real-time insights to enhance the sustainability of your Tesla ownership.
- Integration and orchestration of Tesla and Electricity Maps APIs.
- Minimal user data stored locally, ensuring privacy.
- Secure handling of API keys and secrets, never passed via the browser.
- Built with Node, React, Tailwind, Charts.js, rxjs, and Next.js.
- Designed to be run within a small Docker container on a Raspberry Pi or other low power home server options.
This project stems from a desire to blend technology and environmental conservation, contributing to a better future.
In first trying to orchestrate a solution like this in Home Assistant, I found that the idle battery loss was just too great. Minimizing vehicle wake state and limiting unintended battery drain was a core concept in creating this App. Unlike other options that wake the car on a regular basis to to grab data, this app maintains state locally, only waking the vehicle when absolutely neccessary and opportunistically updating state when the vehicle is in use.
Minimal user data is stored locally and never shared externally. API keys and secrets are transmitted only via the server, never exposed through the browser.
The roadmap includes exploring the migration to the Tesla Fleet API for enhanced functionality. However, it's important to note that this transition may involve considerations related to accessibility for the average user, as the Tesla Fleet API is behind a paywall.
Contributions and feedback are welcome! Feel free to open issues or submit pull requests to help improve this project.
This project is made possible by the Tesla and Electricity Maps APIs. Special thanks to the open-source community for their continuous support.
Happy charging!