Python Plugin: Toyota Topic is solved

Python and python framework

Moderator: leecollings

Post Reply
joro75
Posts: 2
Joined: Sunday 03 October 2021 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Python Plugin: Toyota

Post 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 1780 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
Jan01
Posts: 3
Joined: Saturday 30 December 2023 7:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Contact:

Re: Python Plugin: Toyota

Post 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.
Attachments
errors.txt
(4.08 KiB) Downloaded 50 times
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Toyota

Post by manjh »

Has this problem been solved?
Hans
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Toyota

Post 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?
Hans
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Toyota

Post 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?
Hans
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: Toyota

Post 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...
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Toyota

Post by manjh »

I tried to pip install arrow, but it comes back saying that has already been satisfied....
Hans
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: Toyota

Post by waltervl »

Did you try with sudo pip install? As that is known solution to solve module loading errors
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Toyota

Post 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.
Hans
manjh
Posts: 748
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Python Plugin: Toyota

Post 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...
Hans
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest