-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implement TWC vitals API #77
Comments
Via ble we don't have the current and voltage for each phase. We only have the sum. This is maybe no issue for the use case. |
@wimaha thanks! I think it could work although I'm not sure if it is the right thing to do. Alternatively I could just contribute my charger config to evcc as a template. One advantage to using the built-in TWC support is that it would make fewer requests to the proxy -- when using the custom charger config, evcc will query the proxy separately for each field, where the TWC plug in would just make one for the various fields. This excessive querying of the proxy could be helped with adding a short cache inside the proxy though. |
Oh I see there is already work being done on a cache here #80 fantastic! |
Just my 2 cents since I'm very interested in this topic. I've been using twc3teslamate so far, to use my mobile charger with EVCC. From my limited understanding, it uses data from teslamate to emulate a TWC. Having to rely on another service increases the risk of issues, so it'd be best to replicate this functionality using TeslaBleHttpProxy ! |
@MrBLJ consider using my custom charger definition for your evcc config https://github.com/skrul/evcc-config/blob/main/evcc.yaml.template#L78 -- this has worked pretty well for me so far. I may just contribute this to evcc rathe than create the vitals API. Please let me know if this is helpful! |
Thanks a lot for sharing. I've implemented this on my end. I see that you are currently discussing about turning this into an actual EVCC template, this would be great ! Let me know if I can be of any help, for example if you need logs or data. |
I've been using your charger definition for a few days now. One issue : my cars do not go to sleep anymore. I have a 3 and a Y. I switched the 3 at first using your charger config :
(all fields where adapted). The charger works fine, no issues with it. Seeing that the model 3 would not go to sleep, I reverted back to the original config (using data from Teslamate) which solved the issue. I thought at first it could be vehicle related, so I switched the charger for the Y, and got the same result. So somehow, on my end, this causes trouble. I have no other 3rd party services that connect to my car (no widget, no app on my watch or whatever). I can't find a way to determine what is causing my car to stay awake, I'll look into that. |
Since evcc must poll some status values, the car will be always await with this config. I think it is possible to change that with the right configuration. Unfortunately I can look into this from mid February because I’m on a long vacation trip right know. |
@MrBLJ
|
For what it's worth, here's my current config. Works well, both cars go to sleep (as confirmed by teslamate and the fact that I have no longer vampire drain on the battery) : # ------------------------------------------------------------------------------
# 8. Vehicle Definitions
# Documentation: https://docs.evcc.io/en/docs/reference/configuration/vehicles
# Template : https://docs.evcc.io/en/docs/devices/vehicles#tesla-ble
# ------------------------------------------------------------------------------
vehicles:
# Model Y --------------------------------------------------------------------
- name: modelY # Reference used in the config
type: template # EVCC interface type
template: tesla-ble # EVCC template reference
title: Chonk # Name displayed in the UI
capacity: 57 # Battery capacity
vin: XXXXXXXXXXXXXXXXX # VIN number
url: http://192.168.20.149 # URL of the Tesla BLE HTTP Proxy
port: 8080 # Port of the Tesla BLE HTTP Proxy
# Model 3 --------------------------------------------------------------------
- name: model3 # Reference used in the config
type: template # EVCC interface type
template: tesla-ble # EVCC template reference
title: Titine # Name displayed in the UI
capacity: 57 # Battery capacity
vin: XXXXXXXXXXXXXXXXX # VIN number
url: http://192.168.20.149 # URL of the Tesla BLE HTTP Proxy
port: 8080 # Port of the Tesla BLE HTTP Proxy
# ------------------------------------------------------------------------------
# 6. Charger Definitions
# Documentation:https://docs.evcc.io/en/docs/reference/configuration/chargers
# See also : https://github.com/Haveacry/twc3teslamate
# ------------------------------------------------------------------------------
chargers:
# Model Y charger ------------------------------------------------------------
- name: modelY_charger # Reference used in the config
type: template # EVCC interface type
template: twc3 # EVCC template reference
host: 192.168.20.149:8002 # IP address
# Model 3 charger ------------------------------------------------------------
- name: model3_charger # Reference used in the config
type: template # EVCC interface type
template: twc3 # EVCC template reference
host: 192.168.20.149:8001 # IP address The charger defined using |
@MrBLJ |
Check the url I specified in my config : This is a pretty nice tool. I have two containers running, one for each car, on different ports. This emulates two tesla wall chargers, although I'm using a mobile connector and a dumb wallbox. |
I've been going down this road over on the |
it works! Thank you very much! |
That's the current concern, but so far it looks like Teslamate could operate with the new fleet API pricing, using the base plan. Guess we'll see. |
evcc now has direct support for configuring a tesla vehicle using TeslaBleHttpProxy (thanks @wimaha!), but those the use the mobile charger (rather than a TWC) still need to configure a custom charger in evcc that uses the TeslaBleHttpProxy endpoints (see my config here).
I was wondering if TeslaBleHttpProxy has enough information in order to implement the TWC vitals API? If so, mobile charger users could use the built in evcc TWC charger support, but configure it to talk to TeslaBleHttpProxy instead of a real TWC. Much of the functionality of the built-in TWC support delegates to the vehicle, but it does make use of the following fields from the vitals response:
Unfortunately I don't have a TWC so I don't know if these fields map to what is available through TeslaBleHttpProxy. It seems like this should be possible since I am able to create a custom charger in evcc that uses the TeslaBleHttpProxy endpoints.
@wimaha if the mappings exist, I can do the implementation if you think this would be a useful addition to the project!
The text was updated successfully, but these errors were encountered: