-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
template: tesla-ble | ||
products: | ||
- description: | ||
generic: Tesla BLE | ||
group: generic | ||
requirements: | ||
description: | ||
de: Open Source Tesla BLE HTTP Proxy https://github.com/wimaha/TeslaBleHttpProxy | ||
en: Open Source Tesla BLE HTTP Proxy https://github.com/wimaha/TeslaBleHttpProxy | ||
params: | ||
- preset: vehicle-common | ||
- name: vin | ||
required: true | ||
example: W... | ||
help: | ||
de: Erforderlich für BLE-Verbindung | ||
en: Required for BLE connection | ||
- name: url | ||
required: true | ||
example: http://192.168.178.27 | ||
help: | ||
de: URL des Tesla BLE HTTP Proxy | ||
en: URL of the Tesla BLE HTTP Proxy | ||
- name: port | ||
example: 8080 | ||
default: 8080 | ||
help: | ||
de: Port des Tesla BLE HTTP Proxy | ||
en: Port of the Tesla BLE HTTP Proxy | ||
render: | | ||
type: custom | ||
power: | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @wimaha should I be multiplying by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Friendly ping @wimaha There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think if charger_phases is >= 2 you should multiply by 3. this way old Tesla are also supported. |
||
timeout: 30s | ||
status: | ||
source: http | ||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state | ||
method: GET | ||
jq: (if (.response.response.charge_state.charging_state == "Charging") then "C" | ||
elif (.response.response.charge_state.charging_state == "Stopped") then "B" | ||
elif (.response.response.charge_state.charging_state == "NoPower") then "B" | ||
elif (.response.response.charge_state.charging_state == "Complete") then "B" | ||
else "A" end) | ||
timeout: 30s | ||
enabled: | ||
source: http | ||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/vehicle_data?endpoints=charge_state | ||
method: GET | ||
jq: (.response.response.charge_state.charging_state == "Charging" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This wont work. Enabled is not charging. Enabled is „allowed to charge“. |
||
and .response.response.charge_state.charger_power > 0) | ||
timeout: 30s | ||
enable: | ||
source: http | ||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/command/{{`{{ if .chargeenable }}charge_start{{ else }}charge_stop{{ end }}`}} | ||
method: POST | ||
maxcurrent: | ||
source: http | ||
uri: {{ .url }}:{{ .port }}/api/1/vehicles/{{ .vin }}/command/set_charging_amps | ||
method: POST | ||
body: '{"charging_amps": ${maxcurrent}}' |
There was a problem hiding this comment.
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 sinceTeslaBleHttpProxy
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?There was a problem hiding this comment.
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.