https://github.com/jollyjinx/solarcharger
Charge your car when the sun shines enough and the house it not using too much.
https://github.com/jollyjinx/solarcharger
Last synced: 2 months ago
JSON representation
Charge your car when the sun shines enough and the house it not using too much.
- Host: GitHub
- URL: https://github.com/jollyjinx/solarcharger
- Owner: jollyjinx
- License: mit
- Created: 2020-04-04T08:24:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-22T13:23:59.000Z (almost 4 years ago)
- Last Synced: 2025-01-08T07:48:04.351Z (4 months ago)
- Language: Perl
- Size: 1.24 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SolarCharger
Smart charge your ev-car to a percentage when the sun shines enough and the house it not using too much.## Features
- low system requriements - runs on a router
- self contained, no need to install additional software/modules
- website for overview, changing settings and manual starting a charge
- charge your car only to a specific percentage (not full)
- when over 70% limit charge car until 90% to not waste solar energy
- continous adoption to current pv generation## Overview
The script reads the live values from the pv-system, current house consumption, battery state of the car and charges the car according to the settings done on the website it generates. The generated website looks like this:
![]()
A typical day (with charging in the afternoon) looks like:
![]()
## Supported Systems
The system uses classes for accessing the various hardware devices. Currently the following classes are included:
- generic Modbus over Ethernet access class
- SMAReader a class for specifying which modbus values represent solar inverter and household state
- PhoenixCharger a modbus extension to specify which values are which on the phoenix charger
- BMWConnector reads in json file from website to know if the car is at home and percentage of the battery if not used it will charge to 100%The system generates a website (default is http://localhost:5145 ) which lets you set the default settings.
I do have a BMW and if that's hat home it only gets charged when it's below a set state e.g. 80%. I do have a 70% feed in rule so I charge the car regardless of it's charging state if the solar system would be cut down to 70% otherwise. It will charge then with 6A and only until 90%.
## Configuration
My scripts support --help as commandlineoption as well as configuration via config file. To try out if it's seeing the solar inverter correctly try out the following:
perl solarlogger.perl --SMAAddress=192.168.10.10
The solarcharger script is named solarcharger.perl and requires at least two things SMAAddress and PhoneixAddress so the simples of calls would be
perl solarcharger.perl --SMAAddress=192.168.10.10 --PhoenixAddress=192.168.10.11
Change the config.ini file to use the ipaddresses/names for your setup. Start the script for testing with perl startcharger.perl --debug to see what's happening when you have problems.