Open kimme1024 opened 1 year ago
Please also consider including the script "Running instance count" in your control GUI to give you instant feedback that the script has been triggered. 1=script is running, 0=script not running.
https://github.com/flashg1/TeslaSolarCharger#dashboard-tesla-solar-charger-control
If it is any consolation, I use the automation to charge my car everyday and have not encountered any issues.
There are a few things you need to be aware of,
This showed the charging current was not set on startup, ie. charger was already turned on and charging at whatever current before you started the script. This is to allow the "Charge from grid" feature. The script will only change the current when there is a change in the available solar electricity.
Please also consider including the script "Running instance count" in your control GUI to give you instant feedback that the script has been triggered. 1=script is running, 0=script not running.
https://github.com/flashg1/TeslaSolarCharger#dashboard-tesla-solar-charger-control
- entity: automation.[YourTeslaName]_solar_charger_automation
- type: attribute entity: automation.[YourTeslaName]_solar_charger_automation attribute: current name: Running instance count
- type: attribute entity: automation.[YourTeslaName]_solar_charger_automation attribute: last_triggered name: Last triggered
Interesting! Didn't know that! I've made an automation that notifies me when it changes to zero... Maybe I'd better make an automation that when it changes to zero during daylight, it automatically triggers a refresh from the Tesla integration and restarts the automation...
EDIT:
Made the following automation that should keep the script alive. Feel free to check it for errors!
alias: Tesla Charger Restart & Notification
description: ""
trigger:
- platform: numeric_state
entity_id: automation.tesla_solar_charger
attribute: current
below: 1
condition:
- condition: sun
before: sunset
before_offset: "-01:01:00"
after: sunrise
after_offset: "+01:01:00"
action:
- service: button.press
data: {}
target:
entity_id: button.wattson_force_data_update
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- service: automation.trigger
data:
skip_condition: true
target:
entity_id: automation.tesla_solar_charger
- service: notify.mobile_app_iphone_kim
data:
message: >-
Script is gestopt met werken. Er werd een poging gedaan om te
herstarten.
title: Tesla Solar Charger
mode: single
This showed the charging current was not set on startup, ie. charger was already turned on and charging at whatever current before you started the script. This is to allow the "Charge from grid" feature. The script will only change the current when there is a change in the available solar electricity.
ah okay... I think I know what went wrong then... To solve the issue where the script stopped as in https://github.com/flashg1/TeslaSolarCharger/issues/8, I made an automation that starts the script again 5min after the original script starts because when it failed, it always did after 114 seconds. When the script didn't stop, my automation simply didn't do anything (I assumed) as it stopped with an error saying that the script was already running. This might have caused the issue today, however it's weird that it didn't do the same everyday.
This morning somehow the script stopped adapting the amps. In the log below you can see that the script changed the amps at 10:15, did a couple of refreshes afterwards but nothing past that until I restarted the automation at 11:46.
After restarting the automation I now noticed that the car is charging at 13A while the limit in de script is set to 12A (due to the issue mentioned in https://github.com/flashg1/TeslaSolarCharger/issues/4.
In 2 weeks I'm getting my MCU1 replaced by the newer MCU2. After that we can rule out the fact that the issue lies there.