Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EV Charger support #565

Open
WillCodeForCats opened this issue Mar 28, 2024 Discussed in #564 · 28 comments
Open

EV Charger support #565

WillCodeForCats opened this issue Mar 28, 2024 Discussed in #564 · 28 comments
Assignees
Labels
enhancement New feature or request

Comments

@WillCodeForCats
Copy link
Owner

Discussed in #564

Originally posted by mikedeluca March 27, 2024
So I was digging around to try to figure out why some sites batteries work and at others they don't show up and I ran across a Modbus address that wasn't one of the 3 inverters.

{'c_id': 'SunS', 'c_did': 1, 'c_length': 65, 'c_manufacturer': 'SolarEdge', 'c_model': 'SE-EV-SA-US-40P', 'c_version': '0004.0019.0036', 'c_serialnumber': '63002925', 'c_deviceaddress': 4, 'c_sunspec_did': 103, 'c_sunspec_length': 50, 'current': 0, 'l1_current': 0, 'l2_current': 0, 'l3_current': 0, 'current_scale': -32768, 'l1_voltage': 0, 'l2_voltage': 0, 'l3_voltage': 0, 'l1n_voltage': 0, 'l2n_voltage': 0, 'l3n_voltage': 0, 'voltage_scale': -32768, 'power_ac': -32768, 'power_ac_scale': -32768, 'frequency': 0, 'frequency_scale': -32768, 'power_apparent': -32768, 'power_apparent_scale': -32768, 'power_reactive': -32768, 'power_reactive_scale': -32768, 'power_factor': -32768, 'power_factor_scale': -32768, 'energy_total': 0, 'energy_total_scale': -32768, 'current_dc': 0, 'current_dc_scale': -32768, 'voltage_dc': 0, 'voltage_dc_scale': -32768, 'power_dc': -32768, 'power_dc_scale': -32768, 'temperature': -32768, 'temperature_scale': -32768, 'status': 1, 'vendor_status': 0, 'rrcr_state': 0, 'active_power_limit': 100, 'cosphi': 0, 'commit_power_control_settings': 0, 'restore_power_control_default_settings': 0, 'reactive_power_config': 0, 'reactive_power_response_time': 0, 'advanced_power_control_enable': 0, 'export_control_mode': 0, 'export_control_limit_mode': 0, 'export_control_site_limit': 0}

This is ID 4 on the Modbus TCP. The model and serial match my Solaredge EV Charger. Feels like this would be interesting functionality to add... I'll try to do some more scanning of registers

@WillCodeForCats WillCodeForCats added the enhancement New feature or request label Mar 28, 2024
@WillCodeForCats WillCodeForCats self-assigned this Mar 28, 2024
@WillCodeForCats
Copy link
Owner Author

EV charger appears to present as an inverter based on the sunspec ident block.

@deqw
Copy link

deqw commented Mar 31, 2024

Looking at the model it is a Keba P40 charger disguised as a SolarEdge Inverter. Maybe just for presentation purpose?

@WillCodeForCats
Copy link
Owner Author

Maybe making it look like an inverter would let it reuse modbus definitions without SolarEdge having to support new types, but also if it looks like an inverter it wouldn't be possible to detect except by trying to match model strings.

If some of those values change when the charger is charging I could make a restricted display for a charger class.

@deqw
Copy link

deqw commented Apr 3, 2024

I have been using this Keba integration for a while to control the SolarEdge EV charger but stopped using it. Now using Node-Red on Home Assistant for this purpose which gives me more control.

@WillCodeForCats
Copy link
Owner Author

I can find modbus data about Keba P30 but not about P40.

If SolarEdge is just using the P40 rebranded and the P30 modbus still works with the P40, I can try that.

@deqw
Copy link

deqw commented Apr 3, 2024

There are others too (like BMW) that rebrand the Keba chargers. I use the Keba API for phase switching (1<->3) and to get some info from the charger. The API works fine. Maybe you already found the Keba UDP Programmers Guide here.

@WillCodeForCats
Copy link
Owner Author

I can't use the UDP guide unfortunately, it needs to be modbus through the SolarEdge inverter bus to work with this integration.

@mikedeluca
Copy link

The solaredge charger in this case does not apear to be the Keba. Solaredge seems to have their own EVSE for the North American (and I think Australian) markets. https://www.solaredge.com/us/products/residential/solaredge-home-ev-charger. The Keba is this one: https://www.solaredge.com/en/products/residential/ev-charging. I'll try to get some info from it with the car connected and charging. Its technically my secondary EVSE since I primarily use a Tesla wall connector, so I need to move some things to get the car close enough. I suspect your correct, that they just recycled sunspec registers to make things simple. I'll also see what i can pull from setapp.

@deqw
Copy link

deqw commented Apr 3, 2024

@mikedeluca the Keba one you reference is a P30, not a P40.

@mikedeluca
Copy link

So confirmed in setapp its configured as a solaredge follower, just like an inverter. Also was able to confirm in setapp that it contains FCC ID 2AGPT-PLNX, which is a solaredge comms board. https://fccid.io/2AGPT-PLNX/User-Manual/Users-Manual-rev-pdf-3941269. One interesting thing, the label on the outside proclaims it as a SE-EV-SA-US-40N not a 40P as the modbus returns. probably doesnt matter, but for future readers. Full serial is SJ5121-063002925-B1. In Setapp the serial is SN 05F5EB22-07 in the status page (probably the comms board?) and 63002925-B1 in the information screen. Im running Version 4.20.32/2.2.12/4.20.64 (CPU/EVcharger/WSA). I'm not clear how often these are configured via Modbus vs Wifi or ethernet. Mine is setup that way and is connected directly to inverter #1 for both modbus and AC power.

@mikedeluca
Copy link

Debuglog.txt

This is the debug log output from a scan of a bunch of the registers. last few scans are on the EVSE wile charging

@bisscuitt
Copy link

I believe I have one of these inverters. It's an SE5000H with integrated EV Charger (Australia) and it would be awesome if I could monitor and control charging over modbus.

Can you give me some advice on how to provide required modbus dumps ?

@laurencei
Copy link

laurencei commented Aug 8, 2024

@WillCodeForCats - do you have an EV charger?

Not sure if your seen this - but when adding the SolarEdge EV charger - some extra options appear in the SolarEdge app

IMG_3204

IMG_3205

and this is what it looks like when charging:

Screenshot 2024-08-08 at 11 40 11

Specifically the part I'm most interested in is been able to get the "plugged in status", toggle the "excess solar" on/off, and manually toggle the "charge now"/"stop charge" overrides.

Is there something I can do to help? I'm happy to run some local scans or do some reverse stuff if you can point me in the right direction for what you need?

@laurencei
Copy link

I'm not clear how often these are configured via Modbus vs Wifi or ethernet. Mine is setup that way and is connected directly to inverter 1 for both modbus and AC power.

That is how mine has been installed as well.

@laurencei
Copy link

I found this guide for the SolarEdge EV charger. Has some specifics on error codes etc that might be useful: https://knowledge-center.solaredge.com/sites/kc/files/smart-ev-charger-installation-guide-na.pdf

@WillCodeForCats
Copy link
Owner Author

No, I do not have an EV charger on my system.

There are various modbus scanning utilities that might be able to help. This one is cross platform: https://github.com/SciFiDryer/ModbusMechanic

@laurencei
Copy link

laurencei commented Aug 22, 2024

I've actually found an issue. When running SolarEdge in "Remote Control" mode, the EV charger doesnt work correctly, specifically the "pending excess solar" option doesnt trigger. I can only trigger the EV charger to work by manually trigger it in the app (or setting a schedule).

Previously the EV charger would absorb any excess solar up to the max charge rate (6.5kw) before sending anything to the grid.

The problem with manual charge is it forces a 6.5kw charge, meaning if I only have 2kw solar generation spare, I'll pull 4.5kw from the grid.

I'm going to reach out to SolarEdge about it - might be a way to get some modbus data on how to control the EV charger ourselves, since the app seems to lose the ability when we do remote control.

(Solaredge specifically gave me remote control back, so I can press them on helping to fix this issue).

@deqw
Copy link

deqw commented Aug 22, 2024

Charging on excess solar didn't work for me either. Since two weeks it is working however after an inverter (SE10K-RWB48BFN4) firmware update (0004.0021.0019). And still working after 0004.0021.0021 that it is on now. Load balancing
is also working ok. Before I - could/had to - trigger charging eg. by closing the car again (did not matter if it was open or closed already). Maybe a direction for them to look into.

@laurencei
Copy link

Yeah - they responded they have updated the EV Charger firmware - but I cant see it, so I dont know what exactly changed.

Will check how it goes.

@d0minander
Copy link

d0minander commented Sep 16, 2024

@WillCodeForCats About to have my second Solar Edge EV Charger Three phase installed, its a bit unclear if support for this has been implemented yet? if not, anything we can do to help?
I see that some people have mentioned its the Keba P40, but this is not correct, the SolarEdge EV Three phase charger is a variant of the Keba P30 X-series, you can se its the same design:
https://www.keba.com/en/emobility/products/x-series/x-series
In the documentation it says that the charger supports modbus, "The charging station gives you the option to transmit information and receive commands via the User Datagram Protocol (UDP) or via Modbus TCP"

@d0minander
Copy link

Regarding the models SolarEdge actually has two models, one for single phase and one for three phase.
The Keba P30 version is the three phase, it even runs on the same firmware, but seems to be one version behind the official Keba version.

@Zandor300
Copy link

Just want to point out that EV's have a policy, at least in the European Union, that when the max current the EVSE provides to the EV falls below 6A, it should stop charging altogether.

Assuming 230V/400V grid:

  • If you have a three phase installation and an EV that supports three phase charging, you need at least ~4,2 kW of excess PV before your EV will start charging.
  • If the charger or EV only supports single phase, it will start charging at ~1,4 kW of excess PV.

So for people who wonder why excess PV charging isn't working, this is probably why. If you have that enabled and you hit the "start charging" button in the mySolarEdge app, you will force the charger to start charging at full power, throwing the excess PV charging setting out the window for the current session.

SolarEdge doesn't provide the option to configure the P30 to start charging on single phase if your car supports three phase and you only have 1,4 kW of excess PV. Maybe the onboard settings UI of the P30 has this option available?

@d0minander
Copy link

@Zandor300 Good points.
When using single phase charging, can the inverter then boost power to the phase that the EV charger is using?
Becouse if the inverter has 3kw of excess that would only be 1kw per phase?

I could access the WebUI of the charger and it seems to have all the options that the Keba unit has, so if the Keba unit supports it, the Solaredge one should, but i dont have access to it right now since its installed at another property.
https://www.keba.com/en/emobility/products/x-series/x-series

@Zandor300
Copy link

Only the 3phase Home Hub inverter can provide different amounts of power to the phases. The rest of the 3phase inverters split the power output evenly over the 3phases.

So when you charge with single phase 3 kW, the 3phase inverter will provide 1kW on each phase. In the Netherlands, the smart meter provided by the energy company will perform net metering between the phases and you only have to pay for the sum of electricity used. So when you export 1 kW on phase 1 and import 1 kW on phase 2, you don't pay anything.
(This is different from the net metering where you can export 30 kWh during the day and import again in the evening)

Don't know about other countries.

@d0minander
Copy link

Ok thanks for the info.
I dont know how our net metering in Sweden works, will look in to it.
Seems the new Keba P40 has built in phase switching, but the P30 that SolarEdge uses needs an external box for phase switching.

@bisscuitt
Copy link

There are various modbus scanning utilities that might be able to help. This one is cross platform: https://github.com/SciFiDryer/ModbusMechanic

@WillCodeForCats I have the SE5000H inverter with built in EV charger

I'm trying to scan using ModbusMechanic and https://github.com/sanny32/OpenModScan but not having luck getting any registers to show any data.

Can you provide a quick howto on how to make these devices show any data?

Home Assistant is able to read the data with the same connection parameters I am using in the above scanner apps. I've tried a scan from 0 through to 65535 on the registers but everything comes back as a zero value.

I've tried multiple values for Device ID (1,2,3,4,101,102,103) but only seeing zero value responses. I can confirm that the TCP connection to the inverter is working as expected, I just can't get the right parameters to return any data.

If I can get the readings, I can provide some dumps and help work out what registers provide details for the EV charger. Thanks.

@Zandor300
Copy link

Zandor300 commented Oct 22, 2024

@bisscuitt There are input, coil and holding registers. As far as I know, SolarEdge only uses holding registers. Possibly you used functions for reading input or coil registers?

Also, device ID can be anything between 1 and 255, but is 1 by default.

@d0minander
Copy link

d0minander commented Oct 23, 2024

I can also help out doing a modbus scan in someone can point me to a good scan tool for MacOS.
I have an SE17K with the three phase EV charger.

Also here is a link to the modbus guide for the Keba P30 X-series, which the three phase SE charger is based on:
https://www.keba.com/download/x/dea7ae6b84/kecontactp30modbustcp_pgen.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

7 participants