New sensors for Toyota Rav4 #35
Replies: 12 comments 47 replies
-
In essence no, as I my car does not expose these services, i can't find them. BUT i have recently been thinking about decompiling the Android App to find those that my car does not support. But the problem is that it is very difficult for me to test without a car that supports these. But i agree these would be very nice to have. |
Beta Was this translation helpful? Give feedback.
-
It looks like my Corolla is also transmitting door sensors etc to the MyT app after the last app update. I would be happy if I could contribute something here. I'll see what I can do after my vacation. |
Beta Was this translation helpful? Give feedback.
-
Maybe, we can try something, maybe we are lucky that one of the endpoints I already poll, actual contains this information. Go to command line and install
After this create a file called import asyncio
import json
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from mytoyota.client import MyT
start = time.time()
print(MyT.get_supported_regions())
username = "youremailaddress"
password = "yourpassword"
locale = "da-dk"
client = MyT(username=username, password=password, locale=locale, region="europe")
async def get_information():
print("Logging in...")
await client.login()
print("Retrieving cars...")
# Returns information about the cars registered to your account
cars = await client.get_vehicles()
for car in cars:
vehicle = await client.get_vehicle_status(car)
print(json.dumps(vehicle.as_dict(), indent=3))
loop = asyncio.get_event_loop()
loop.run_until_complete(get_information())
loop.close()
end = time.time()
print(end - start) and the execute it like this:
Beware that this will return sensitive information like VIN number and number plate and of course information about your car, you can just censor this. I just need to know the content of this line:
As this is the endpoint i believe may contain your data. But as you can see this endpoint returns nothing for me. Both of you are more then welcome to do this, as more data the better, and it makes it easier for me to implement. 😃 @CM000n And to answer this question, I believe that our cars transmit a lot more data to Toyota then we get to see. I think this is because of different prices for each model and because they are still rolling it out, and are adding features slowly, so i think you can expect more in the future. 😄 |
Beta Was this translation helpful? Give feedback.
-
Unfortunately ran into some challenges. Seems the version you referred to is not available. I tried the install without version which installed version 0.2.2, but still did not complete.see command lines and results below. Any suggestions? pi@raspberrypi:~ $ pip3 install mytoyota==0.5.1
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-vieraz3c/pendulum/ |
Beta Was this translation helpful? Give feedback.
-
@renewoensdregt Newer versions are only compiled for python 3.8 and not 3.7, please update to 3.8 😃 |
Beta Was this translation helpful? Give feedback.
-
No worries. I’ll try it again and if not I’ll install Ubuntu on the RPI and start from there. It’ll likely se on Sunday afternoon as I’ll be away for the weekend. No needing allowed 😁 |
Beta Was this translation helpful? Give feedback.
-
@renewoensdregt We are lucky!! I believe I have found the endpoint in the app. (and a lot more 😄 ) Can you please try this by pasting it into the import asyncio
import json
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from mytoyota.client import MyT
start = time.time()
print(MyT.get_supported_regions())
username = "youremailaddress"
password = "yourpassword"
locale = "da-dk"
client = MyT(username=username, password=password, locale=locale, region="europe")
async def get_information():
print("Logging in...")
await client.login()
print("Retrieving cars...")
# Returns information about the cars registered to your account
cars = await client.get_vehicles()
for car in cars:
vehicle = await client.get_vehicle_status(car)
status = await client.api.get(
f"{client.api.get_base_url()}/users/{await client.get_uuid()}/vehicles/{vehicle.vin}/vehicleStatus"
)
print(status)
loop = asyncio.get_event_loop()
loop.run_until_complete(get_information())
loop.close()
end = time.time()
print(end - start) |
Beta Was this translation helpful? Give feedback.
-
@renewoensdregt Update mytoyota to 0.5.3 and try this below in import asyncio
import json
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from mytoyota.client import MyT
start = time.time()
print(MyT.get_supported_regions())
username = "youremailaddress"
password = "yourpassword"
locale = "da-dk"
client = MyT(username=username, password=password, locale=locale, region="europe")
async def get_information():
print("Logging in...")
await client.login()
print("Retrieving cars...")
# Returns information about the cars registered to your account
cars = await client.get_vehicles()
for car in cars:
vehicle = await client.get_vehicle_status(car)
print(json.dumps(vehicle.as_dict(), indent=3))
loop = asyncio.get_event_loop()
loop.run_until_complete(get_information())
loop.close()
end = time.time()
print(end - start) |
Beta Was this translation helpful? Give feedback.
-
@renewoensdregt @CM000n I now got something for you guys! 🎉 I have started with the car windows to simplify development. Can you please try this branch manually add-window-sensors You can follow the instruction on the readme for how to manual install it if you need to. 😃 Please give feedback 😄 |
Beta Was this translation helpful? Give feedback.
-
Also please respond over at this #38 pull request for issues |
Beta Was this translation helpful? Give feedback.
-
I have now add door and door lock sensors + an over all status sensor. Please check it out and test it and leave feedback over there. #54 I need at least one to confirm it is working as expected before i will merge it into master and make a release 😃 |
Beta Was this translation helpful? Give feedback.
-
Everything is implemented now. Except the key sensor. See release 1.20 If any of you are up for it, we can look into implementing the ability to lock and unlock the car through HA, i don't know if it will work, but there is a endpoint for it 😊 |
Beta Was this translation helpful? Give feedback.
-
Hey, I wish I was able to contribute, but just not savvy enough...
Recently new sensors have been added to the app for my Rav4, highlighting whether I have lights on, doors unlocked and key in the car. Would it be easy to add those?
Beta Was this translation helpful? Give feedback.
All reactions