Skip to content

Integrates solar/battery and Emporia systems to automate the charging of electric vehicles. It aims to optimize energy usage by leveraging solar power and managing grid consumption efficiently.

License

Notifications You must be signed in to change notification settings

vorezal/PyEmChargeOnSolar

Repository files navigation

PyEmChargeOnSolar

Overview

This project integrates solar/battery and Emporia systems to automate the charging of electric vehicles. It aims to optimize energy usage by leveraging solar power and managing grid consumption efficiently. Thanks to magico13/PyEmVue for the Emporia API integration and itayke/solaredge-emporia-autocharge for the idea and basis for the script.

Features

  • Automated EV charging based on solar production
  • Real-time monitoring of energy consumption
  • Customizable charging schedules
  • Integration with SolarEdge, Tesla Powerwall (via pyPowerwall Proxy) and Emporia APIs

Installation

  1. Clone the repository:
git clone https://github.com/vorezal/PyEmChargeOnSolar
  1. Navigate to the project directory:
cd PyEmChargeOnSolar
  1. Install the required dependencies:
pip install -r requirements.txt

Configuration

Create a .env file in the root directory and add your API keys and configuration settings:

SOLAREDGE_SITE=site_number
SOLAREDGE_KEY='site_key'
EMPORIA_USER='emporia_user_email'
EMPORIA_PASSWORD='emporia_password'

All available settings are listed and documented in pyemcose_shared.py

Getting a SolarEdge API Key

To get a SolarEdge API key, follow these steps:

  1. Log in to your SolarEdge monitoring account.
  2. Click the Admin link in the top menu.
  3. Select the Site Access tab.
  4. Activate API access.
  5. Check the box to agree to the terms and conditions.
  6. Click the New Key button.
  7. Click Save.
  8. Copy the API key and Site ID.

Note: This is a v1 API key which may change in the future.

Setting up pyPowerwall Proxy

See pypowerwall readme

Usage

Run in background with default values:

python pyemchargeonsolar.py &

Run as a docker container:

docker compose up -d

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Contact

For any questions or support, please open an issue on the GitHub repository

About

Integrates solar/battery and Emporia systems to automate the charging of electric vehicles. It aims to optimize energy usage by leveraging solar power and managing grid consumption efficiently.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published