10 авг. 2024 г.

Трансляция данных от автомобиля в Homeassistant из Torque

 

Источник

(This tutorial assumes that you have the OBDII adapter setup and you connected it successfully to Torque app in your phone. It also assumes that you have vehicle profile setup in the Torque app.)

A. Home Assistant setup:

1. In your HA installation, edit the configuration.yaml file like this:

(email address can be any string you like, but it can’t be left empty)

sensor in config

2. Go to user (in my case “Peter”, obviously yours will be your name) in the bottom left of HA interface:

HA user

3. Scroll down to the bottom of the page where you can see your “Long-Lived Access Tokens” and chose “Create Token”:

4. Give your token a name (you can call it whatever you like, I called it “Torque Default Integration”) and click “OK”:

Screenshot 2022-12-13 111348

5. A token will be generated. Copy it, paste it somewhere, e.g. Google Keep or Notepad as it won’t be shown again after you close this dialog box. (You will need it later in Torque phone app.):

Screenshot 2022-12-13 102925

6. Restart HA

B. Torque app setup:

(You should be able to use Torque Light app, but this tutorial was made using Torque Pro app.)

1. In Torque app select the clog wheel icon in the bottom left corner of the app welcome screen:

2. Then select “Settings”:

3. Then select “Data Logging & Upload”:

4. Then select three dots in the top right corner:

5. Then select “Select what to log”:

6. Chose which parameters you would like to log:

(It is better if you do this while connected to OBDII as it will make it clearer which items your adapter is able to log from your engine data.)

7. Go back to “Data Logging & Upload”. My “File Logging” settings look like this - they are not that crucial but just in case you struggle to make things work, I have them setup like this:

8. Scroll down to “Realtime web upload”. These settings are the most important! Make sure you enable “Upload to webserver”:

9. “Weblogging interval” - 5 seconds. (You can make it whatever you like, but it could quickly overload HA database if the value is too low, or you won’t get sufficient information if the value is too high).

Enable “Only when OBD connected”. (It works either way but more data might flood your HA database.)

10. Select “Webserver URL”. Enter the web address you use to login to your HA installation remotely from outside of your home network (e.g. Nabu Casa or DuckDNS, etc.). 

It’s very important to add “…/api/torque” after your address!  

Then click “OK”.

(Connection from the webserver URL has to be encrypted with SSL/TLS as stated in the referenced article. 88)

11. Select “Set Bearer Token”. Insert your token you generated earlier in your HA installation (in steps A.3 and A.4). Then click “OK”:

12. Select “User Email Address” and enter the same email address you entered in HA configuration.yaml file (in step A.1):

13. Restart HA

14. Connect your Torque app to OBDII adapter and drive your car for couple of minutes to generate data.

15. Entities should now be loaded in your HA installation with names that begin with “sensor.vehicle_…”, e.g. In my installation it looks they look like this:

In my dashboard they appear like this:

5 Snow Dimon: августа 2024   Источник (This tutorial assumes that you have the OBDII adapter setup and you connected it successfully to Torque app in your phone. It a...
ВКонтакте
FaceBook
Google+
UP