Skip to content

Instantly share code, notes, and snippets.

@dglaude
Created July 7, 2024 08:08
Show Gist options
  • Save dglaude/eacdf1d4ccfd2bf7417ef1b75ba2ea4b to your computer and use it in GitHub Desktop.
Save dglaude/eacdf1d4ccfd2bf7417ef1b75ba2ea4b to your computer and use it in GitHub Desktop.
Working config of EVCC for Tesla with BLE HTTP Proxy and Teslamate
# Setup and IP addressing:
# 1) EVCC run on an NUC at 192.168.1.157 :7070
# 2) HomeWizard P1 meter reader at 192.168.1.98 :80
# 3) Shelly Pro EM - 50 as PV meter at 192.168.1.191 :80
# 4) TeslaWallConnector as Wall Charger at 192.168.1.42 :80
# 5) wimaha/TeslaBleHttpProxy as BLE proxy to control the Tesla at 192.168.1.157 :8080
# 6) teslamate-org/teslamate with mqtt broker at 192.168.1.35 :1883
network:
schema: http
host: 192.168.1.157
port: 7070
interval: 30s
# log settings
# Possible values: fatal error warn info debug trace
log: info
levels:
site: info
lp-1: info
lp-2: info
cache: info
db: info
tesla: info
# meter definitions
meters:
- name: my_grid
type: template
template: homewizard
usage: grid
host: 192.168.1.98
- name: my_pv ### inspired by https://github.com/evcc-io/evcc/discussions/12385
type: custom
power:
source: http
uri: http://192.168.1.191/rpc/Shelly.GetStatus
jq: .["em1:1"].act_power
energy:
source: http
uri: http://192.168.1.191/rpc/Shelly.GetStatus
jq: .["em1data:1"].total_act_energy
scale: 0.001
# charger definitions
chargers:
- name: my_charger
type: template
template: twc3
host: 192.168.1.42 # TeslaWallConnector_B6AB88.localdomain
# vehicle definitions
vehicles:
- name: my_car # reference to standard vehicle
title: Tesla_Model_Y # Will be displayed in the user interface (optional)
type: custom
capacity: 60
chargeenable:
source: http
uri: "http://192.168.1.157:8080/api/1/vehicles/put_Tesla_VIN_here/command/{{if .chargeenable}}charge_start{{else}}charge_stop{{end}}"
method: POST
body: ""
maxcurrent: # set charger max current (A)
source: http
uri: http://192.168.1.157:8080/api/1/vehicles/put_Tesla_VIN_here/command/set_charging_amps
method: POST
body: '{"charging_amps": "{{.maxcurrent}}"}'
wakeup: # vehicle wake up command
source: http
uri: http://192.168.1.157:8080/api/1/vehicles/put_Tesla_VIN_here/command/wake_up
method: POST
body: ""
soc:
source: mqtt
topic: teslamate/cars/1/battery_level
timeout: 60s
range:
source: mqtt
topic: teslamate/cars/1/est_battery_range_km
timeout: 60s
status:
source: combined
plugged:
source: mqtt
topic: teslamate/cars/1/plugged_in
timeout: 60s
charging:
source: mqtt
topic: teslamate/cars/1/charging_state
timeout: 60s
# site describes the EVU connection, PV and home battery
site:
title: Home # display name for UI
meters:
grid: my_grid # HomeWizard P1
pv: my_pv # Shelly EM-50
residualPower: 0 # additional household usage margin
maxGridSupplyWhileBatteryCharging: 0 # ignore battery charging if AC consumption is above this value
# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
- title: Garage # display name for UI
charger: my_charger # charger reference
vehicle: my_car # reference to standard vehicle
mode: pv # charge mode (off, now, minpv, pv)
# tariffs are the fixed or variable tariffs
tariffs:
currency: EUR # three letter ISO-4217 currency code (default EUR)
grid:
# either static grid price (or price zones)
type: fixed
price: 0.121 # EUR/kWh
zones:
- days: Mon-Fri
hours: 0-7
price: 0.097 # EUR/kWh
- days: Mon-Fri
hours: 22-0
price: 0.097 # EUR/kWh
- days: Sat,Sun
price: 0.097 # EUR/kWh
feedin:
# rate for feeding excess (pv) energy to the grid
type: fixed
price: 0.0212 # EUR/kWh
co2:
# mqtt message broker
mqtt:
broker: 192.168.1.35:1883
# broker: localhost:1883
# topic: evcc # root topic for publishing, set empty to disable
# user:
# password:
### sensor:
### - name: Vehicle Charge Power
### icon: mdi:ev-station
### state_topic: "evcc/loadpoints/1/chargePower"
### unit_of_measurement: W
# influx database
influx:
# eebus credentials
eebus:
# push messages
messaging:
events:
start: # charge start event
title: Charge started
msg: Started charging in "${mode}" mode
stop: # charge stop event
title: Charge finished
msg: Finished charging ${chargedEnergy:%.1fk}kWh in ${chargeDuration}.
connect: # vehicle connect event
title: Car connected
msg: "Car connected at ${pvPower:%.1fk}kW PV"
disconnect: # vehicle connected event
title: Car disconnected
msg: Car disconnected after ${connectedDuration}
soc: # vehicle soc update event
title: Soc updated
msg: Battery charged to ${vehicleSoc:%.0f}%
guest: # vehicle could not be identified
title: Unknown vehicle
msg: Unknown vehicle, guest connected?
services:
# - type: pushover
# app: # app id
# recipients:
# - # list of recipient ids
# - type: telegram
# token: # bot id
# chats:
# - # list of chat ids
# - type: email
# uri: smtp://<user>:<password>@<host>:<port>/?fromAddress=<from>&toAddresses=<to>
# - type: ntfy
# uri: https://<host>/<topics>
# priority: <priority>
# tags: <tags>
@dglaude
Copy link
Author

dglaude commented Jul 8, 2024

This configuration is not in use anymore... I moved the TeslaBleHttpProxy from the NUC to the Pi4.

@Lenart12
Copy link

Lenart12 commented Jan 6, 2025

Do you have any overheating issuses on bluetooth with the pi?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment