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.
- 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
- Clone the repository:
git clone https://github.com/vorezal/PyEmChargeOnSolar- Navigate to the project directory:
cd PyEmChargeOnSolar- Install the required dependencies:
pip install -r requirements.txtCreate 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
To get a SolarEdge API key, follow these steps:
- Log in to your SolarEdge monitoring account.
- Click the Admin link in the top menu.
- Select the Site Access tab.
- Activate API access.
- Check the box to agree to the terms and conditions.
- Click the New Key button.
- Click Save.
- Copy the API key and Site ID.
Note: This is a v1 API key which may change in the future.
Run in background with default values:
python pyemchargeonsolar.py &Run as a docker container:
docker compose up -d
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
For any questions or support, please open an issue on the GitHub repository