ev_smart_charging
ev_smart_charging copied to clipboard
My ID4 not starting with Charging
Version of the custom_component
Version x.x.x
Configuration
Describe your configuration here.
Describe the bug
A clear and concise description of what the bug is.
Debug log
Add your logs here.
I'm new with this intergration.
After installation of the integration my ID4 not starting with charging:
ID4 integration
My Settings:
If I put the charge button of My ID4
I get the following error message:
Can you tell me what I doing wrong?
Best Regards, Ron
I am struggling with the same on my ID.4
I do not have VW, but can you try with automation method? Leave charger configuration entity empty on integration config, and try with two automations below.
Hope it works...
Start charging automation:
alias: EV Smart Charging - Start
description: ""
mode: single
trigger:
- platform: state
entity_id:
- sensor.ev_smart_charging_charging
from: "off"
to: "on"
condition: []
action:
- service: button.press
target:
entity_id: button.id4_start_charging
Stop charging automation:
alias: EV Smart Charging - Stop
description: ""
mode: single
trigger:
- platform: state
entity_id:
- sensor.ev_smart_charging_charging
from: "on"
to: "off"
condition: []
action:
- service: button.press
target:
entity_id: button.id4_stop_charging
@janss028 and @Obelixje, did the suggestion about with automations help?
In general, it is however preferable to control charging via the charger instead of the car. So if you have a charger that can be controlled by HA, then I would very much recommend to do that.
@jonasbkarlsson , @Obelixje my charger is not controlled by is also not possible to controll it with HA. Yesterday evening I did a small test with the solution of @Obelixje and I think this will work. This weekend I will do e new test and will inform you.
Thank you in advance
@jonasbkarlsson What do you recommend if the charger can't work with HA. I think my ID4 should initiate charging?
As you can see below, the status is charging but my car is not connected
If the charging is controlled via the car, then the recommendation is to make an automation that controls the switch.ev_smart_charging_ev_connected
, provinding information to the integration that the car is connected to the charger.
The easiest way to do that is, once again, is to get information from the charger. See this example.
Now, if that is not posssible, then I guess you need to start being a bit creative.
- An automation that use the car's position?
- And as last resort, just manually switch the
switch.ev_smart_charging_ev_connected
on and off.
Do you have sensor sensor.id4_plug_connection_state? Or something like that? Could it be used?
@janneho Yes, I have. Do you have it working and if yes, can you help me?
best regards, Ron
Can you check state of sensor.id4_plug_connection_state when charger is connected, and when it is unplugged from car? That could propably used for information for integration.
For automation you propably should add car location geofence to yout home. Without that car/integration does not know when you charge in fast charger, and stops charging on schedule.
HI @janneho
The status is as below:
connected
disconnected
I create the automation below:
alias: EV Smart Charging - EV connected description: "" trigger:
- platform: state
entity_id:
- sensor.id4_plug_connection_state condition:
- condition: device device_id: e0f08d93788f2eedae712557a654494c domain: device_tracker entity_id: device_tracker.id4_tracker type: is_home action:
- if:
- condition: state entity_id: sensor.id4_plug_connection_state state: connected then:
- service: switch.turn_on data: {} target: entity_id: switch.ev_smart_charging_ev_connected else:
- if:
- condition: state entity_id: sensor.id4_plug_connection_state state: disconnected then:
- service: switch.turn_off data: {} target: entity_id: switch.ev_smart_charging_ev_connected mode: single
and put it in the configuration below:
Is this coreect?
Do I need also the follow automations:
alias: EV Smart Charging - Start description: "" mode: single trigger:
- platform: state
entity_id:
- sensor.ev_smart_charging_charging from: "off" to: "on" condition: [] action:
- service: button.press target: entity_id: button.id4_start_charging
and
alias: EV Smart Charging - Stop description: "" mode: single trigger:
- platform: state
entity_id:
- sensor.ev_smart_charging_charging from: "on" to: "off" condition: [] action:
- service: button.press target: entity_id: button.id4_stop_charging
Thank you for your help
Leave charger control switch empty in configuration. You need all 3 automations. Two of them starts and stops charging in car when integration says so. Third automation tells that car is home, and charger is plugged in to car. Automation seems about right. Make sure that charging is allowed charger is unplugged at home.
I do not have volkswagen, so no guarantees on this. Report if all is ok, or not.
Hi @janneho
It is not possible to remove in setting:
If you remove it and save it, it is back after open de configuration again.
Can you add one space and nothing more?
That helps :)
The manual start / stop works fine. Now wait till tomorrow to see if everything works fine.
I will give you an update.
Hi, The car is not starting with charging.
It is connected and at home. I’m using the automation below:
alias: EV Smart Charging - EV connected description: "" trigger:
- platform: state
entity_id:
- sensor.id4_plug_connection_state condition:
- condition: device device_id: e0f08d93788f2eedae712557a654494c domain: device_tracker entity_id: device_tracker.id4_tracker type: is_home action:
- if:
- condition: state entity_id: sensor.id4_plug_connection_state state: connected then:
- service: switch.turn_on data: {} target: entity_id: switch.ev_smart_charging_ev_connected else:
- if:
- condition: state entity_id: sensor.id4_plug_connection_state state: Available then:
- service: switch.turn_off data: {} target: entity_id: switch.ev_smart_charging_ev_connected mode: single
Manual I can start and stop charging.
Do you know what is wrong?
What does it look like in settings -> Devices and services -> ev smart charging. Mine is like this
Is ev connected on?
@janneho
below my overview
I can not think why it should not work. Below is from documentation. If manual start and stop works, i do not know why scheduled charging is not working.
Verifying the configuration
To verify that the integration is able to control the charging, go to Settings -> Devices & Services -> Integrations -> EV Smart Charging -> 1 device -> Controls.
Connect the EV to the charger.
PRESS the Manually start charging.
Check that charging is started.
PRESS the Manually stop charging.
Check that charging is stopped.
PRESS the Manually start charging.
Check that charging is started.
If the above works, the integration is able to control the charging.
Hi @janneho
Charging works fine. Thank you for your help.
I have a another question. As example the care should start with charging at 14.00. If I connect my car at the charger at 10.00 it start already with charging an I must it switch off manual with the STOP charging button. Charging stops and at 14.00 it starts with charging. How can I change that charging not start after I connect the cable but start with charging if the integration says start with charging?
Thanks in advance. Ron
Try to add charge stop in EV connected script, that is what I have done. Something like this:
alias: EV Smart Charging - EV connected
description: ""
trigger:
- platform: state
entity_id:
- sensor.id4_plug_connection_state
condition:
- condition: device
device_id: e0f08d93788f2eedae712557a654494c
domain: device_tracker
entity_id: device_tracker.id4_tracker
type: is_home
action:
- if:
- condition: state
entity_id: sensor.id4_plug_connection_state
state: connected
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.ev_smart_charging_ev_connected
- service: button.press
target:
entity_id: button.id4_stop_charging
else:
- if:
condition: state
entity_id: sensor.id4_plug_connection_state
state: Available
then:
service: switch.turn_off
data: {}
target:
entity_id: switch.ev_smart_charging_ev_connected
mode: single
:wave:
I experience similar issues for my Tesla Model 3.
What happens is that the car goes to deep sleep, and makes all the entities unavailable, which in turn makes EV Smart think that the car is not connected/available at all and changes to "No charging planned".
I'm experimenting with waking up the car now if
charging is planned, by manually pressing the wake up button that the car have (in another automation). I already have the recommended automation in place when connecting and disconnecting the car, but that doesn't help since all the entities are gone anyway.
My wifes VW e-UP! works without any issues at all on the same settings. Until then, does anyone have any idea how to fix this in the best possible way?
I will keep this issue updated with my progress.
@enoch85, is going to deep sleep and make all the entities unavailable to common behaviour for all Teslas? If so, then it sounds like a major problem. Strange that I haven't heard (much) about it.
For me, it would have been better if the Tesla integration kept the last know values instead of making the entities unavailable...
@jonasbkarlsson
is going to deep sleep and make all the entities unavailable to common behaviour for all Teslas?
I don't know, but I find the car to be very energy conserving, only loosing like 1% over several days if I don't touch it. So I guess, yes, it's a problem. The car will wake up if you plug a charge cable in it (or start charging), but with the entities unavailable it doesn't matter since charging won't start anyway. Would the setting "Keep charger on" help me here?
Right now I have this automation (which worked perfectly fine last night):
alias: Vakna Tesla!
description: Dags att ladda. :)
trigger:
- platform: time
at: "23:00:00"
condition:
- condition: state
entity_id: sensor.ev_smart_charging_charging
attribute: Charging is planned
state: true
action:
- device_id: 8fc8504659b7162e4270b730466060f4
domain: button
entity_id: 243c1fb8746cb0cc34c5038f09e81cb7
type: press
- delay:
hours: 3
minutes: 0
seconds: 0
milliseconds: 0
enabled: true
- device_id: 8fc8504659b7162e4270b730466060f4
domain: button
entity_id: 243c1fb8746cb0cc34c5038f09e81cb7
type: press
enabled: true
mode: single
Usually it goes to sleep around 00:00 if I leave it with charge plugged at around 17:00-18:00, hence the time trigger at 23:00 which will press the wake up button and then do the same thing 3 hours later (charging usually occurs between 01:00-04:00.
For me, it would have been better if the Tesla integration kept the last know values instead of making the entities unavailable...
Agreed. I'm using this integration, so maybe it's time for an issue report? :)
It charged last night, and now I have this:
Maybe if you could save the data in your integration instead, I don't know what's best?
If this is the case with the entities unavailable it doesn't matter since charging won't start anyway
, then it doesn't seem possible for this integration to fix this by remembering the last available data. And a change to the Tesla integration will not help either. It seems like the solution is to make sure the car does not go into deep sleep.
with the entities unavailable it doesn't matter since charging won't start anyway
You know the code. What I was thinking was maybe saving the state of planned charge, and try to charge even without entities available. Or am I not thinking clear?
Maybe a switch that could be called like "Force try charge" or something. That could later be used in an automation that puts the switch on, during certain conditions set by the user (me). Like, if I know the car is home, or my cellphone is home, or that the car actually is plugged in (can be checked though Easee) or something else, then I could try to force charge, even if the entities of the car is unavailable. Just brainstorming here.
The main benefit being that I don't have to wake up the car until the charging is actually happening (saving a few Wh).
Made an issue now anyway: https://github.com/alandtse/tesla/issues/757
You know the code. What I was thinking was maybe saving the state of planned charge, and try to charge even without entities available. Or am I not thinking clear?
But I thought that when you wrote "with the entities unavailable it doesn't matter since charging won't start anyway" that it meant that it would not be possible to start charging if the car is in deep sleep. Maybe you meant something else.
If you let the car go into deep sleep, and then press button.ev_smart_charging_manually_start_charging
, will charging start?
If you let the car go into deep sleep, and then press button.ev_smart_charging_manually_start_charging, will charging start?
I have to test that.
It becomes like this:
If I press the manual start button, it wakes up again it seems. Debugging this from two directions now. Seems to happen after reboot of HAOS.
Previous solutions involved going to the car and physically detach and insert the charging cable.