You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tesla_ble_mqtt/DOCS.md
+39-25Lines changed: 39 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,42 +7,56 @@ The advantage of the MQTT setup is that it can run on a device separate to your
7
7
8
8
# Installation and setup
9
9
10
-
If you have already created a key pair that you want to reuse, place the private key in `/share/tesla_ble_mqtt`
10
+
If you have already created a key pair that you want to reuse, place the private key in `/share/tesla_ble_mqtt`.
11
+
The key must have the following naming scheme: `/share/tesla_ble_mqtt/VIN_private.pem` and `/share/tesla_ble_mqtt/VIN_public.pem` where `VIN` is your car VIN.
12
+
/!\ To access this repository you will need access to the host filesystem and not only access to the config folder.
11
13
12
-
## 1.1 HA Add-on: install below and configure
14
+
## Install the addon and configure
13
15
14
16
[](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https://github.com/tesla-local-control/tesla-local-control-addon)
15
17
18
+
#### Install the addon directly from Home Assistant. Add the custom repository: `https://github.com/tesla-local-control/tesla-local-control-addon`
16
19
17
-
You will need to provide:
18
-
- vin_list : VIN single or multiple separated by either of | , or space; Required
19
-
- ble_mac_list : BLE MAC Addr list single or multiple separated by a | (pipe); Optional for car presence detection
20
-
- presence_detection_loop_delay: The delay between each time the process checks for the presence of your car(s)
21
-
- presence_detection_ttl : TTL in seconds when car is considered gone after last received BLE advertisement; 0 to disable detection
22
-
- mqtt_server : Hostname or IP of your MQTT server; Default 127.0.0.1
- ble_cmd_retry_delay : Delay to retry sending a command to the car over BLE; Default 5
27
-
- Start the add-on, check the logs for anything suspecious.
20
+
#### Fill in the required settings:
21
+
- vin_list: single VIN or list of VINs separated by either of | , or space; Required
22
+
- mqtt_server: Hostname or IP of your MQTT server; Default 127.0.0.1
23
+
- mqtt_port: MQTT service port; Default 1883
24
+
- mqtt_useranme: MQTT Username; Default anonymous
25
+
- mqtt_password: MQTT Password
26
+
- debug: Activate if you are having issues, you will most likely not need it; Default off
28
27
29
-
ATTENTION: If you have multiple cars and require presence detection, the cars' position in vin_list vin{n} must match the position in the ble_mac_list. In other words, the BLE MAC Addr in the 2nd position must match the same car's VIN in the 2nd position of the tesla_vin_list.
28
+
The module will periodically scan for your car presence by default. You can use the optional settings to adjust the behaviour:
29
+
- presence_detection_ttl: TTL in seconds when car is considered gone after last received BLE advertisement; **0 to disable presece detection**
30
+
- presence_detection_loop_delay: delay between each presence check with BLE scanning
31
+
Other optional settings:
32
+
- ble_cmd_retry_delay: Delay to retry sending a command to the car over BLE; Default 5. Don't go too far below this value.
30
33
31
-
## 1.2 For the standalone Docker version please see https://github.com/tesla-local-control/tesla_ble_mqtt_docker
34
+
#### Start the add-on, check the logs for anything suspecious.
35
+
Check the apparition of new devices called Tesla_BLE_VIN (one per VIN) that should have appeared. Click it to view the the associated entities in path: Settings -> Devices & Services -> Devices (tab) -> Tesla_BLE_MQTT
32
36
33
-
## 2.0 Check in HA for new devices named Tesla_BLE_MQTT_VIN ???
37
+
## Pair key with your car (if not already done)
34
38
35
-
- A new device called Tesla_BLE_MQTT should have automatically appeared. Click it to view the the associated entities.
36
-
- If this is the first time you have run the container, press the 'Generate Keys' button in HA (Settings -> Devices & Services -> Devices (tab) -> Tesla_BLE_MQTT). This will generate the public and private keys as per Shanker's blog
37
-
-**Wake up your car using the Tesla App**. Then press the 'Deploy Key' button. This will deploy the public key to the car. You will then need to access your car and use a Key Card to accept the public key into the car (see the blog for screenshots)
38
-
- If the command succeed to initiate the pairing with the car, the following will show in the add-on logs: `Sent add-key request to [YOUR_CAR_VIN]. Confirm by tapping NFC card on center console.` Go in your car and tap your NFC card on the center console and on the car's screen `Phone Key pairing request`, confirm your accept the pairing
39
-
- If the command failed, the following error will show up: `Error: failed to find BLE beacon for [YOUR_CAR_VIN]. (xxx): can’t scan: context deadline exceeded`. You car might just be too far from your Bluetooth adapter. The command will be tried in case bluetooth is weak or unavailable...
40
-
- Then you are ready. Press the other button entities to send various commands... You can use the relevant service calls in HA automations if you wish
39
+
If this is the first time you run the addon, you will need to pair with your car. For this:
40
+
1. Ensure your car is not too far from your HA system (within BLE reach)
41
+
2. Press the 'Generate Keys' button in HA. This will generate the public and private keys
42
+
3. Go inside your car and authenticate by placing your key card on the center console
43
+
4. In HA press the button 'Deploy Key' (you can use the companion app). This will deploy the public key to the car.
44
+
If the command succeeds, the following will show in the add-on logs: `KEY DELIVERED; IN YOUR CAR, CHECK THE CAR's CENTRAL SCREEN AND ACCEPT THE KEY USING YOUR NFC CARD`
45
+
5. You will then see a message on screen to accept the new key. Press accept.
46
+
If the command succeeds, the following will show in the add-on logs: `acceptKeyConfirmationLoop; congratulation, the public key has been accepted vin:$vin`
41
47
48
+
If any of points 4 or 5 fails, you will see these messages in the logs: `Could not send the key; Is the car awake and sufficiently close to the bluetooth adapter?` or other relevant messages. Your car might just be too far from your Bluetooth adapter. The command will be tried in case bluetooth is weak or unavailable...
49
+
50
+
## Explore
51
+
52
+
Then you are ready. Press the other button entities to send various commands... You can use the relevant service calls in HA automations if you wish.
53
+
Be careful, as for now the car is not sending back state to the HA entities.
54
+
55
+
This addon does not behave like the "Tesla Custom Integration". For example, when you are sending a command to your car with your phone, this entity Tesla_BLE_VIN will not update. It is currently not possible.
Please use [tesla-local-control-addon Issues](https://github.com/tesla-local-control/tesla-local-control-addon/issues)
61
+
62
+
If you have already identified a bug in the code, please see [tesla_ble_mqtt_core Issues](https://github.com/tesla-local-control/tesla_ble_mqtt_core/issues)
Copy file name to clipboardExpand all lines: tesla_ble_mqtt/translations/en.yaml
-3Lines changed: 0 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,6 @@ configuration:
2
2
vin_list:
3
3
name: Single or multiple VINs separated by either of ,;| VIN found in Tesla app
4
4
description: Single 5YJ3E1EB6JF111222 Multiple 5YJ3E1EB6JF111222|5YJ3E1EB6JF333444|...
5
-
ble_mac_list:
6
-
name: Single or multiple BLE MACs (aa:bb:cc:dd:ee:ff) separated by a | (pipe); Optional for proximity detection
7
-
description: Use Android "BLE scanner" or iOS "nRF Connect"; First locate your car's BLE Local Name, it starts with letter S and ends with C. In the app for the car, find the MAC address. If you have multiple Twsla cars, use the signal strength to figure out which one to pick.
8
5
presence_detection_ttl:
9
6
name: Presence detection TTL
10
7
description: TTL in second when the car is considered gone after the last BLE ping; Default 240; 0 to disable detection
Copy file name to clipboardExpand all lines: tesla_ble_mqtt/translations/fr.yaml
-3Lines changed: 0 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,6 @@ configuration:
5
5
ble_presence_detection_ttl:
6
6
name: TTL ou le véhicule est considéré encore présent suite au dernier message reçu
7
7
description: TTL en seconde pour considérer un véhicule non présent; Défault 240, mettre 0 pour désactivé la détection
8
-
ble_mac_list:
9
-
name: Une ou plusieurs BLE MACs (aa:bb:cc:dd:ee:ff) séparées par un , ou | ou espace blanc; Optionnel pour la détection de véhicule(s)
10
-
description: Utilisez Android "BLE scanner" ou iOS "nRF Connect"; 1) localiser le BLE Local Name de votre véhicule. Le nom commence par la lettre S et termine par C. Trouvez pour cette entrée le MAC Address. Si vous avez plusieurs véhicules, utiliser la puissance du signal pour déterminer lequel d'entre-eux chosir.
11
8
mqtt_server:
12
9
name: MQTT Serveur
13
10
description: Adresse IP or Hostname pour le serveur MQTT
0 commit comments