iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://github.com/matitalatina/torque-hass-proxy
GitHub - matitalatina/torque-hass-proxy: Make Torque compatible for Home Assistant again
Skip to content

matitalatina/torque-hass-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Torque Home Assistant Proxy

Make Torque web logging compatible for Home Assistant again.

Problem

Just following Home Assistant Torque Integration guide isn't enough anymore. Torque web logging supports only http and Home Assistant doesn't authenticate the user using ?api_password=YOUR_PASSWORD query param anymore.

So you need a proxy that supports both https and adds the long lived token inside headers request to authenticate the user correctly.

This little proxy solves both problems.

Getting started

You can download the executable torque-hass-proxy-android-arm64 from here, move it into your and run it on your Android phone using Termux.

For example, from android termux. You can run

# Install curl
pkg install curl

# Download the executable with curl
curl -L -o torque-hass-proxy https://github.com/matitalatina/torque-hass-proxy/releases/download/v1.0.0/torque-hass-proxy-android-arm64

# Grant execution permission for it
chmod +x torque-hass-proxy

# Run torque-hass-proxy
./torque-hass-proxy -url <YOUR_HOME_ASSISTANT_URL> -token <HOME_ASSISTANT_LIVE_TOKEN>

then you have the port 8090 open and you can put http://localhost:8090/api/torque in Torque -> Settings -> Data Logging & Upload -> Webserver URL.

Finally, you should see torque data in your Home Assistant! If you add also prometheus + grafana, you can have also graphs like this.

Car data on Grafana

FAQ

  • Too many steps just to record torque data! Is there any way to simplify it? No, but you can automate everything with Tasker. If my phone connects with my OBD dongle, Tasker starts automatically both torque and this proxy using Termux:Tasker.
  • How did you find this workaround? This proxy is heavily inspired from this Github comment. I chose Go because I don't want to use nodeJS runtime on my android phone, I wanted a native program.

Support my work

Everything I made is open source. If you like what I'm doing and you want to support me, you can help me 😄!