Pull Data from Your Car into Home Assistant // Tasker and Torque

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ค. 2024
  • This week's video is about my car dashboard in Home Assistant. We use Torque to pull data from the car, Tasker to prepare that data, and then upload to Home Assistant.
    Now it is a long video (25ish minutes), but I hope it is full of good information. Sadly it is Android only...
    Let me know if you tackle this project! Hopefully if you have never used Tasker or Torque this will get your feet wet.
    ❓What future topics would you like me to cover??❓
    ▶ Buy Me A Beer 🍻: www.buymeacoffee.com/ThisSmar...
    ▶ Have A Question? Join Our Discord ⁉️: tshouse.link/discord
    ▶ Timestamps ⌚:
    00:00 - Opening and Introduction
    01:15 - Requirements
    03:20 - Torque App Setup
    04:47 - Customize Torque Data in App
    06:03 - Torque Settings
    07:47 - Retrieving Data
    09:57 - Tasker Setup
    15:57 - Configuring Home Assistant Tasker Plugin
    18:37 - Creating a Car Variable
    18:52 - Testing Tasker Parsing of File
    19:22 - Checking MQTT
    20:21 - Home Assistant Set up
    20:46 - Virtual Device Tracker
    22:30 - Tasker Profile to Repeat Every 2 Minutes
    24:39 - Outro
    ▶ Links in Video 🔗:
    (I use Rebrand.ly for my URL shortening)
    Video Blog Post - tshouse.link/yt63post
    Torque (Android Play Store) - tshouse.link/torque
    Tasker (Android Play Store) - tshouse.link/tasker
    Home Assistant Plug-in for Tasker (Play Store) - tshouse.link/hatasker
    ▶ Product Links:
    (When available, we use affiliate links and may earn a commission!)
    Bluetooth ODBII Reader - amzn.to/3xaVuob
    My Main Home Automation Gear (Kit.co): tshouse.link/homekit
    My Z-Wave Home Automation Gear (Kit.co): tshouse.link/zwave
    ▶ Get a One-Month Trial of Great Music for Creators (I use this on my photography channel): tshouse.link/sound
    ▶ Website: thissmart.house
    ▶ Recommended Playlists:
    Smart Home 101 (Basics): • How to Wire A Smart Sw...
    Home Assistant Add-ons: • Severe Weather Alerts ...
    Video Guides: • Help Keep Your Kids On...
    Wyze Products: • Wyze Light Strips // S...
    #smarthome #homeassistant #torque #tasker
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 86

  • @ThisSmartHouse
    @ThisSmartHouse  2 ปีที่แล้ว +2

    I guess the link was broken, it should be fixed now. I also went ahead and provided example code for creating the virtual device tracker in Home Assistant using the GPS data.

  • @Dylan_Lanckman
    @Dylan_Lanckman ปีที่แล้ว +1

    love this!
    I'll give it a try soon!

  • @chellalialhcen
    @chellalialhcen ปีที่แล้ว +1

    Great Job .... Keep going ahead cause everyday waiting for your vidoes. Thnx A lot Bro

    • @ThisSmartHouse
      @ThisSmartHouse  ปีที่แล้ว

      Thank you so much! That means a lot. Let me know what videos you would like to see in the future!

  • @supperka2
    @supperka2 2 ปีที่แล้ว +1

    Awsome guide! than you!

  • @quipsand
    @quipsand ปีที่แล้ว

    Hey, where can I find your guide to help create and setup the MQTT sensors for Home Assistant?

  • @user-xf5xv3oo5v
    @user-xf5xv3oo5v 4 หลายเดือนก่อน +1

    I have spent hours and hours trying to find a reader that works by connecting to the AP of my router in the car (I couldn't find any) and was via DHCP to be accessible from the local network and upload the data to the HA.
    Then I spent hours looking for an app that I could use on the car's Android tablet and export the data directly to the HA (also without finding a solution).
    And finally I came across your video. I doubt you read old comments, but wow, we love inventing solutions hahaha.
    I will try the Torque - Task - HA variants
    and those of other comments that said Torque - HA directly

    • @ThisSmartHouse
      @ThisSmartHouse  4 หลายเดือนก่อน +1

      I'm still small enough that I try to read and respond to every comment.
      Glad you found some use from this project!
      Unfortunately I don't use it anymore because I swapped over to a Tesla after my Volvo got totaled.

    • @user-xf5xv3oo5v
      @user-xf5xv3oo5v 4 หลายเดือนก่อน

      @@ThisSmartHouse In fact, I am finishing an OBDII reader model which has access via Wi-Fi, it has a page/app to control the Wi-Fi, where it will connect, credentials, etc. and once connected to the car's router or cell phone, it is capable of sending data via MQTT or TCP/IP directly to the cloud.
      Your video inspired me to make this type of circuit, once finished, I will publish it.

  • @davebareham1075
    @davebareham1075 2 ปีที่แล้ว +4

    I came across this by accident when I couldn't sleep. As a HA household we are really into energy monitoring at the moment and I love the concept of this. So much so that I've ordered an ODB2 connector to give it a try.
    I suspect I will be rewatching this video a few times :) Many thanks
    Dave

    • @ThisSmartHouse
      @ThisSmartHouse  2 ปีที่แล้ว +2

      Awesome Dave. Let me know if you run into any troubles. I think I wrote this video script when I couldn't sleep one night. 😂

    • @davebareham1075
      @davebareham1075 2 ปีที่แล้ว

      @@ThisSmartHouse thanks - ibwill keep you posted. I will have the OBD adapter tomorrow (Monday). I've watched the vlog a few times now so think o understand how it fits together
      Watch this space - and thanks again for the inspiration

    • @davebareham1075
      @davebareham1075 2 ปีที่แล้ว

      So I got my OBD adapter today and its in the car. The Torque app is paired with the adapter and I can see the PIDs. It doesn't appear to be writing to a log file on the (android) mobile but had created the torque folder in documents so I will check the settings later. Data is being displayed in the Torque dashboard so progress is being made.

    • @ThisSmartHouse
      @ThisSmartHouse  2 ปีที่แล้ว +1

      Your path might be different. Double check the settings in torque.

    • @davebareham1075
      @davebareham1075 2 ปีที่แล้ว

      @@ThisSmartHouse I have what is probably a very stupid question - does the Torque app have to be running in the foreground for tasker to do its upload bit ?

  • @user-xf5xv3oo5v
    @user-xf5xv3oo5v 4 หลายเดือนก่อน

    the best

  • @ConnerHall
    @ConnerHall ปีที่แล้ว

    I'm having a hard time understanding how to link the longitude and latitude to an entity with automatic location updates. I have edited and copied the provided yaml into the services submenu shown in your video. However, the template does not pass along the right values when testing. I'm unsure how to port the code into an automation, if I need to put it into a configuration file, etc. I can see in the template editor that the formatting is correct, but I don't know how to properly get the long and lat to show on a map nicely. Help would very much be appreciated

  • @mindshelfpro
    @mindshelfpro ปีที่แล้ว +2

    Great project. Some folks have Android car decks so they can integrate Tasker and HA with the OBD2 sensor in the deck without the need of a phone.
    With the advent of Bluetooth Proxies, can you do a video using the OBD2 BT connected directly to a BT proxy (ESP32) that connects to Wifi in your car (either built-in or via a hotspot) with the BT proxy configured with your DNS entry to your HA setup? And show how the BT proxy can collect the OBD2 data directly and send via MQTT please? Thanks!

    • @ThisSmartHouse
      @ThisSmartHouse  ปีที่แล้ว

      I don't know if BT proxies work like that. I think they have to be on the same subnet as your HA instance.
      But there might be an ESP project that will collect data from odbii.

  • @rafac13
    @rafac13 5 หลายเดือนก่อน +1

    with the homeassistant app, isnt there a way to the torque to cummunicate directely to inti without having yo use Tasker?

  • @antoniodecrisci2369
    @antoniodecrisci2369 ปีที่แล้ว +1

    Hey thanks for sharing! went out and bought the device and torque Pro app, and within 10 minutes, I was up and running! I actually got it to work via the internal web service from the app, Torque reports it directly to my HA instance, and I used the Torque integration. I now have several sensors in HA without the need for parsing and mqtt...so that was easy! I do have a question: can this set up send you notifications if there is Check Engine Light on? Is there a sensor for that? thanks

    • @ThisSmartHouse
      @ThisSmartHouse  ปีที่แล้ว

      I have had a few people say the web service works for them, I haven't tried it with my new firewall, but it didn't work on my older USG 3. I did some hunting around and didn't see any sensors that returned check engine light status. I think it is a separate location in the ODBII connection that needs to be accessed by the app.

    • @antoniodecrisci2369
      @antoniodecrisci2369 ปีที่แล้ว +1

      @@ThisSmartHouse great! I am using Nabu Casa, so maybe that is the key.

  • @EbrahimHasan
    @EbrahimHasan ปีที่แล้ว +1

    The most terrific HA tutorial I've seen in a long while. Wish there was a way to connect the OBDII dongle permanently without worrying for the car's battery.

    • @ThisSmartHouse
      @ThisSmartHouse  ปีที่แล้ว

      Thank you! I know, I wish the reader was connected to a switched power pin instead of a constant power.

    • @EbrahimHasan
      @EbrahimHasan ปีที่แล้ว

      @@ThisSmartHouse A great incremental upgrade to this would be setting up reminders for maintenance and warnings when some values go out of accepted ranges, like unusual fuel consumption and such. I currently use drivvo for that, but that's very manual.

    • @ThisSmartHouse
      @ThisSmartHouse  ปีที่แล้ว

      A while back I had some things set up using tasker. But my car didn't have an accurate way of determining the odometer. I would be cool to combine with ai and have it detect unusual sensor readings.

    • @lDavidl
      @lDavidl ปีที่แล้ว

      Huh, what is stopping you from putting a relay or switch in between the reader's power input and the car's connector?

    • @EbrahimHasan
      @EbrahimHasan ปีที่แล้ว

      @@lDavidl The possibility of killing the battery by forgetting to flip a switch. This is something I'd keep running whenever the car is running, so unless I have a way of getting it to turn on and off with the car, it's not ideal.

  • @marekcoufal3159
    @marekcoufal3159 2 ปีที่แล้ว +2

    Thanks for the video, but somehow I didn't understand how HA gets data from MQTT? I have latitude and longitude in MQTT, but I don't know how to transfer it to a virtual device tracker. Thanks for the help.

    • @ThisSmartHouse
      @ThisSmartHouse  2 ปีที่แล้ว +4

      I just realized I didn't make the blog post live with the example MQTT sensors for Home Assistant. You need to create the MQTT sensors for Home Assistant to get the values from MQTT. As far as the virtual device tracker, I just updated the blog post with an example on how to use the device_tracker.see service.

  • @eggger007
    @eggger007 2 ปีที่แล้ว +2

    thanks, i am looking for that for a long time
    the link to blog post dosent working

    • @ThisSmartHouse
      @ThisSmartHouse  2 ปีที่แล้ว +1

      I am trying to see why Rebrandly isn't working, here is a direct link until the pointer is fixed: thissmart.house/2022/05/02/tasker-and-torque/
      Thanks for pointing that out!

  • @Jonahmeans1024
    @Jonahmeans1024 2 ปีที่แล้ว +1

    I can confirm that the logging using only the Torque app and the home assistant web server url on /api/torque (as per Torque configuration) works for me. I have my home assistant instance exposed to the internet on https

  • @ghostmachine1002
    @ghostmachine1002 2 ปีที่แล้ว

    If you ever have a chance, could you explain about the Nabu Casa use case in a video with this? I'm really trying to decide whether it's worth going away from Nabu Casa to Duck DNS

    • @ThisSmartHouse
      @ThisSmartHouse  2 ปีที่แล้ว +1

      So if you wanted to use Nabu Casa, you would be using the webhooks. Which instead of sending the data over the API, you would be using an automation triggered with the Nabu Casa webhook and then catch the data that way.
      This way your system could still receive data without having ports opened.

  • @Cyr3X69
    @Cyr3X69 ปีที่แล้ว

    This is a great tutorial! and a great idea... as soon as i came accross this i jumped and oreder an OBDII connector... Unfortunately I'm not able to see the mqtt entity in Dev Tools. I might be doing something wrong. :(

    • @ThisSmartHouse
      @ThisSmartHouse  ปีที่แล้ว +1

      Are you the same person that joined the discord? I think the issue is that as of 2022.12, manual MQTT entries have to be in the MQTT.yaml. I did a video on how to fix it: th-cam.com/video/fxS1z2Rv1EA/w-d-xo.html

    • @Cyr3X69
      @Cyr3X69 ปีที่แล้ว

      @@ThisSmartHouse Worked like a charm!! Thanks for the help! keep up the good work. also... i'm curious to see the LED Matrix :)

  • @StephenWelch
    @StephenWelch ปีที่แล้ว

    Great video, been looking for something like this for a while. I feel like I skipped a chapter though. How did you get that MQTT Explorer page? All my testing from the Tasker side is successful, I have my yaml mqtt sensors configured and even adjusted to your update video where you have a sensor domain under mqtt. But still not seeing entities in my HASS.

    • @ThisSmartHouse
      @ThisSmartHouse  ปีที่แล้ว

      Mqtt explorer is an add-on. So you have your entities added into your sensors.yaml or MQTT.yaml?

    • @StephenWelch
      @StephenWelch ปีที่แล้ว

      @This Smart House in the standard add on section or HACS, specific git link? OK I've been lazy and have everyone in config.yaml. but have it as
      mqtt:
      sensor:
      I can try the dedicated file.

    • @StephenWelch
      @StephenWelch ปีที่แล้ว

      Just a quick follow up. Found a github project for MQTT Explorer, but not a straightforward HASS integration. But creating a dedicated MQTT.yaml file and using mqtt: !include in my configuration.yaml script seems to have done the trick. A bit confusing because having it all (although not best practice) in the one config file should have worked. Maybe it was the extra reboot. Now phase two of troubleshooting. Not seeing the sensor get updated values.

    • @StephenWelch
      @StephenWelch ปีที่แล้ว

      And a final follow up. I saw when testing the action in "Car To Ha" that it was failing because it was an invalid JSON syntax. I fixed it by adding the appropriate " " in there. But in the "Parse File Clean" task, the tasks to to make that Ha call had " " around the variable already, so had to remove them there so that I was not getting into a double quote issue.
      Awesome video overall, able to finally have my vehicle stats in HASS, only been driving around with my BT OBDII adapter plugged in for about a year hoping to do more with it.

  • @Tarikmoe
    @Tarikmoe ปีที่แล้ว +1

    Yes please, could you explain how to set up the device_tracker.see?

    • @ThisSmartHouse
      @ThisSmartHouse  ปีที่แล้ว +1

      I have the example code in the blog post (at the bottom). Basically you are running the device_tracker.see command with the lat / lon from Torque which creates a device tracker that you can manually update. Let me know what specific issue you are running into.

  • @tubelubed
    @tubelubed 10 หลายเดือนก่อน

    None of the redirection links work..

  • @knoxvol4104
    @knoxvol4104 2 ปีที่แล้ว

    IFTTT is a great alternative for iOS

    • @Tarikmoe
      @Tarikmoe ปีที่แล้ว

      How please????

  • @vinkenwood8233
    @vinkenwood8233 ปีที่แล้ว

    Cant get it work on my Chevy G20 :(

    • @ThisSmartHouse
      @ThisSmartHouse  ปีที่แล้ว

      What isn't working for you? Are you able to get data from the odb2 reader to your phone?

  • @martindinicolino8227
    @martindinicolino8227 หลายเดือนก่อน

    have you ever found an iOS solution?

  • @henningklages861
    @henningklages861 2 ปีที่แล้ว

    There is a Home Assistant built in integration named Torque. Why didn't you use that? Torque seems to be able to send the data direct to Home assistant.

    • @ThisSmartHouse
      @ThisSmartHouse  2 ปีที่แล้ว

      When I first started looking into it I think there's a bug in the way it handles SSL certificates on the torque app.

    • @henningklages861
      @henningklages861 2 ปีที่แล้ว +1

      @@ThisSmartHouse I was not aware of a bug - will test it next week, still waiting for ODB2 stick.

    • @ThisSmartHouse
      @ThisSmartHouse  2 ปีที่แล้ว +1

      Please let me know. Because I remember going down that path at one point in time and something stopped me.

    • @henningklages861
      @henningklages861 2 ปีที่แล้ว +1

      @@ThisSmartHouse I got my OBD2 adapter, installed Torque app on my smartphone, added the torque platform (it is a platform not an integration) at HA, use the nabu casa remote access with bearer. All selected PIDs are available as sensors. I created one additional template sensor and added the gps data as attributes - thats only to be able to use the map card with an entity. My use cases are: last parking position (with map card) and fuel refill planning. That works fine for me.

    • @viktorgelinger5685
      @viktorgelinger5685 2 ปีที่แล้ว

      @@henningklages861 I am trying to do same thing, but i do not see any sensors in HA. Torque is working, log file is full of values. Nabu casa, bearer, PIDs selected. I added 3 lines in configuration.yaml. Did you set up anything else in HA? Thanks!

  • @DJFrancisco
    @DJFrancisco 2 ปีที่แล้ว +2

    Am I the only one who noticed he said ODBII instead of OBDII (On Board Diagnostics)

    • @ThisSmartHouse
      @ThisSmartHouse  2 ปีที่แล้ว +1

      Ha. Ooooppss.

    • @DJFrancisco
      @DJFrancisco 2 ปีที่แล้ว +1

      @@ThisSmartHouse lol I loved the info though!! Thanks for sharing

    • @ThisSmartHouse
      @ThisSmartHouse  2 ปีที่แล้ว

      Yeah I don't know why I always say it that way, thanks for calling that out!. Glad the video was helpful!

  • @fasthowto
    @fasthowto ปีที่แล้ว

    It's OBD, not ODB..

    • @ThisSmartHouse
      @ThisSmartHouse  ปีที่แล้ว

      Yep. I corrected myself a comment.