Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matitalatina/torque-hass-proxy
Make Torque compatible for Home Assistant again
https://github.com/matitalatina/torque-hass-proxy
home-assistant torque
Last synced: 2 months ago
JSON representation
Make Torque compatible for Home Assistant again
- Host: GitHub
- URL: https://github.com/matitalatina/torque-hass-proxy
- Owner: matitalatina
- License: mit
- Created: 2021-06-06T07:33:53.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-15T20:44:08.000Z (about 2 years ago)
- Last Synced: 2024-10-15T16:44:36.168Z (3 months ago)
- Topics: home-assistant, torque
- Language: Go
- Homepage:
- Size: 845 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://www.home-assistant.io/integrations/torque/). 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](https://developers.home-assistant.io/docs/auth_api/#long-lived-access-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](https://github.com/matitalatina/torque-hass-proxy/releases/tag/v1.0.0), move it into your and run it on your Android phone using [Termux](https://termux.com/).
For example, from android termux. You can run
```bash
# 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 -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](https://www.home-assistant.io/integrations/prometheus/) + [grafana](https://grafana.com/), you can have also graphs like this.
![Car data on Grafana](assets/grafana.png)
## FAQ
- *Too many steps just to record torque data! Is there any way to simplify it?* No, but you can automate everything with [Tasker](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&hl=it&gl=US). If my phone connects with my OBD dongle, Tasker starts automatically both torque and this proxy using [Termux:Tasker](https://play.google.com/store/apps/details?id=com.termux.tasker&hl=it&gl=US).
- *How did you find this workaround?* This proxy is heavily inspired from this [Github comment](https://github.com/home-assistant/core/issues/28836#issuecomment-579887196). 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 😄!- Sponsor me with [Github](https://github.com/sponsors/matitalatina)
- [Buy me a coffee](https://www.buymeacoffee.com/mattianatali)
- [Paypal](https://paypal.me/mattianatali)