With WeConnect-SolarManager you can automatically charge your Volkswagen ID car (e.g. ID.4) with solar electricity, even if your wallbox does not support this.
Project description
Common
With SolarManager you can automatically charge your Volkswagen ID car (e.g. ID.4) with solar electricity, even if your wallbox does not support this or is not that good in this. There are adapters for SolarEdge and Sonnen included but may be extended with another solar system easily.
It calculates from the current solar power, load and battery charge level if your car can be charged or not. If so it starts the charging process and if the sun goes down or you use more power for other things, it stops automatically. With the integrated web app you can see the logs of the current day and receive push notifications for different events.
The SolarManager is written in Python and uses WeConnect-python for the connection to the vehicle (ID.3, ID.4 and so on) and SolarEdge API or Sonnen API for getting information about current solar power.
Installation
Do the following to install it for example on a Raspberry Pi in headless mode:
- Connect to your Raspberry Pi with a terminal console as user 'pi'.
- Run
sudo apt update
. - Run
sudo apt full-upgrade
. - Run
sudo apt install python3-pip
. - Run
pip install WeConnect-SolarManager
. - Set needed configuration entries in
/home/pi/.local/SolarManager/config.txt
(see Needed configuration). - Run
sudo python /home/pi/.local/SolarManager/init.py
to install and start the service. A backup of your config file will be created automatically (see Update) - Open a browser and connect to your Raspberry Pi's IP on the configured port to check the logs at
/home/pi/.local/SolarManager/logs
if everything runs fine and enable push notifications.
Update
To install an updated version of WeConnect-SolarManager, just run pip install WeConnect-SolarManager --upgrade
. After that you have to restart the service by running sudo python /home/pi/.local/SolarManager/init.py
again.
Please note that with an upgrade the config.txt
will be overwritten. You can copy this to a file config.txt.user
, which will be used then. But in this case you have to care about new and changed settings by yourself.
Documentation
Configuration
In the config.txt file you find different entries you can or have to change.
Needed configuration
Section | Entry | Description |
---|---|---|
SolarManager | VIN | The vehicle identification number for the car you want to load with solar power. You find this in the WeConnect ID App in "My cars" view. |
DataSource | The data source you want to read solar data from. Currently there are data sources for "SolarEdge" and "Sonnen" available. | |
SolarEdge | ApiKey | Add the API-Key for getting data from your SolarEdge installation. You can get this in the Admin area in your SolarEdge-Monitoring-Plattform |
LocationId | Add the Location-ID for getting data from your SolarEdge installation. You can get this in the Admin area in your SolarEdge-Monitoring-Plattform | |
Sonnen | IP | The IP address where your Sonnen API is running. |
Port | The port where your Sonnen API is running. | |
WeConnect | Username | Your username you use for login in the WeConnect ID App |
Password | Your password you use for login in the WeConnect ID App |
Optional configuration
Section | Entry | Description |
---|---|---|
SolarManager | SolarCheckInterval | Interval for checking the state of the car and solar power. |
MinBatteryLoadToStartCharging | Minimum battery load that charging will be started. Before this SolarManager won't start charging your car. | |
MinPowerToGridToStartCharging | Minium power to grid that charging will be started. Below this SolarManager will only start charging if battery load is 100%. | |
MaxPowerFromGridToStopCharging | If your home uses more power SolarManager will stop charging your car. Value is negative because it's a power consumption. | |
MinBatteryLoad | Minium battery load you want to have. If battery load goes below this, SolarManager will stop charging your car. | |
SimulationMode | You can enable simulation mode to only log everything without really start or stop charging your car. | |
VehicleNameSuffix | The suffix you need to add to your car's nickname (see below). | |
WebApp | Port | Port for the web app. |
WebPushSubject | VAPID setting for push notifications. | |
WebPushPublicKey | VAPID setting for push notifications. | |
WebPushPrivateKey | VAPID setting for push notifications. |
Enable/Disable SolarManager
As SolarManager can't know if you want to load your car with solar power only or just load it because you need a full battery, there's a switch you can use right from your WeConnect ID App. If you want SolarManager to be active for your car, please extend your car's nickname in the app with the suffix (SMC)
(= SolarManager Control). If you want to disable SolarManager for your car, just remove the suffix again.
The reason for this nickname suffix is because it's the easiest way you can enable or disable SolarManager from everywhere without having access to your SolarManager instance running at your home.
Plug your car
SolarManager needs a car in the Ready for Charging state. This means you have to plug your car to your wallbox and authorize the charging.
Tested with
- SolarEdge solar system with 12 kWh battery
- Volkswagen ID.4 1st MAX
- Volkswagen ID.Charger Connect
Known Issues
- Push Notifications require a https connection with a valid SSL certificate. This is not possible for IP addresses and therefore the push notifications are limited to some browsers (e.g. Firefox).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file WeConnect_SolarManager-0.3.0rc7-py3-none-any.whl
.
File metadata
- Download URL: WeConnect_SolarManager-0.3.0rc7-py3-none-any.whl
- Upload date:
- Size: 201.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 965f7d0dd249e736d7e1fed52eddc3934ed5055b50c4bafdef610f6962720377 |
|
MD5 | 6a83cc27cca837c57890347b38063d67 |
|
BLAKE2b-256 | 489cd71af13fda99a3786fcc56e7aa39fdb3ca4ca82b792939d9f301ec59017f |