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

Charger template for tesla-ble #18194

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skrul
Copy link

@skrul skrul commented Jan 12, 2025

This change compliments the tesla-ble vehicle template (see #17866) by interfacing with TeslaBleHttpProxy to control charging. This is useful for folks that are using TeslaBleHttpProxy to communicate with their Tesla but who do not have the TWC (wall charger) but rather use the UMC (mobile charger).

Several of the field definitions are the same as the tesla-ble vehicle template since there seems to be a bit of overlap between the vehicle and charger devices.

An example config (has the same fields as the tesla-ble vehicle template):

chargers:
  - name: my_charger
    type: template
    template: tesla-ble
    vin: 5YJ3E1Exxxxxxxxxx
    url: http://10.0.0.104

en: Port of the Tesla BLE HTTP Proxy
render: |
type: custom
power:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andig I noticed that chargers can take a power getter so I'm trying this since TeslaBleHttpProxy provides voltage and amps. However, it works fine without this (I assume evcc just estimates this but I haven't found that code yet). Curious if you think it is worth keeping?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunno. Worth keeping it its better than the estimate.

@andig andig added the devices Specific device support label Jan 13, 2025
source: http
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
method: GET
jq: (.response.response.charge_state.charging_state == "Charging"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wont work. Enabled is not charging. Enabled is „allowed to charge“.

source: http
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state
method: GET
jq: .response.response.charge_state.charger_voltage * .response.response.charge_state.charger_actual_current
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for 1 phase. You should check if 1 oder 3 phases are used.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wimaha should I be multiplying by charger_phases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devices Specific device support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants