This fork is exploring the capabilities in modifying the Smart-EVSEv3 firmware.
Feel free to use this repository to build it yourself or to use the latest on from the releases folder but this is on your own risk.
Make sure to have read the original README.md (e.g. on howto connect to wifi).
For an idea how you could build the entire charging infrastructure using Smart EVSE, check out this post https://crunchtech.io/EV-charging-station-(part-I)
New Status page using the Rest API
Disabled WebSockets
Reduced max backlight brightness
Home battery integration
Endpoint to send L1/2/3 data, this removed the need for a SensorBox
Endpoint to send EvMeter L1/2/3 data (and energy/power)
Callable API endpoints for easy integration (see API Overview and Home Assistant Integration)
Added "Inverted Eastron" kWh, so that polarity is reversed when power is supplied to meter from below (like in most Dutch power panels)
Added current-limiting functionality if a subpanel is used, example:
mains
|
[main breaker 25A]
|
[kWh meter "Mains"]
|
-----------------------------------
| | |
[group breaker 16A] [subpanel breaker 16A]
|
[kWh meter "EV"]
|
----------------
| |
[washer breaker 16A] [smartevse breaker 16A]
In this example you configure Mains to 25A, MaxCircuit to 16A; the charger will limit itself so that neither the 25A mains nor the 16A from the subpanel will be exceeded... Note that for this functionality you will need to be in Smart or Solar mode; it is no longer necessary to enable Load Balancing for this function.
Added wifi-debugging: if compiled in, you can debug SmartEVSE device by telnetting to it over your wifi connection
Added EXPERIMENTAL use of Contactor 2 (C2);
one can add a second contactor (C2) that switches off 2 of the 3 phases of a three-phase Mains installation; this can be usefull if one wants to charge of off Solar; EV's have a minimal charge current of 6A, so switching off 2 phases allows you to charge with a current of 6-18A, while 3 phases have a minimum current of 3x6A=18A. This way you can still charge solar-only on smaller solar installations.
one should wire C2 according to this schema:
N L1 L2 L3
| | | |
| | | |
| | ------------------
| | |2-p contactor C2|
| | ------------------
| | | |
This way the (dangerous) situation is avoided that some Phases are switched ON, and Neutral is switched OFF. Note that it is important that you actually DO NOT switch the L1 pin of the CCS plug with the C2 contactor; some cars (e.g. Tesla Model 3) will go into error; they expect the charging phase to be on the L1 pin when single-phase charging... Note also that in case the phases cannot be detected automatically (especially when no EVmeter is connected), and SmartEVSE knows it is charging at a single phase (e.g. because Contact2 is at "Always Off"), it assumes that L1 is the phase we are charging on!!
by default C2 is switched OFF ("Not present"); if you want to keep on charging on 3 phases after installing C2, you should change the setting Contact2 in the Setup Menu.
For this a new parameter Contact2 is introduced, with values
There is a bug in the original firmware, and in the serkri firmware up until this version, that makes charging in Solar mode on a 3phase instalation, with a 3phase car toggle into an infinite start/stop/start.... sequence when not enough sun is available (e.g. when you only have a 1x16A solar feed). In order to fix this bug the behaviour of SmartEVSE is adapted:
When EVMeter and/of MainsMeter enabled, AND when in Smart or Solar mode, SmartEVSE now starts charging at MinCurrent (usually 6A); in the first 7 seconds it detects on which phases it is charging through EVMeter or MainsMeter (might be a Sensorbox)
if it is in Solar mode, and Contact2 is on "AUTO", and has not enough current to stay within ImportCurrent limits, it will switch C2 off to 1 phase charging. It will then move up the charging current to whatever is suitable. If current goes up again, it will NOT switch back to 3 phase charging since this is known to give problems with certain EVs.
if it is in Smart mode, it will now correctly limit its currents to the phases it is actually charging
This means the bug mentioned above is solved ONLY for people having Sensorbox and/or kWh-meter enabled.
Charging in Normal mode has not changed, and charging in Smart and Solar mode has not changed if you have no Sensorbox and/or kWh-meter enabled.
In a normal EVSE setup a sensorbox is used to read the P1 information to deduce if there is sufficient solar energy available. This however can give unwanted results when also using a home battery as this will result in one battery charging the other one.
For this purpose the settings endpoint allows you to pass through the battery current information:
The EVSE will use the battery current to neutralize the impact of a home battery on the P1 information.
Regular updates from the consumer are required to keep this working as values cannot be older than 60 seconds.
The sender has several options when sending the home battery current:
View API https://swagger-ui.serkri.be/
Have an idea for the API? Edit it here https://swagger-editor.serkri.be/ and copy/paste it in a new issue with your request (https://github.com/serkri/SmartEVSE-3/issues)
Your SmartEVSE can now export the most important data to your MQTT-server. Just fill in the configuration data on the webserver and the data will automatically be announced to your MQTT server.
There are three options to integrate SmartEVSE with Home Assistant:
through the HA-integration - the easy way
If you want to integrate your SmartEVSE with Home Asisstant, please have a look at the SmartEVSE custom_component
for Home Assistant. This custom_component
uses the API to share data from the SmartEVSE to Home Assistant, and enables you to set SmartEVSE settings from Home Assistant. You will need firmware version 1.5.2 or higher to use this integration.
by manually configuring your configuration.yaml
Its a lot of work, but you can have everything exactly your way. See examples in the integrations directory of our github repository.
by MQTT
If you don't like the integration, e.g. because it only updates its data every 60 seconds, you might like to interface through MQTT; updates are done as soon as values change.... you can even mix it up by using both the integration AND the MQTT interface at the same time!
Your MainsMeter, EVMeter and PVMeter will present themselves at port 502 of your SmartEVSE, via the modbus-tcp protocol. So this makes it possible for you to use whatever modbus function you want on whatever modbus register you want. The addresses on the tcp modbus are the same addresses as they are on the RTU modbus.
E.g. my MainsMeter is at slave address 0x0a, so this command reads register 70decimal and following:
mbpoll -a10 -t 3:hex -r 70 -c 10 10.0.0.76
There is a simple timer implemented on the webserver, for Delayed Charging.
An EU directive gives electricity providers the possibility to charge end consumers by a "capacity rate", so consumers will be stimulated to flatten their usage curve. Currently the only known country that has this active is Belgium. For more details see https://github.com/serkri/SmartEVSE-3/issues/215
If you are not using the webserver /update endpoint: