Make Torque web logging compatible for Home Assistant again.
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.
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.
- 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.
Everything I made is open source. If you like what I'm doing and you want to support me, you can help me 😄!
- Sponsor me with Github
- Buy me a coffee
- Paypal