Page 1 of 4

Python Plugin: Toyota

Posted: Sunday 03 October 2021 19:41
by joro75
Hi all,

I have created a Python plugin that is able to retrieve the information from a Toyota car, when it is using the Toyota Connected Services. It is using the same API that is used by the Toyota MyT connected services app. This API is however only useable for cars that are purchased in Europe. For more information on Toyota MyT see: https://www.toyota-europe.com/service-a ... toyota/myt

The Toyota car should first be made available in the MyT connected services app, after which the Toyota plugin can retrieve the information, which is then provided as several devices in Domoticz.

At this moment the following devices will be available in Domoticz:
  • Mileage - Shows the daily and total mileage
  • Fuel level - Shows actual fuel level percentage
  • Distance to home - Shows the distance between the car and home
  • Locked - Shows the locked / unlocked state of the car
The devices that are provided by the Toyota plugin
The devices that are provided by the Toyota plugin
multiple_toyota_plugin_devices.png (40.5 KiB) Viewed 3578 times
The plugin and additional instructions on how it can be installed, can be found on: https://github.com/joro75/Domoticz-Toyota-Plugin.

This is the initial (v0.8.0) release, but I plan to add additional devices in upcoming versions.

Any feedback or suggestions are appreciated.

Thansk, and with best regards,
John

Re: Python Plugin: Toyota

Posted: Thursday 04 January 2024 7:10
by Jan01
Hello,
I tried to install this plugin to Domoticz but I got errors - see in the attachment.

Where is the issue?

Thank you for help.

Re: Python Plugin: Toyota

Posted: Wednesday 12 March 2025 8:12
by manjh
Has this problem been solved?

Re: Python Plugin: Toyota

Posted: Wednesday 12 March 2025 8:13
by manjh
Other question. I expect delivery of a new RAV4 PHEV in the next few weeks, and obviously would like to link it to my Domoticz.
Does anyone have experience using this plugin on a PHEV?

Re: Python Plugin: Toyota

Posted: Sunday 16 March 2025 12:36
by manjh
I installed the plugin, plus the required pytoyoda and geopy.
When I add the plugin to Domoticz, I get these errors:

Code: Select all

2025-03-16 12:33:10.522 Toyota: Worker thread started.
2025-03-16 12:33:10.521 Status: Toyota: Entering work loop.
2025-03-16 12:33:10.522 Status: Toyota: Started.
2025-03-16 12:33:10.780 Error: Toyota: (Toyota) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-Toyota-Plugin/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2025-03-16 12:33:10.782 Error: Toyota: Traceback (most recent call last):
2025-03-16 12:33:10.782 Error: Toyota: File "/home/pi/domoticz/plugins/Domoticz-Toyota-Plugin/plugin.py", line 76, in <module>
2025-03-16 12:33:10.782 Error: Toyota: import arrow # pylint:disable=import-error
2025-03-16 12:33:10.782 Error: Toyota: ModuleNotFoundError: No module named 'arrow'

Any clues as to what this means?

Re: Python Plugin: Toyota

Posted: Sunday 16 March 2025 13:26
by waltervl
That the python arrow module also needs to be installed.
As the plugin has not been touched for years be prepared for some changes. Also you need a recent python version...

Re: Python Plugin: Toyota

Posted: Sunday 16 March 2025 14:32
by manjh
I tried to pip install arrow, but it comes back saying that has already been satisfied....

Re: Python Plugin: Toyota

Posted: Sunday 16 March 2025 18:46
by waltervl
Did you try with sudo pip install? As that is known solution to solve module loading errors

Re: Python Plugin: Toyota

Posted: Monday 17 March 2025 19:50
by manjh
waltervl wrote: Sunday 16 March 2025 18:46 Did you try with sudo pip install? As that is known solution to solve module loading errors
tried that, no luck.

This morning I discovered there is a NodeRed module for Toyota support, I'll give that a try.

Re: Python Plugin: Toyota

Posted: Monday 24 March 2025 19:53
by manjh
Just to report that I've succeeded in pulling a lot of information from my Toyota into Domoticz.
Starting point was pytoyoda, running on my R-Pi. I modified the example file to write the information into a json formatted file.
This file then triggers a flow in Node Red, which reads the file and pulls out the data elements I want.
These are then sent over to Domoticz.

It would have been nice to have a local Domoticz plugin, but once this solution runs it has the same result...

Re: Python Plugin: Toyota

Posted: Sunday 03 August 2025 14:04
by mxpwr
I tried to use the pytoyoda package to feed data to domoticz which sort of works, but it's not pretty, so I wrote an independent frontend for it

https://github.com/stone17/mytoyota-dashboard

I plan on adding domoticz integration next using mqtt, but maybe someone wants to try this one and give input

Re: Python Plugin: Toyota

Posted: Monday 04 August 2025 9:14
by manjh
mxpwr wrote: Sunday 03 August 2025 14:04 I tried to use the pytoyoda package to feed data to domoticz which sort of works, but it's not pretty, so I wrote an independent frontend for it

https://github.com/stone17/mytoyota-dashboard

I plan on adding domoticz integration next using mqtt, but maybe someone wants to try this one and give input
Installation instruction contains an error:

Code: Select all

git clone <repository_url>

Re: Python Plugin: Toyota

Posted: Monday 04 August 2025 18:09
by mxpwr
Thanks, I can fix that. Do you get any other error?

Re: Python Plugin: Toyota

Posted: Tuesday 05 August 2025 13:25
by manjh
mxpwr wrote: Monday 04 August 2025 18:09 Thanks, I can fix that. Do you get any other error?
Yes.

Code: Select all

docker-compose up -d --build
should be

Code: Select all

docker compose up -d --build

Re: Python Plugin: Toyota

Posted: Tuesday 05 August 2025 13:33
by manjh
No other errors found! Aside from these two typo's in the installation instruction, the setup went very smoothly.

I am impressed with this plugin!
Will be playing with it some more.

Already see one change request: in "historical data" the options are 7, 30 or 90 days. Could you add "all"?

Re: Python Plugin: Toyota

Posted: Tuesday 05 August 2025 14:07
by mxpwr
manjh wrote: Tuesday 05 August 2025 13:33 No other errors found! Aside from these two typo's in the installation instruction, the setup went very smoothly.

I am impressed with this plugin!
Will be playing with it some more.

Already see one change request: in "historical data" the options are 7, 30 or 90 days. Could you add "all"?
Thanks for trying. I vibe coded this in less than 10h with Gemini 2.5pro. I'll add the "view all" this weekend.

Re: Python Plugin: Toyota

Posted: Tuesday 05 August 2025 14:09
by manjh
Great work!

Re: Python Plugin: Toyota

Posted: Thursday 07 August 2025 18:34
by manjh
Missing on the dashboard panel: battery level (%), and EV consumption (kWh/100).
Perhaps because the author has a hybrid, not a PHEV?
If you want, I can do the testing!

Re: Python Plugin: Toyota

Posted: Thursday 07 August 2025 18:56
by mxpwr
manjh wrote: Thursday 07 August 2025 18:34 Missing on the dashboard panel: battery level (%), and EV consumption (kWh/100).
Perhaps because the author has a hybrid, not a PHEV?
If you want, I can do the testing!
Yes, I have a hybrid. I was wondering if this will work with other types of cars. If you get me your logs, I can probably fix this.

Re: Python Plugin: Toyota

Posted: Friday 08 August 2025 21:33
by mxpwr
manjh wrote: Tuesday 05 August 2025 13:33 No other errors found! Aside from these two typo's in the installation instruction, the setup went very smoothly.

I am impressed with this plugin!
Will be playing with it some more.

Already see one change request: in "historical data" the options are 7, 30 or 90 days. Could you add "all"?
i added "all" option and some other things (heatmap and histogram plot).