CreasolTech / domoticz-hyundai-kia

9 stars 4 forks source link

[Feature Question] : possibility to start and stop charging #4

Closed rezzalex closed 1 year ago

rezzalex commented 2 years ago

Hello, thank you for your plugin.

I will have soon a Ioniq 5.

Is your plugin allows to start and stop the charging while the supplied "domestic" cable is plugged? My purpose is to start the charging only when I have enough Solar panel Autocumsumption. I alredy do that successfully with my "water heater", using the Enphase plugin to detect auto consumption. (then I will have to set priorities between the 2 devices...)

Is it dangerous to start and stop it often ?

thanks and best regards

CreasolTech commented 2 years ago

It's not dangerous to start/stop charging often. Actually the start/stop charging feature is not enabled, but it will be easy to add it: the python module used to communicate with the car already support EV charging start/stop. What it's recommended is to charge the car at about 4 kW to get the best efficiency: if the OBC of Ionic5 is the same as Kia Niro, efficiency is very low at 1.5-2 kW power (less than 80%), so I suggest to not purchase 8-12A charger.

rezzalex commented 2 years ago

thank you, Is it possible to add the feature before end of this year ? :-)

My intention is to use a standard french wall plug ==> 1,8 kW (8A) or 2,3 kW (10A) maximum ... That way, I will avoid additional expenses for a "real" and powerful charge box. I know it will take something like 30 hours to gain 60% capacity, but it is OK regarding my needs.

could you point me to a detailed explanation regarding charging efficiency?

CreasolTech commented 2 years ago

No problem to include the start/stop charging: I'll do it very soon.

Charging efficiency: if you charge your car with 8A charger, you have an efficiency of about 75%: it means that to load 30kWh to your battery you spent 40kWh of energy. Charging at 20A you have an efficiency of about 85%: it means that to load 30kWh to your battery you need 35kWh of energy. Frankly speaking, I hope that Hyundai/Kia now uses better On Board Charger than mine (OBD 11kW, Kia 2021) because it's really stupid to loose so much energy due to poor OBD. I also bought the 8-12A charger, controlled by a relay module to activate it only where there were enough energy from photovoltaic, but after making some tests about charging efficiency I switched soon to a own made wallbox. If you want to make a wallbox by yourself, next month we'll complete our EVSE project, will cost about 80€. Add a residual current circuit breaker, a contactor, a cable and you'll get a full feature wallbox that can be controlled by domoticz and can load your battery at full power or using only extra power from photovoltaic.

rezzalex commented 2 years ago

Why no using a home made wallbox, that could allow me to charge faster if needed. But I know that my solar production rarely exceeds 4kwh (approx 16A) during summer... so not sure it is worth the investment (even for 80 €) if I don't need to charge fast.

CreasolTech commented 2 years ago

Hyundai/Kia EVSE cable with 8-12A current (selectable) costs about 300€: 8A charging is 100% useless because efficiency is 75% or less. 12A is a bit better, efficiency increases to 80%. During the Summer, maybe you can use only renewable power from photovoltaic, but during the Winter you pay the energy so it's much better to increase efficiency to avoid loosing energy: for this reason during the Winter it's better to charge at 4kW. You can do as me: purchase the standard kia/hyundai cable, use it for some months, then put it an a box and start using a smart wallbox.

rezzalex commented 2 years ago

this cable is delivered with the ioniq 5 : image

image

Did you measure the charging efficiency yourself or did you refer to some shared info over the web ? I did not find any info on the Ioniq 5 OBD yet

CreasolTech commented 2 years ago

That's good, if free... set to 10-12A and charge the vehicle. I suggest to use a good relay module to activate it when you have enough power from photovoltaic: it's better to disconnect the car to prevent any problem caused by electric static discharge. Alternatively, you'll use the start/stop charge command in Domoticz (it will be available soon).

rezzalex commented 2 years ago

I have just verified that I have a real 16A plug on my "electrical board" with the right 2,5 mm cables plugged to a 20A circuit breaker ==> I will set 12 A on the CRO.

I did not think about a real need for manual physical connection and disconnection. Is there a risk of electric static discharge if I use only the start/stop charge command in Domoticz ?

rezzalex commented 2 years ago

is Hiunday provide the feature and the API to select the charging power ? from 6 to 12A in that case?

CreasolTech commented 2 years ago

When you issue the STOP CHARGING command to the car, the EVSE cable disconnects the mains power supply (only earth cable is connected). In case of ESD (during storms), if charging is disabled, I believe that only the EVSE cable will be affected. Car is protected. If this is not a problem, you can leave EVSE cable connected and use start-stop command on your car (Domoticz). About setting the charging current from the API, you can't do it.

rezzalex commented 2 years ago

Thanks a lot.

In case of any storm, i will manually and physically disconnet the cable

rezzalex commented 2 years ago

f you want to make a wallbox by yourself, next month we'll complete our EVSE project, will cost about 80€. Add a residual current circuit breaker, a contactor, a cable and you'll get a full feature wallbox that can be controlled by domoticz and can load your battery at full power or using only extra power from photovoltaic.

Hello @CreasolTech , did you finish your EVSE. Is it this page : https://www.creasol.it/fr/EVSE ?

thank you

CreasolTech commented 2 years ago

Hello @CreasolTech , did you finish your EVSE. Is it this page : https://www.creasol.it/fr/EVSE ? The page is https://www.creasol.it/en/EVSE (the english version is better) but I'm still working on the firmware to integrate some features.

rezzalex commented 2 years ago

is it "just" the DomBusTH Module ?

or re we talking about the "DomBusEVSE", still under development?

CreasolTech commented 2 years ago

DomBusEVSE", still under development!

rezzalex commented 2 years ago

I am definitely interested! ;-)

when do you think this can be ready ?

CreasolTech commented 2 years ago

DomBusEVSE will be ready in few days.

rezzalex commented 2 years ago

Hello. I saw this article: https://www.creasol.it/fr/info/electronic-consulting/our-products/42-home-automation/160-creasol-dombusevse-smart-electric-vehicle-charging-controller-for-diy-wallbox

But I can t see how to connect the dedicated electric plug for charging the EV ?

CreasolTech commented 2 years ago

Mains power supply (230V single-phase, 400V three-phase, ...) is connected to the vehicle through a contactor (relays). Only the Control Pilot wire + earth/ground are connected to the EVSE module. A smart EVSE module:

  1. monitors the mains power supply through a energy/power meter
  2. monitors the charging power supply, through another energy/power meter
  3. monitors the control pilot to check the vehicle status (disconnected, connected, charging requested, ventilation requested, alarm)
  4. send to the car a 1KHz PWM signal to specify the max available current for charging
  5. activates the mains power supply through a contactor
  6. records all measures to provide nice charts that permit to have a statistic about electric car consumption

With Domoticz, it's also possible to connect the vehicle cloud to get other informations about battery state of charge, odometer, location, speed, ...

rezzalex commented 2 years ago

Thank you.

It seems the second part of the webpage is describing a much larger installation, no ? Is there any product physical description or how to physically connect? Or is it based on the Dombus31 ?

How can you mix solar power with grid power in 1 physical plug ?

My problem is that my NAS hosting Domoticz is in the living room while the EV will be charging in the garage below. I have RJ45 cable everywhere in the house but nothing for passing the BUS cables...

Le dim. 2 oct. 2022 à 21:39, Creasol @.***> a écrit :

Mains power supply (230V single-phase, 400V three-phase, ...) is connected to the vehicle through a contactor (relays). Only the Control Pilot wire + earth/ground are connected to the EVSE module. A smart EVSE module:

1.

monitors the mains power supply through a energy/power meter

2.

monitors the charging power supply, through another energy/power meter

3.

monitors the control pilot to check the vehicle status (disconnected, connected, charging requested, ventilation requested, alarm)

4.

send to the car a 1KHz PWM signal to specify the max available current for charging

5.

activates the mains power supply through a contactor

6.

records all measures to provide nice charts that permit to have a statistic about electric car consumption

With Domoticz, it's also possible to connect the vehicle cloud to get other informations about battery state of charge, odometer, location, speed, ...

— Reply to this email directly, view it on GitHub https://github.com/CreasolTech/domoticz-hyundai-kia/issues/4#issuecomment-1264717650, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIMCHN7JHHVMBSMPKY7BHXDWBHQG3ANCNFSM544K7LWA . You are receiving this because you authored the thread.Message ID: @.***>

CreasolTech commented 2 years ago

ethernet cables: you can use 2 twisted pairs for ethernet, 1 twisted pair for RS485 and 1 twisted pair for 12V, connecting only the 2 twisted pairs to the RJ45 connectors You can also place a RockPIS or another small controller within the EVSE, then connect it by ethernet/wifi, but the first solutions is much better from my point of view. In the next days I'll make some pictures to explain connections.

CreasolTech commented 2 years ago

The following diagram shows how to connect DomBusEVSE module to energy meters, contactor, RCD to have a complete full-feature DIY wallbox. More info at https://www.creasol.it/CreasolDomBusEVSE https://docs.creasol.it/creDomBusEVSE_schema1.pdf

rezzalex commented 2 years ago

Thank you,

Not sure to see how you can mesure electrical solar Prod ?

Le mer. 5 oct. 2022 à 20:55, Creasol @.***> a écrit :

The following diagram shows how to connect DomBusEVSE module to energy meters, contactor, RCD to have a complete full-feature DIY wallbox. More info at https://www.creasol.it/CreasolDomBusEVSE https://docs.creasol.it/creDomBusEVSE_schema1.pdf

— Reply to this email directly, view it on GitHub https://github.com/CreasolTech/domoticz-hyundai-kia/issues/4#issuecomment-1268825246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIMCHN2SY6J2GOVSRDTUCBDWBXFIXANCNFSM544K7LWA . You are receiving this because you authored the thread.Message ID: @.***>

CreasolTech commented 2 years ago

I don't need to know how much the solar plant produces: I need to know how much power is fed to the grid. If your house is exporting 2kW to the grid, the EVSE module (in SOLAR mode) will set current so the power to the grid is reduced to 0-230W. If the photovoltaic plant on the roof does not produce so much and charging efficiency is poor (when power < 2kW), then you can set charging mode to 25% or 50%: if available power from grid is 6kW and your photovoltaic produces 2kW, setting to 25% means that the charging power will be up to 2+1.5=3.5kW: the EVSE algorithm will set charging current so the power from grid will never be more than 1.5kW (25% of 6kW, in this example).

rezzalex commented 2 years ago

OK, thank you, it is more clear now. In Domoticz, I have my "Injection to Grid" value updated every 1 minute (taken from Enphase DZ plugin), so I can set the EVSE module parameter accordingly. In my case, do I still need the 2 energy meter modules ?

Now, How can the Electric vehicle recognize the power value it receives? could you describe the "physical" manipulation on the type 2 cable ?

CreasolTech commented 1 year ago

Sorry for the long delay. Getting instant power every minute is not good if you want to track the power consumption and use only energy from solar/wind to charge your car. Our EVSE module is programmed to read charging and grid power every 3 seconds. DDS238-2 ZN/S is a cheap energy meter, you should use this energy meter with DomBusEVSE wallbox. See the schematic at https://www.creasol.it/CreasolDomBusEVSE

rezzalex commented 1 year ago

I already do this way for my "water heater". it is turned on and off every minute depending on some injection thresholds I have set in DZ scripts. Those thresholds are not very strict regarding energy measurement. My physical batteries allow me to stay in consumption that not take on grid but sometimes on batteries, within a minute. That is why I have asked you initially to add the "charging on/off" function to the DZ plug-in :-)

In your DomBusEVSE wallbox, what is the Energy variation module you suggest ? I am afraid this could be quite expensive ?

CreasolTech commented 1 year ago

Ok, now the start/stop charging command, sent to Kia, works good. What do you mean with "energy variation module"? The DIY wallbox schematic uses cheap DDS238-2 ZN/S energy meters, one meter to account energy/power to the EV, and another one for the grid. EVSE module already have the Control Pilot output to communicate to the EV how much current that can be drained by the car, so 1.if you connect GRID energy meter after the sensor of your battery/inverter, you are able to send to the car only energy from solar without draining the battery, while

  1. if you put the GRID energy meter before the battery/inverter sensor, in SOLAR mode DomBusEVSE will charge the car using also the energy from your stationary battery. Example using DomBusEVSE in solar mode: case 1. photovoltaic is producing 4 kW, your house is consuming 1 kW, electric car will be charged at 3kW and your battery will be in stand-by. case 2. photovoltaic is producing 4 kW, your house is consuming 1 kW, your battery is able to source 5kW => electric car will be charged at 4-1+5=8kW I'm not sure to have answered your question.
rezzalex commented 1 year ago

I thought the module on the left of the second DDS238-2 ZN/S energy meters was a "power variator". If not, what is it ?

CreasolTech commented 1 year ago

The tiny module between type-B RCCB and DDS238-2 ZN/S energy meter is a 13.6V power supply unit, used to supply DomBusEVSE module.

rezzalex commented 1 year ago

for the enphase domoticz, it pulls data every 30 secs, not every 1 min. But I did not want to perform On and Off on my water heater too often, in order not to break it, so I set a check every 1-minute :-). This is a "mechanic" thermostat, not an electronic one, do you think it can damage the electrical heating resistance or thermostat to send and cut power every 30 secs ?

Same for the EVSE, I understood you propose to charge ON and OFF, or change the power sent to the car, potentially every 3 secs. Are you sure this will not damage anything?

CreasolTech commented 1 year ago

EVSE and car charging: nothing can be damaged. On Board Charger is designed to adjust the charging current within 6 seconds from when the EVSE module has set another current value. Also, EVSE contactor is always activated and disactivated with charging current = 0, and Type-2 plug connector has a proximity pilot that is used by the On Board Charger to disable charging when the connector is pulled out.

Your script that manage the water heater may be a bit smarter and do like DomBusEVSE: if there is not enough power for the water heater, wait 90-150s before switching power OFF to the heater, because it may happen that a load is activated for a short period.

rezzalex commented 1 year ago

For the water heater, I have preferred to check every minute :

. if the injection to grid > 1kwat ==> heat on If the power consumption from the grid is < 200 watts==> heat off

Knowing this water heater consume 2000 watts.

Then I added a mechanism to ensure" heat On" during 3h / day whatever the solar production.

What do you think?

rezzalex commented 1 year ago

Hello @CreasolTech ,

My NAS, where DZ is currently hosted, is in the living room because of HDMI features... that I don't use anymore... So It might be a possibility to move it in the garage where the dombus could be easily connected. But I will then have another physical connection issue : my Zwave and RFplayer module are best placed in the living room, rather than in the garage below...

I am already using my 2 ethernet plugs in my living room, 1 for connecting another ethernet hub, another for passing audio to "zone2 speakers", where I am using special Ethernet cables where only 4 wires are used : image

https://www.touslescables.com/cordon-source-quadriphonie-rj45-H9AL-2102.html

the best would be to pass the dombus as well here... but I don't know how...

CreasolTech commented 1 year ago

RS485 serial connection uses just 2 balanced wires, like ethernet, so 1 pair of the ethernet cable is perfect to connect the Domoticz controller in the living room to many modules in the house. DomBus uses 115200bps connection, that is not high as ethernet 100Mbps, so you can simple connect pieces of cable to reach all modules without taking care about impedance and performance. You can also use normal alarm cable (not twisted pair) in the whole house and it works like a charme. If you have another pair, use it to carry the 13.6V to dombus modules: the idea is to have a 13.6V power supply unit connected to a lead-acid battery, so in case of power outage the dombus network works good. This is useful expecially when using domoticz also as burglar alarm system. In the web page https://www.creasol.it/EVSE you can also find a typical connecting diagram, with power supply for DomBus network and domotic controller.

rezzalex commented 1 year ago

Thank you @CreasolTech ,

I am a bit afraid of "opening" the electrical installation for my solar panels and batteries, to plug the DDS238-2 into it.

Did I understand correctly that :

Would it be enough if I change my current existing DZ "Injection to grid" and "Consumption from the grid" counters to be refreshed every 3 seconds?

image

If not, Could you help me with the physical connection of the 2 energy meter DDS238-2 in my Solar and battery installation :

image

Currently, I don't have any information regarding my batteries and don't take it into consideration for calculating how much solar power I have for my Water-Heater. As said previously, it works fine thanks to the threshold I have set (if the injection to the grid > 1kwat ==> heat on ; If the power consumption from the grid is > 200 watts==> heat off ; the water heater consumes 2K watts).

Also, If the DomBusEVSE grid energy meter is installed after the stationary accumulator/inverter sensor (mains power supply -> battery sensor -> DomBusEVSE energy meter), How can the "Empty battery" status be detected so that it does not take 3x270 watts from the grid instead of taking it from the batteries?

thanks a lot

rezzalex commented 1 year ago

Sorry for the probably silly question: where is the script for managing the "smart" EVSE charge ?

CreasolTech commented 1 year ago

Hi. DomBusEVSE is able to work in two different mode: managed mode => a script in domoticz decides the charging current and set that value. Lua script is available in the github with name script_device_power.lua and config_power.lua Solar or Solar+Grid modes => in this cases the EVSE module works autonomously, setting the charging current based on the Grid power we want to use (0, 25%, 50%, 75%, 100% of the contractual power, 6kW in your case)

Regarding the energy/power meters,

  1. energy meter connected to the electric vehicle is quite useless, but everyone would like to know the charging power and energy, and I believe that you also want to have these statistics
  2. energy meter connected to the grid is useless in case you already have a good power meter with a short refresh time (3-6s): I'm going to create a virtual device in DomBusEVSE so with a very simple script it's possible that when the power value from grid is updated, the virtual kWh device of DomBusEVSE is also updated: in this case it's not needed to install an additional meter. In the next hours I'll try to do that.
rezzalex commented 1 year ago

thanks a lot for everything, it starts to seem to be doable with my poor technical level :-)

I saw how you are defining the Max power in your script, with the 2 thresholds for Italy. Do you know where I can find information about the "new" french electrical counter and its potential tolerance threshold (Linky) ?

In case the EVSE module works autonomously, how do you set the MaxPower ?

While being in DZ managed mode, ça you still use physical buttons ?

Besides that, Any suggestion for the Box to mount everything and for the cable (where to buy it) ?

I also need to think about how I am going to manage priorities between my Heat-Water and the Electric Car..

thanks

CreasolTech commented 1 year ago

Too much questions that you answer by yourself when you'll have a module in your hand and checking the web page at www.creasol.it/EVSE Everything is quite simple. Managed mode: maybe most users will not use this mode. It's much better to use other working modes, leaving that EVSE module find the right charging current to meet the selected Mode and current grid consumption. About priority, you know that if you set EVSE to Mode SOLAR (0W from the grid) or Mode 50% (half contractual power from grid), it will use all needed power to reach that target, so if you decide to start boiler heater or heat pump, the EV charging current will be automatically reduced to meet your target power. It works like static accumulator in your house: you set that export power should be zero, and it feed the accumulator with the power to reach your target. The same for EVSE, with the difference that when there is not enough power, before stopping charging the EV it waits for a STOPTIME to avoid start/stop EV charging continuously. About the cable, you can find it from www.tme.eu or other suppliers. We do not sell cables because heavy (expensive shipping cost). We suggest to put the wallbox modules in a indoor switchbox, possibly near the point where you'll park your car, but also near the main switchbox or solar inverter, if exists, to minimize cable length: use 6mm² (or 10mm²) wires for the mains power supply. Then place a small 10x10cm box where the electric car is parked, indoor or outdoor, connecting by 3x 6mm² (or 10mm²) wires (L,N,PE) plus a shielded 2x0.22mm² cable (standard cable for alarm systems): one wire is connected to the CP terminal block (control pilot), and other wire + shield are connected to PE/GND. The Type-2 or Type-1 cable (with only plug connector to the vehicle) will be connected to the small outdoor box.

rezzalex commented 1 year ago

Thank you. All will fit in 10 cm large ? I would have said 20cm... Not so important...

Where is the type 2 cable PP wire should be plugged ? We can see where the CP wire should be plugged in the module, but not the PP ?

CreasolTech commented 1 year ago

Proximity Pilot: don't care. It's connected internally in the plug connector, but there is not any wire to connect the EVSE because this is used by the OBD to detect

  1. cable current limit (16A, 32A)
  2. cable that is plugged or is being unplugged (to force immediate stop charging while unplugging) https://www.tme.eu/it/details/8801504004440a1/cavi-per-auto-elettriche/harting/
rezzalex commented 1 year ago

Hello @CreasolTech .

Sorry to ask that, but could you help chose between your product and openEVSE ? It seems to be almost same price. Dombus evse is working with your bus, while openEVSE can be connected by wifi t have its own dz plugin as well.

What are the differences ?

Thanks a lot for your time again.

P.s. the dombus evse store webpage seems broken.

CreasolTech commented 1 year ago

Hello, I don't know openEVSE, so I can't compare those products. About DomBusEVSE, you have to install the plugin (you can find it in python plugin manager, or download from github), protect the charging system by a type-B RCCB and add an external contactor to connect mains power supply to the vehicle. It's recommended to add an energy meter to get nice graphs and statistics about charging sessions. If you already have an energy meter connected to the electricity grid, you don't need to add another one: Domoticz can send the power information to DomBusEVSE so the module can regulate the charging power safely without adding extra hardware. Thanks for informing about broken store pages.

rezzalex commented 1 year ago

Hello @CreasolTech .

Did I understand correctly that you check the EVSE charging power every 6 secs, but in case there is not enough power available at that moment, (regarding parameters preset) you wait 90 secs before reducing or cutting off the EVSE charge ?

Also, for " Solar mode" only, how do you really ensure that no power from grid is used by the EVSE ? I thought the only possibility was to tell the RV to use X% of the max power. Is that X number can be any number or do you have to stick to some predefined Thresholds (10, 15 , 25 % for instance... ) ?

Thanks again

CreasolTech commented 1 year ago

If there is not enough power, charging current is reduced to the minimum (6A = 900-1200W) and, by default, EVSE wait for 90s (you can change this parameter) before terminating the charging session if available power from the solar or grid is too low.

In solar mode, the system will use 0Watt from the grid: only energy from solar. To do this I don't need to know how much the photovoltaic is producing, but I only need to know the power exported to the grid. When you charge in this mode you can see that exported power is always between 0W and 200W: only very short peaks outside this range, due to the latency of the energy meter (read every 3s) and On Board Charger (up to 6s to change the power according to EVSE).

rezzalex commented 1 year ago

Thank you.

Probably another silly question, but Ii need to be sure :

If my DZ is down / not working , for a long period, and that I did not install any dedicated physical power meter for monitoring the grid import / export, directly connect to the DombusEVSE, is the Dombus Evse would be so blind that it won't work at all ? Or only some mode ?

CreasolTech commented 1 year ago

DomBusEVSE needs to know the power from grid. If you already have a power meter connected to Domoticz, but not to the DomBusEVSE, and Domoticz does not work, DomBusEVSE will not start charging at all because don't know how much power can be fed to the vehicle without causing an overload.

rezzalex commented 1 year ago

I think I will finally take the whole thing with the 2 dedicated physical power meter, so that the DombusEVSE can work autonomously if I have a problem with my DZ installation. Is there any private channel we could use to continue discussing this? If this is OK for you, I would like to submit to you my own "real" diagram (based on my home electrical board photos) I intend to use.

thank you

CreasolTech commented 1 year ago

Contact me by Telegram, https://t.me/CreasolTech