There are a few solutions for getting car telemetry into home assistant , but they have various problems. I have created a solution which uses REST and does not need an mqtt broker to be exposed to the internet. It also supports ssl connection to home assistant and choice of an API password or long lived access tokens. Finally, this method allows for you to capture other metrics from your car (outside of Torque data) if you wish to develop it further. You can see my method at
Hi. Yes Iâm in uk and drive Quashqai +2 with 360 entertainment system. The model i would advise is this one.
If you want the steering wheel controls to work you will need an add on for that also. My video feed from the car cameras wouldnt trigger the joying screen when i put it in reverse because the car signal was only 6v and the joying radio needed a 12v signal. I solved this with a couple of transistors to bump the signal to 12v.
Are you having similar issues and do you think itâs related to the escape characters? I also receive the following error in HA about unsupported message type.
Logger: homeassistant.components.owntracks.messages
Source: components/owntracks/messages.py:391
Integration: OwnTracks (documentation, issues)
First occurred: 3:59:36 PM (2 occurrences)
Last logged: 3:59:46 PM
If your getting the escape characters, I would check the http post block in the llamalab automate script. There is most likely a misplaced \ or " which means it is being posted incorrectly. My advise is start with a small string and then add further. It can be a bit of a headache to get the escape characters in the correct places.
Also check you have selected the Content-Type as JSON in the http post block
Thanks for the response. The escape characters are in the ârequest content bodyâ of your v8 llamalab automate script. They only rear its ugly head when I send data using MQTT. If I look at the JSON object I donât see it.
Now my configuration is a bit different in that Iâm send everything to my HA system over a SSL webhook into a node-red which doesnât require the Bearer Token authentication. I can see all the data move it between nodes, but as soon as I send it out via MQTT I see the escape characters when I listen for the topic. This is also my first exposure to MQTT, so that could be an issue as well.
Thanks again and I guess Iâll keep fiddling with it because I am able to get the data from my phone into HA, but I just need to figure how to format and use it!
This is fantastic and the only option Iâve found so far that works for me. Thank you for all the work, the code is very thorough!
Iâm working on it now but before I dive in, perhaps youâve figured out a way to template or automate frequent car occupants so itâs a more readable string?
Glad it was of use to you. Itâs always nice to see someone making use of my efforts. The head unit in my car has a problem scanning for new bluetooth mac addresses. Itâs one of those issues I have not got round to resolving yet. If you do get it working it should not be too difficult to create a txt file in home assistant that stores names against mac addresses, so you can then display who is currently in the car.
On this note the ha companion app now reports what bluetooth devices the phone is coonected to. So you can know when a phone connects to the car. Not quite the same as knowing the driver.
Hi. Happy to help where I can. I think the cleanest way to export torgue log file is to convert the file to a JSON format. You can then http post each line in the log file as a payload directly into HA. I think I used the https://(server)/api/services/mqtt/publish method with a long lived access token for authentication. This places the data in your MQTT broker, but if you are not using an mqtt broker, Iâm pretty sure you could post it directly to a sensor on HA. Looks like using `/api/states/<entity_id> would be the best direct method. Make sure to use the timestamp as your state, so that HA sees the sensor always being updated. Lastly, I think Torque has limited options in how many scans/log file lines it creates each second. I choose to poll the bottom line of the log file every X seconds and use the data in each next post.
Thanks for getting back to me. Thatâs been a big help in setting me off in the right direction.
From what you say you just publish right to the MQTT broker and not to the Torque integration, is that right? Iâm trying to stick as close to Torque as possible, I think I might be able to do so.
Great post. It worked nicely for me. I even managed to make InfluxDB and Grafana add-ons work including World Map plug-in for Grafana following your instructions in this post. The only issue I seem to grapple with is separating individual car journeys from each other. How do you do that, please? Thank you in advance for your reply.