Coder Social home page Coder Social logo

smartevse-3's Introduction

image

Note

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)

Changes in regards with the original firmware

  • 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

    • Note: Set MainsMeter to the new 'API' option in the config menu when sending L1/2/3
  • Endpoint to send EvMeter L1/2/3 data (and energy/power)

    • Note: Set EvMeter to the new 'API' option in the config menu when sending L1/2/3
  • Callable API endpoints for easy integration (see API Overview and Home Assistant Integration)

    • Change charging mode
    • Override charge current
    • Pass in current measurements (p1, battery, ...) - this eliminates having to use additionalhard
    • Switch between single- and three phase power (requires extra 2P relais on the 2nd output)
  • 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
        |    |    |    |
      --------------------
      | 4-p contactor C1 |
      --------------------
        |    |    |    |
        |    | ------------------
        |    | |2-p contactor C2|
        |    | ------------------
        |    |    |    |
      --------------------
      |    EV-cable      |
      --------------------
      

      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

      • NOT_PRESENT (default),
      • ALWAYS_OFF (= 1 phase charging),
      • ALWAYS_ON (= 3 phase charging),
      • SOLAR_OFF (always on except in Solar Mode where it is always off),
      • AUTO (starts charging at 3phase, but when in Solar mode and not enough current available for 3 phases, switches off C2 so it will continue on 1 phase) Note: this option will not work when LoadBalancing is enabled; CONTACT2 will be set to ALWAYS_ON when Loadbalancing is enabled. Disclaimer: this option is EXPERIMENTAL; in Normal and Smart mode there are not much problems to be expected, but in Solar mode strange Start/Stop scenario's might occur. As always, YOU ARE EXPERIMENTING AT YOUR OWN RISK!
    • 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.

New Status Page

image

Home Battery Integration

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:

  • A positive current means the battery is charging
  • A negative current means the battery is discharging

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.

Example

  • Home battery is charging at 2300W -> 10A
  • P1 has an export value of 230W -> -1A
  • EVSE will neutralize the battery and P1 will be "exporting" -11A

The sender has several options when sending the home battery current:

  • Send the current AS-IS -> EVSE current will be maximized
  • Only send when battery is discharging -> AS-IS operation but EVSE will not discharge the home battery
  • Reserve an amount of current for the home battery (e.g. 10A) -> Prioritize the home battery up to a specific limit

API Overview

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)

MQTT support

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.

Integration with Home Assistant

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!

Modbus TCP bridge

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

Simple Timer

There is a simple timer implemented on the webserver, for Delayed Charging.

  • Upon refreshing your webpage, the StartTime field (next to the Mode buttons) will be filled with the current system time.
  • If you press any of the Mode buttons, your charging session will start immediately;
  • If you choose to enter a StartTime that is in the future, a StopTime field will open up; If you leave this to the default value it is considered to be empty; now if you press Normal, Solar or Smart mode
    • the StartTime will be registered,
    • the mode will switch to OFF,
    • a charging session will be started at StartTime, at either Normal or Smart mode;
    • the SmartEVSE will stay on indefinitely.
  • If you enter a StopTime, a checkbox named "Daily" will open up; if you check this, the startime/stoptime combination will be used on a daily basis, starting on the date you entered at the StartTime.
  • To clear StartTime, StopTime and Repeat, refresh your webpage and choose either Normal, Solar or Smart mode.
  • Know bugs:
    • if your NTP time is not synchronized yet (e.g. after a reboot), results will be unpredictable. WAIT until time is settled.
    • if your StopTime is AFTER your StartTime+24Hours, untested territories are entered. Please enter values that make sense.

Improved starting/stopping through the LCD screen

  • When pressing o button longer then 2 seconds you will enter the Menu screen
  • When pressing < button longer then 2 seconds the access will be denied, i.e. the mode will be set to "Off" and charging will stop
  • When pressing > button longer then 2 seconds the access will be granted, i.e. the previously set mode will be activated and charging will start

EU Capacity Rate Limiting

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 #215

  • In the Menu screen an item "SumMains" is now available, default set at 600A
  • This setting will only be of use in Smart or Solar mode
  • Apart from all other limits (Mains, MaxCirCuit), the charge current will be limited so that the sum of all phases of the Mains currents will not be exceeding the SumMains setting
  • If you don't understand this setting, or don't live in Belgium, leave this setting at its default value

Building the firmware

If you are not using the webserver /update endpoint:

  • Upload via USB configured in platformio.ini: platformio run --target upload

smartevse-3's People

Contributors

arendjankramer avatar arpiecodes avatar bartv avatar daninden avatar dingo35 avatar hmmbob avatar jaroslawp avatar k-janssens avatar koen-serneels avatar marcovaneck avatar mstegen avatar pieter-ha avatar stevoh6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smartevse-3's Issues

communication error in Normal mode met Mains Meter op EM_API

via tweakers:
https://gathering.tweakers.net/forum/list_message/74075026#74075026

achterhoeker:
"Ik heb net serkri naar 1.5.1 geüpdatet in de smartevse en de custom component geinstalleerd. Na wat puzzelen hoe ik achter de serial nr van mijn smartevse kon komen praten ze met elkaar en dat werkt an sich prima.

Enige probleem dat ik heb dat hij nu in ook in normal mode een communication error blijft geven. Mainsmeter staat op api wanneer ik hem op smart zet. Gebruik hem eigenlijk tot nu toe op altijd normal en dat werkte prima zonder L1, L2 en L3 door te geven als ik het goed heb. Nu werkt mijn laadpaal dus niet :'(

komt dat omdat ik deze al eens door heb gegeven en hij oude gegevens gebruikte of is er iets anders veranderd?"

RemoteDebug

When building a debug version and try to debug over WiFi with telnet. The telnet command responds immediately with Connection refused
How can I do the remote debug?

Request info in interface

The EVSE is showing the total of the charged kWh's from the EV Eastron modbus unit.

Really would like to have this info displayed in the web interface too.

Thanks for the great work!

POST settings not working

GET on /settings works
But a POST on /settings doesn't provide a response?

Excerpt from postman:

curl --location --request POST 'http://192.168.8.4/settings?override_current=60' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{}'

Any ideas?

Solar mode

I'm wondering on how the solar mode works, because I can see a couple of use cases:

  1. Solar-Only mode: The car will only charge when the mains-meter is returning at least 6A. And the charge current will be updated continuously to the amount of energy which would normally be pushed back to the grid.
  2. Solar-Surplus mode: Same as above, but on top of a setup minimum charge power. F.e. 6A, this way the car will always charge, but when there is left over PV power, it will charge faster.

Are both modes somehow already supported via some combination of settings?

To make these options a bit more complicated, there are 2 options to meter:

  • Physically correct: Checks per phase how much power is available and uses the lowest value to check wether it may charge using PV power.
  • Billing optimised: In Belgium (and probably in other countries as well), billing is done across phases. So you only need to check the totals across phases. As long as there is 18A available somewhere over the 3 phases, you can charge on those 3 phases at 6A without your billing meter increasing.

Your thoughts please...

switching normal/off modes via API in master-slave configuration.

When I change modes between solar and smart (or other way around) on the master smartevse via API call it works as expected for the slave too. However when I switch mode to normal: both master and slave change but while switching back to solar or smart - master changes but slave stays on solar. When switching to off mode from solar/smart: master switches but state of slave is unchanged.

I know I can switch the mode separately on slave via its API endpoint: but apparently this disturbs bus communication between master and slave and as a result slave never starts charging after .. until both master and slave are power-cycled this is not recovering.

Read and display EV meter currents and use them to limit power to MaxCircuit

Hi, I am testing smartevse with Serkri firmware v1.4.1
Thank you for lots of improvements.
A feaure with display of EV meter currents is something that waiting for. Does current values intend to be display on LCD or API as well(?)

Would be grest to get some guidelines shining some light how power limitations function is being performed. The evse LCD shows the currents value that comes from the EV meter (Eastron) however do not experience any power limitations due to these inputs using smart/solar modes

"Read and display EV meter currents and use them to limit power to MaxCircuit (#21)

See that one of the changes vs smartevse firmware incl. add current endpoints. Are these values readable without sensorbox(?)
"Send L1/2/3 current information
Note: Set MainsMeter to 'API' option in the config menu when sending L1/2/3"

Unwanted state change from C -> C1 when RFID=EnableOne && (Switch=Access B || Sma Sol B)

From "zelfbouw laadpaal forum" on tweakers.net, user "MrMarquez".

Charging goes from B->C and stays there when RFID=disabled (behaviour is as expected), even when Switch=Access B or Switch=SmaSol B.

When RFID=EnableOne (and perhaps EnableAll, still testing), and Switch=Access B or Switch=SmaSol B, after some time charging goes to state C1 (stops charging).

This is no problem with the original Stegen software, but it is there from firmware 1.3.4 and higher.

API 'connected' bool or string?

The Swagger API documentation shows a boolean as 'connected' value. The settings API however, returns a string like "false" and "true", which then is handled/compared in code as a string. Let's say that the Swagger solution is the better ;o). For good practice the API should return a bool value, but then the code must be reworked.

new feature request RFID

hi thanks for the cool API and the new features since your fork!

is it possible to get and set RFID through API to make billing for different Cars with power consumtion per RFID possible
Also a nice feature is 1 and 3 phase switching per rfid

my next step is integration in IO-BROKER and write a short script to log all data in the influxdb with grafana

i have one SimpleEVSE-WiFi and 3 SmartEVSE-3 running with 30kwP SolarPanels

Is "smart" mode functionnal without an EV meter ?

On my first charging attempt (with 1.5.1 firmware) I tried using the smart mode to protect Mains.

Charge current kept quickly going up and down between 6 and 32 Amps and SmartEVSE quickly stopped charging and entered the one-minute timeout. After a minute it did the same up and down again and quickly went back in timeout.

Is this happening due to the absence of an EV meter to adjust charging current correctly ? if so should smart mode become unavailable while "EV meter" option is set to disabled ?

MQTT support

It would be really nice to have full MQTT support to publish status/measurement messages and to receive updates for the charging/current/etc. It's a very light weight protocol, no polling required, guaranteed delivery options and possibility of tight integration with Home Assistant through the auto discovery topics.

Raw data reporting different phase currents

Just started charging 3 phase at 13A. Lost WiFI when charging started. Restored WiFi by disabling and enabling again. The SmartEVSE is reporting in the display: CHARGING 13.0A. The Eastron reports: L1 12.20A, L2 12.02A, L3 12.15A. Looking good.

The raw data reports: {"version":"SERKRI-1.4.1","mode":"NORMAL","mode_id":1,"car_connected":true,"evse":{"temp":36,"temp_max":65,"connected":true,"access":true,"mode":0,"solar_stop_timer":0,"state":"Charging","state_id":2,"error":"None","error_id":0,"rfid":"Not Installed"},"settings":{"charge_current":130,"override_current":0,"current_min":6,"current_max":13,"current_main":25,"solar_max_import":0,"solar_start_current":4,"solar_stop_time":10,"3phases_enabled":true,"mains_meter":"Eastron"},"home_battery":{"current":0,"last_update":0},"ev_meter":{"description":"Eastron","address":102,"import_active_energy":0,"total_kwh":718,"charged_kwh":0},"mains_meter":{"import_active_energy":1794.8,"export_active_energy":0},"phase_currents":{"TOTAL":20,"L1":7,"L2":7,"L3":6,"last_data_update":1661794952,"original_data":{"TOTAL":20,"L1":7,"L2":7,"L3":6}},"backlight":{"timer":120,"status":"ON"}}

new feature request

I would like to turn this device from being API server to being MQTT IoT client.
So device can connect (subscribe) to remote MQTT topic to receive commands (start/stop charging) and send regularly messages about the energy usage.
I'm looking for a developer who could help me to do this as I'm not very experienced in C++.
If needed I can fund this development.
Thank you so much!

Help with battery integration

Hi to every one.

I am trying to include the battery integration. I think I need more info/help.

I have installed the Release v1.2.0-serkri-v3. The firmware.bin and the spinff.bin via http://xx.xx.xx.xx/update. I can see now the new status page.
I am new at this type of proyects and my knowlage in coding is 0.

Can anyone teach me what is my next step to make the sistem to see the battery?
I use a Huawei Luna with a Huawei inversor.

Also I don´t know how can a see the EVSE in my home assistan.

Is anyone as lost as I am? xD

PD: I use the sensorbox to see the L1 details, I am only working on monophase.

Thank you.

Kostal KSEM Integration

After successful installation of the SmartEvse with firmware upgrade to Serkri (thanks a lot for the extended functionality) I still fail to get the Modbus communication working out --> Error on Serial Communication

Installation was made with direct Modbus connection from the Smart Energy Meter (without Sensorbox). I am wondering if that is caused because in KSEM I can only select 9600 bps 8N2 (not 9600 8N1).

Would it be possible to integrate Kostal Smart Energy Meter (KSEM) Settings into the SmartEvse?

SmartEvse NoCom
KSEM Modbus Settings
https://www.kostal-solar-electric.com/de-de/produkte/zubehoer/smart-energy-meter/-/media/document-library-folder---kse/2020/12/15/13/54/ba_kostal_interface_ksem_en.pdf

Wrong charging current in Smart mode with 1.4.2

For some reason the new 1.4.2 limits my charge current in Smart mode. Normal mode works well.
Anything change in the calculation? I have read something about Max Circuit here: https://github.com/serkri/SmartEVSE-3/pull/21/files
At the moment it charges 16A-17A instead of 32A setpoint (=30.6A real current). I think it's using the default value of Max Circuit

#define MAX_CIRCUIT 16 // Max current of the EVSE circuit breaker

But I don't have a menu item to change Max Circuit to 32A.

   
version "SERKRI-1.4.2"
mode "SMART"
mode_id 3
car_connected true
wifi  
status "WL_CONNECTED"
ssid "WiFi2020"
rssi -48
bssid "F0:9F:C2:F4:01:56"
auto_connect false
auto_reconnect true
evse  
temp 44
temp_max 65
connected true
access true
mode 1
solar_stop_timer 0
state "Charging"
state_id 2
error "None"
error_id 0
rfid "Ready to read card"
settings  
charge_current 169
override_current 0
current_min 6
current_max 34
current_main 40
solar_max_import 1
solar_start_current 4
solar_stop_time 10
3phases_enabled false
mains_meter "Eastron"
home_battery  
current 0
last_update 0
ev_meter  
description "Eastron"
address 102
import_active_energy 0
total_kwh 3613.6
charged_kwh 0.8
mains_meter  
import_active_energy 6810.9
export_active_energy 2329.7
phase_currents  
TOTAL 183
L1 183
L2 0
L3 0
last_data_update 1661893259
original_data  
TOTAL 183
L1 183
L2 0
L3 0
backlight  
timer 120

Posting to API doesn't work in 1.5.2

Running the latest from github, it does run and it's connected:

GET http://192.168.5.172/settings

{
    "version": "v3serkri-1.5.2",
    "mode": "NORMAL",
    "mode_id": 1,
    "car_connected": true,
    "wifi": {
        "status": "WL_CONNECTED",
        "ssid": "iotwinternet.ict-one.nl",
        "rssi": -70,
        "bssid": "C2:FB:E4:11:2A:7A",
        "auto_connect": false,
        "auto_reconnect": true
    },
    "evse": {
        "temp": 20,
        "temp_max": 65,
        "connected": true,
        "access": true,
        "mode": 0,
        "solar_stop_timer": 0,
        "state": "Charging",
        "state_id": 2,
        "error": "None",
        "error_id": 0,
        "rfid": "Not Installed"
    },
    "settings": {
        "charge_current": 160,
        "override_current": 0,
        "current_min": 6,
        "current_max": 16,
        "current_main": 25,
        "solar_max_import": 0,
        "solar_start_current": 4,
        "solar_stop_time": 10,
        "enable_C2": "Not present",
        "mains_meter": "Sensorbox"
    },
    "home_battery": {
        "current": 0,
        "last_update": 0
    },
    "ev_meter": {
        "description": "Disabled",
        "address": 12,
        "import_active_energy": 0,
        "total_kwh": 0,
        "charged_kwh": 0
    },
    "mains_meter": {
        "import_active_energy": 0,
        "export_active_energy": 0
    },
    "phase_currents": {
        "TOTAL": 0,
        "L1": 0,
        "L2": 0,
        "L3": 0,
        "last_data_update": 0,
        "charging_L1": false,
        "charging_L2": false,
        "charging_L3": false,
        "original_data": {
            "TOTAL": 0
        }
    }
}

POST http://192.168.5.172/settings

{
    "override_current" : 80
}

Returns null

{
    "mode" : 0
}

null

and so on :)

3 Phase wire scheme

Can you confirm wiring for 2 contactors in order to switch between 1P and 3P charging should be like this?
(If so, can you update the manual as well?)

Linked issue: #18

dsmr 4.2 datagram every 10 seconds from p1

The issue is that the EVSE also has a 10 second delay to require new API data for L1/L2/L3.

What happens is that the charging stops and starts randomly because of missing API information.

I would like to extend the delay in EVSE to 12 seconds before charging stops when no API data is received. This provides enough margin for the p1 data to be processed.

Create new "bare" mode

"Bare" mode would accept high-level commands from the API to control charging: start,stop and the amount of current, but leave low level control up to the evse (such as operating the contactor, driving cp, reacting on faults etc.) .This would allow to use the evse as a slave in a bigger setup and have a separate controller do the power calculation for each connected device (such as evse's but also others). This centralized power controlling could be handy if there are multiple devices connected each requiring power. Doing this calculation on the evse would become too cumbersome as there are better/more high level alternatives available

Unlocking the cable

Is it possible to unlock the (fixed) cable at the car’s side from the SmartEVSE? Would like to have it unlocked with the switch or even not having it locked at all when charging starts with my inside SmartEVSE.

High initial current on starting the charge

Hello,
in Solar or Smart mode when plugging in the car or toggling the button to charge I notice an initial charge current (1-3s) with the Max current before it actually gets limited (to import + solar contrib). In this situation the charge current will exceed the setting for "MAINS".
I would like to initiate the charging with the MIN current for a few seconds before the charge current then ramps up. (instead of MAX and ramp down)
However as I am not very experienced in coding I find it difficult to figure out where in the code I could introduce such delay and would very much appreciate if somebody could help me out with some hints or a sketch. (I already tried to increase the CHARGE_DETECTION_TIME).

The background is: My off grid setup is a battery inverter in combination with a grid inverter. When the battery is full, the grid inverter is in idle mode and the regulation works rather slow. When this is the case the maximum current is limited to what only the battery inverter can provide whereas when the grid inverter is contributing the maximum current that the system can provide is higher.

3 Phases setting

Got version 1.3.1 installed.

$('#enable_3phases').text(data.settings.enable_3phases ? "Yes" : "No");

The setting is: '3phases_enabled' so this will always show 'No'

Failsafe protection when loadbalancing

I am about to install a new smartevse which I want to use for solar charging and load balancing.
As I want to provide the current measurements myself (from my P1 meter using the api), I was wondering if there was any failsafe in the code to prevent overcharging when no up-to-date data is available.

I was checking the source code for that, and the only thing I could find was the following

        if (MainsMeter == EM_API && phasesLastUpdate < (time(NULL) - 60)) {
            phasesLastUpdate=0;
            Irms[0] = 0;
            Irms[1] = 0;
            Irms[2] = 0;
            Isum = 0; 
            UpdateCurrentData();
        }

First thing, for me it seems that 60 seconds is a bit long when load balancing.
Secondly, I think the reset is done reversed, it will reset to 0, allowing maximal charging. So if there is no data available, it will think that all main phases have no current, and the charging current can be increased.
Thirdly, this check might also be beneficial for the regular modbus updates I think (so not only for the API).

Building Firmware fails due to missing bootloader

Hello,

I just tried building your firmware using platformio run. I installed platform.io using brew on my Mac.
Even though the dependencies seem to be fetched and used, the actual build process fails due to a missing bootloader file.

Building in release mode
*** [.pio/build/release/bootloader.bin] ...
 ... Source `/Users/FooBar/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader__80m.elf' ...
 ... not found, needed by target `.pio/build/release/bootloader.bin'.

Am I'm using the wrong release (the master branch of your repository).

EvMeter API endpoints

Running version 1.5.1 and trying to use all API meters.
I am able to POST Grid details without a problem but I can not see how to POST EV meter and Solar meter data.
Are these just placeholders for now?

WiFI disconnects (2)

Follow up on the previous, closed, WiFi topic. The disconnects still occur and then I have to go to the Smart EVSE and fiddle with the menu to get it started again. Completely renewed WiFi network by now, with an access point a few meters away, so see no problem there. No one else here with disconnecting WiFi? So if someone can take another look at this and make this thing trying to get on WiFi whatever it takes ;o)? Even a scheduled reboot would be better than as it is right now.

Mainsmet disabled

I’m still running v 1.4 that was published earlier. Today I noticed mainsmet was disabled when I changed the setting from Smart to Normal, also the mainsmet address was gone. When in Normal mode the Mainsmet setting is not in the menu. 3 phase is activated but it is only charging on 1 phase although all 3 phases are activated. Then after a while probably something went wrong while charging and power was cut completely. Have no time to fiddle with the firmware at the moment but maybe in meantime someone has an idea what went wrong here.

using API for current POST every 10 seconds needed?

I am using Smart EVSE V3 Version: SERKRI-1.4.4 in combi with Home Assistant.
And in stead of the p1-cable I am using the API with POST/currents.

In my configuration:
laadpaal_share_p1: url: http:///currents?L1={{ states('sensor.current_phase_l1')|float10 }}&L2={{states('sensor.current_phase_l2')|float10 }}&L3={{ states('sensor.current_phase_l3')|float*10 }}
method: POST
In my automation:
action:
service: rest_command.laadpaal_share_p1

This works fine.
But I have learned that I have to POST at least every 10 seconds otherwise I will get an "Error: Communication Error" which will be solved with one (or some) new POST(s). My intention was to POST only when the current changes and the smart EVSE is <> OFF. I can understand that the Smart EVSE wants an update regularly. Is this 10 seconds maximum (and always needed even when it is OFF) or is there an option to optimize and mimimize the number of POSTs?

Which version to use

I'm still using Version: SERKRI-1.4.0 and saw 1.3.8 published yesterday. When will these versions come together and what version to use for now? Does 1.3.8 include the WiFi solutions?

Change serial number when update to 1.5.1

My serial number where changed to a new serial number when update to 1.5.1. Not sure if it really impacts anything, but i had to change the local url to the new serial number. The new serial number is only, to my knowledge, found under its name on the wifi network. Could be an issues if you need to claim a warranty repair I guess.

charged_kwh & charged_total are 0

Hi there, I've just installed SmartEVSE and flashed it to version 1.3.8.
Any idea why the charged_kwh & charged_total are 0? They do not return anything.

Thanks!

New Status page using the Rest API

Is the HTML for this new status page (like in the screenshot) provided by the firmware or is it just the JSON from the GET /settings API? If there is the complete HTML what is the correct URL? Thanks!

Communication Error

So now and then I get a Communication Error in my response: "error":"Communication Error","error_id":2

What exactly is this error (caused by)? Can this error be assigned to a specific address on the RS485 bus?

Thanks.

Default setting to solar after 230V reset

The current distribution switches on in SOLAR mode when the EVSE had a hardreset after a 230V off/on.

I would prefer the mode to be SMART, so when there is a power outage at night the car will be full instead of empty waiting for the sun to come up.

Thanks

EV meter connection

Hello,

I started to use SmartEVSE3 with original FW and quickly switched to serkri fork with great results. Basic functions work fine same as HA integration. Thank you!

My question (rather ask for help/explanation) is about connection of EV meter. I have dedicated EV meter in the junction box of the SmartEVSE which can provide data via modbus/RS485.

The question is if it is possible to connect the modbus EV meter to SmartEVSE and read at least energy consumed (kWh) to the car?
And if yes, then how to do it? How to wire the A/B and what to set in the SmartEVSE.

It would be nice to avoid fiddling with ESP just because of this... I saw a lot of notes about possibility to connect EV meter, but there is also mentioned smartbox, smartbox2, no need of smartbox, P1 connector, A/B/GND on the low power connector - sorry buddies, I'm confused and lost.

Could someone help me? Thanks a lot!

charged_kwh & charged_total disappeared after upgrading to 1.4

I've upgraded earlier this week from 1.3 to 1.4 in order to get rid of the wifi issues. But since the upgrade the charged_kwh & charged_total are not present anymore in the API (and also not visible on the webpage dashboard).
Do I need to do something after the upgrade or is this a bug?

Smart mode not always working

So I just looked at my energy usage and saw my phase which I use for loading was at 28a all the time, car was charging at 25a.
My mode was set at Smart, my main max is 25.
After restarting twice it started to work again. I haven't seen this behaviour before, but found it a little disturbing.
Probably not easy to find out why.

Release V1.4.0 overloads Modbus bus

Just upgraded the SmartEVSE, noticed I could not read the modus (Eastron meters) anymore with this version. Switching back to the 1.3.4 made it possible again.

API documentation - update request

Is it possible to update the Swagger API documentation eg. to reflect "Switch between single- and three phase power (requires extra 2P relais on the 2nd output)" and maybe other changes that were made in the API? Thanks!

Serial number changed

          Very interesting! Turns out that when your SmartEVSE is turned on, it calculates a 5 digit serial number from the MAC address, and uses that to put up the AP for wifi configuration. And later on it calculates a 4 digit serial number from a pre-programmed value. To prevent confusion I disabled the second number, but now you say the second one is on the physical label, my conclusion is that I made the wrong decision....

1.5.2RC.zip
Would you be so kind to test the included firmware.bin (spiffs.bin has not changed); it should give you back your "old" serial number, and hopefully it still gets recognized by the HomeAssistant component....

Originally posted by @dingo35 in #85 (comment)

Factory Reset

Unfortunately my EVSE does not recognise my EV anymore when connecting.
I already checked and temporarily switched cable and car but these seem to be OK communication-wise. Firmware + Spiffs re-upload also did not fix it.

How can I make factory reset to the EVSE to start from scratch?

grafik

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.