-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for North America #7
Comments
Do you have any sense of what's involved in adding support for another region? I'm a US-based developer with access to a recent model-year Toyota, and would love to try to help if given a bit of direction. |
Where can you see you car? (website/app) 😄 What features is available? |
Its an app. You can see odometer, estimated mileage, start engine, lock/unlock, you can also see parked location and door/window/moonroof status. |
Okay thanks for the info. This have given me an idea to understand how to do it. Someone from North America would have to decompile the android app and find out if the API is anything similar to the European one and then implemented it or if not, write a second library/client, that i can then implement in this integration. |
@DurgNomis-drol Hi I'm in US and would love to decompile the app. It appears the code is obfuscated. Can you guide in which file I can locate the api endpoints? |
I just decompiled the European app and found the API in this folder |
Is that iOS app path? I'm on Android guess I need to solve it some other way.. |
This is the path inside the Decompiled Android app, where |
ah! ok I was expecting the file under somewhere under |
|
I spent some time decompiling the APK for the NA app. Looks like the API endpoints are in the |
I have hit a roadblock with this. Here are the urls I found in apiGatewayBaseUrl: apiGatewayCertificateHostName: flexBaseUrl: idpBaseUrl: mslBaseUrl: tokenBaseUrl: I can't see these urls actually used with the endpoints I found previously, this is my first time looking at java so maybe I am just missing something. |
My knowledge about Java/Kotlin is on the same level as yours. So i can't really help you a lot. It seems though that the American version uses |
@striebwj the info you found should be correct. it appears the app is using Retrofit2, which defines the API paths in the java file in in |
also there're a batch of demo API responses in |
and the oauth could be provided by ForgeRock, and the relevant definitions:
|
OK. I think I made the oauth2 login working.
|
Nice find! |
I thought I can use the retrieved token to access the APIs, but failed unfortunately.. |
OK I made it:) It requires several extra headers when calling the API.
It apparently this API is completely different than in Europe. so the question is do you want to implement in this code repo? @DurgNomis-drol |
Nice work! Yeah, this should be a separate module then. Apparently NA customers have a lot more features available to them in the app then us in Europe 😞. Feel free to use anything from this repository as a base (If it is of any value) |
@widewing Would be interested in trying to help out with this if you do start a new module |
Thanks @DurgNomis-drol @jlmaners |
@widewing Nice job! Awesome to see that you're picking up the challenges 🚀 |
A few notes: (Though i know it is just a POC right now)
|
The road block here is the auth service forces redirect_uri to be "com.toyota.oneapp:/oauth2Callback" only, and lot of the redirect / processing logic is in javascript and html. So I guess there'll be no easy way other than building native application and intercept the result... |
I get the error below when trying to connect home assistant custom component 2021-12-30 17:41:37 ERROR (MainThread) [custom_components.toyota_na] Error fetching data |
@antasp3136 are you still having this issue? Does this happen every time you try to login or it only occurs occasionally? Because I see this 500 error in the logs too but it only occurs very infrequently and not affecting the functions. |
Yea I’m not seeing any entities in the system and also seeing this on the integration it’s self in homeassistant… Retrying setup: 500, message='Internal Server Error', url=URL('https://oneapi.telematicsct.com/v1/global/remote/status') |
@antasp3136 the important question here is what is your car's model and model year? The current library only supports newer Toyota Connected services (which has the option to remote start), not yet the old ones (like mine, a 2020 Sienna). If you tries to use this library for an older model year car, it would throw 500. |
We have two 2020s. A Tacoma and a 4Runner both are the limited models and both support remote start with remote connect and are both using the same Toyota account. |
Unfortunately for me at least (2021 Tacoma), I can now pull a lot of awesome data with that module using the get arguments, but the remote_request argument returns what appears to be a success but nothing ever happens at the vehicle. Have opened an issue on that library for this. So we do have a NA solution to pull a lot of great information (thanks so much to widewing, DurgNomis-drol, and visualage ), but we don't yet have a way yet to send commands like remote start and door locking here in the States. Fingers crossed! |
confirmed not working yet. looks like not as simple as sending an API request |
@antasp3136 Can you try to run the commands in https://github.com/widewing/toyota-na directly and report what's the outputs? |
Actually yes the commands do work I get info on my vehicles from that library running the python commands. |
Thats the main message. I also get all the vehicles information which for privacy reasons I wont post here. |
I do get this when i try to get the status of the vehicle using the vin.. I removed the vin see below.
|
So interesting.. One of the vehicles does not have a active remote connect subscription so when i try to poll the info on that VIN i get the error above. When i choose the VIN that does have the remote connect active i get data on it... Is there a way you can have a option to specify which VINs to pull info on? |
Ok that explains... The ha component currently assume all your vehicles are supported and actively subscribed and doesn't do proper protection yet. I'll fix this bug later. |
I've added support for remote start here widewing/ha-toyota-na#12 |
Hmm in HA im still not getting any data with the latest version installed. No errors either. |
Any updates on this? Its enabled in Homeassistant but no entities are created. |
Please file an issue in the na repo and I can take a look. |
Does this work for Canada?Having issues logging in |
I know this is an old thread, but any chances of doing the same type of decompiling and creating an add-in for the Lexus app as well? |
I've used the Toyota app with my Lexus vehicle and it works just fine. They use the same information, databases, just different branding. |
@widewing Are you still updating the plugin? I see it's been awhile since movement, but I'm not able to login it appears. |
I tried using this plugin with my lexus credentials but it didn't work. Are you saying I should sign up for an account under the Toyota app and add my VINs there first? |
Same here! Hope we get a reply |
Same here ++! For my Lexus, I entered my username/PW and was able to log into the integration. I double checked - was able to login to the Lexus app but not with the integration with the same credentials. Support for Lexus would be excellent! |
Toyota DMCA'd us which took the steam out of the project, unfortunately. |
At the moment we are all a bit busy with private stuff. But the first tests and initial work on support for LEyu's vehicles has already begun. See here: #316 Feel free to test it yourself, and create PRs if you have ideas for necessary adjustments. 😊 |
No description provided.
The text was updated successfully, but these errors were encountered: