Toyota Connect

I don’t have yet, but my plan is to use one of the existing car integrations as a template to build on.

Probably the Mazda one, but not sure yet.

And i’m very open to do collaboration on this :smile: The more the better.

count me in too! Would love to help.

Also interested. Got my VW on Home Assistant (with help from others using Node-Red), but can’t figure out myself to get my Toyota on too. Different API. I am running HA on RP4 and can’t use the .py solution, I guess.

My Toyota Yaris is leased so I hope to use the odometer reading to automatically keep track of my milage usage and remind me to use the other car if I am above my average allowance.

I cannot login to this site ( https://developer.apic.toyota.com/tmna/prod/ ) with my usual Toyota uname/pass btw … are you able to access these services??

@dmauro This is not for logging in with your normal Toyota customer account :wink: You need a special developer account for that. Unfortunately, registration also seems to be allowed only for certain company email addresses. With my private Gmail address or similar, I can not create an account.

@DurgNomis-drol & @GimpArm . I think before we can worry about the actual Home Assistant integration, we should first create a general MyT Python library that can be made available via PyPI. Presumably we can use some of the work already done by @calmjm , but will need to rewrite it if he doesn’t want to provide a libary himself via PyPI. How do you guys see this?

1 Like

I have done a lot of work the last couple of days. THIS IS STILL ALPHA, but it should work. I just can’t confirm it before I get my car. I won’t provide installation information before it is confirmed to at least be working. But contributions are more the welcome. There is still a lot to be done.

@CM000n Agree, but i have never done that. So that is something i would have to learn :smile: But to make it easier i have separated it already.

@GimpArm

5 Likes

@CM000n If you can test it and leave feedback over on github I would be very grateful :smile:

Hi @DurgNomis-drol, thanks a lot!
Maybe I can have a look, if I find some time this evening.

Maybe this is a good starting point to make your package ready for PyPi: https://medium.com/@joel.barmettler/how-to-upload-your-python-package-to-pypi-65edc5fe9c56

First I think you have to split the Home Assistant Component and the basic Toyota Libary in two seperate Git Repos

1 Like

@CM000n I have started splitting it up into two repos. I will populate the issues tab with things i think should be done before first release. Lets get this going :partying_face:

@DurgNomis-drol This is looking great! I’m the author of the Mazda integration. I’m glad my code has been helpful to you so far. Looking forward to seeing how this progresses!

3 Likes

Has anyone find a U.S based API site we can login to? The Europe one doesn’t seem to accept uname/pass from US accounts?.?.?

Ist there something like a Toyota Website with car informations in the U.S.?
Maybe this one: https://www.toyota.com/owners/

Maybe some U.S. owner of a Toyota can sniff for API calls there…

If some one is able to help with adding North America, please direct all discussions and information to the mytoyota so i can implement and keep all the information about it easy to find. :smile:

Some one would have to sniff the API through there website.

@bdr9 It was a great starting point for me. As i am not that good in python or programmering in general, would you be interested in helping writing test for the integration with the aim that we then can add it to the core? I am still learning and python tests is a hole other level for me still :smile:

As i spend most of the time working on underlying package. It will greatly speed up the development and will be greatly appreciated :smile:

If anyone wants to help with it, just hop over to the github and make an PR

Sure I’d be happy to help with the tests. The tests can only run within Home Assistant itself, because they depend on core Home Assistant code. So in order to work on the tests, you’ll need to make a fork of the home-assistant/core repo.

You’ll also need fixtures, which are just samples of the data returned by the methods in mytoyota. The tests will use these fixtures to “mock” the mytoyota methods, so that the integration can be tested without connecting to a real account. See here where I have added fixtures for my Mazda integration for the two methods in my pymazda library, get_vehicles and get_vehicle_status. Make sure to censor any personal info such as VIN, etc.

Thanks, i just took a look at the links and your explanation help me understand it a bit better. :smile:

I am probably gonna have some more questions, would you be willing to just drop a comment over at the github (Here) so i can ask you directly? As i am the only one so far working on it, it would be nice to have someone i could asks some question when i have some about how to implement tests. Your help so far is much appreciated :smile:

Good idea :slight_smile: I started a discussion here: https://github.com/DurgNomis-drol/ha_toyota/discussions/13

Happy to help where I can. It took me a while to learn how to write the tests. I mostly learned by looking at other integrations and how they wrote their tests.

2 Likes

How easy would it be to convert the Toyota API to talk to a Lexus instead? Seems odd that searching for Lexus integrations yielded absolutely 0 results given the brand recognition. Same for Toyota really since this thread only just started last year.

Thoughts on Lexus integration?

Here is some one who is trying to do it. I am the developer of the custom Toyota integration.

1 Like

Thank you! I responded there and offered to do whatever I can to help out.

Was also just thinking how nice it would be if my car could lock/unlock automatically just based on the presence of the smart key, and I realized that there are probably ways to make this work depending on what sensors can be exposed to Home Assistant. Unlocking the car as I walk up to it surely wouldn’t respond quick enough to use the way I’d want to, but at least it could lock automatically if I forgot.

So much potential when your vehicle is integrated into your life.