I have a new Toyota Tacoma and would love to get some of the data from the connect in there. Like tire psi, errors, door locks, fuel consumption, etc… I saw that someone created something similar for the mercedes and its pretty nice!.. heres the mercedes plugin… Mercedes Me Component
Moved this to the feature requests section for you as there doesn’t seem to be anything like this out there so far. You can vote on it using the button at the very top of your post.
I got a new RAV4 a few months ago and would like this too.
So just got a rav4 today. Tried to proxy the Android app and didn’t have any luck. I was able to decompile their app, but of course there is tons and tons to go through.
That’s right. But maybe the data for American and Asian accounts can also be accessed via this library at “https://ssoms.toyota-europe.com/”?
Maybe someone could test this?
Since my Toyota Corolla TS is coming not until three weeks and I live in Germany, I can’t contribute much to it
Hello, tojota library author here. For those functions that now uses some europe domain should be interchangeable to myt-aggregator counterparts and after that compatible for whole world. That would just need some testing by someone in such country.
Are you also planning to publish your library on PyPI so that it can also be imported for a sensor and used in Homeassitant?
Sorry if I misunderstand something, I’m not a developer.
But if your library could be easily installed and imported via “pip install”, I would try to make a toyota sensor for HA.
When I currently try to install it for test purposes, I get the following:
the way is to build command line sensors for reading values stored, by tojota.py, in JSON files. It’s very easy , thanks to the hard work done by Calmjm
If you want a step by step guide, i need some time. For sure the system needs a linux machine to run tojota.py.
In my hassio configuration i use this command line sensors:
That send shh request on linux machine to get the data, stored in JSON bu tojota.py
get_fuel.py
import os
import glob
import json
files= glob.glob('/home/cartman/toyota/tojota/cache/odometer/odometer*')
#print(files)
files.sort(key=os.path.getmtime)
#print(files)
with open(files[len(files)-1]) as f:
data = json.load(f)
park = data[1]
print(park['value'])
get_odo.py
import os
import glob
import json
files= glob.glob('/home/cartman/toyota/tojota/cache/odometer/odometer*')
#print(files)
files.sort(key=os.path.getmtime)
#print(files)
with open(files[len(files)-1]) as f:
data = json.load(f)
park = data[0]
print(park['value'])
get_lat.py
import os
import glob
import json
files= glob.glob('/home/cartman/toyota/tojota/cache/parking/parking*')
#print(files)
files.sort(key=os.path.getmtime)
#print(files)
with open(files[len(files)-1]) as f:
data = json.load(f)
park = data['event']
print(park['lat'])
get_lon.py
import os
import glob
import json
files= glob.glob('/home/cartman/toyota/tojota/cache/parking/parking*')
#print(files)
files.sort(key=os.path.getmtime)
#print(files)
with open(files[len(files)-1]) as f:
data = json.load(f)
park = data['event']
print(park['lon'])
Ahhh, understood! Many thanks for the hint!
How do you run the “tojota.py” itself to generate the files?
Do you have a kind of cron job for this, or do you also trigger it from HomeAssistant?
Thank you very much. Now after a bit of trial and error it works wonderfully for me.
Looks like I just need to figure out a good way to process the data in the trips files. To be able to create a timeline like Google Maps in Home-Assistant with it. The information from the parking file is a bit too incomplete for that.
Thanks again for the tips @dr_jekyll and @calmjm for the great work!
Processing trips data is one of my next goals in hassio. More than geolocalization history, I am interested in to get plot of consumption and EV time. But right now i don’t have time to do.
I think the problem will be that the data will always come as a bulk and not in real time at the respective event time :-/ Thus Homeassistant will probably not be able to process them properly to show a history.
Maybe I can find a way to load the data into my TimescaleDB to make a visualization in Grafana. Unfortunately, I do not use InfluxDB, to which the writing is seems already to be integrated.
I have now managed to integrate average EV distance & share, total distance, average speed, maximum speed, number of total trips & night trips, as well as average fuel consumption.
The whole for daily, weekly and yearly basis
I have only made a few changes to the statistics.py, so that only the unformatted floats are output, and call this via command line sensors and bash commands.