joro75 / domoticz-toyota-plugin Goto Github PK
View Code? Open in Web Editor NEWA Domoticz plugin that provides devices for a Toyota car with connected services
License: MIT License
A Domoticz plugin that provides devices for a Toyota car with connected services
License: MIT License
Update to mytoyota 0.8
Also include a version check on the mytoyota library.
If the version is lower than 0.8, include an error in the log.
If the version number cannot be determined it is below 0.8.
A door open/locked status device is always created, also if that status information is not provided by the MyT information of the monitored car. This will result in a door open/locked status that is never updated.
It would be better that if the door status is not provided by the MyT information, the device is not created at all.
Hello, its me from the parent library.
Would it be possible for you to upgrade to the newest python version 3.12 (3.11 or 3.10 would also be fine. This is so I don't need to support older python versions ๐
The terminology that is used by Domoticz is: device. It thus is better that the plugin also uses 'Device' as its name (instead of 'Sensor')
Hey, the author of mytoyota
python module here.
It is humbling to see you build on my work. Awesome project! ๐ ๐
As mytoyota
is changing often because of new endpoints being discovered and Toyota changing things on there end (and me becoming a better developer). I would recommend pining a specific version in requirements.txt
so users don't accidentally install a version that does not work with you plugin.
Have a nice day!
The mytoyota
library now also has support to retrieve the information from cars from Lexus.
Please extend the domoticz plugin to also support Lexus cars.
Proposal is to add an additional dropdown box, where the car manufacturer can be selected: Toyota / Lexus.
And additional improvement can be to also add an 'Auto' option to the dropdown box. This would first trying 'Toyota', and if that isn't working can try 'Lexus'. The working car manufacturer can then be cached and reused in subsequent calls.
Also should update the icon to show the Lexus icon, and include references to the app on the Lexus websites.
If a car has not moved during a day, no record is present in the month view of the distance device.
For example the car is not used on thuesday, wednesday and thursday. Then only data is included for the other days.
Also a sloped line is shown going from monday directly to friday. This then shows in the graph as if the car was at another distance on wednesday, than it was in reality.
The solution for this problem is also simple.
Some caching is done for the distance, if the distance is not changed, then this caching is causing that no record is added for several days. To resolve this problem, the caching should be reduced in such a way that at least once a day, an update of the actual distance is forwarded to Domoticz, even if the value is the same as the previous value.
To investigate and prevent a problem, it would be better if we check that the mileage that is returned by the Toyota servers is increased since the last time. If for some unknown reason a lower mileage is returned than we already have, we should ignore the update, assuming that it is a response of outdated data.
See the discussion at mytoyta, the locale is just not used, and can be set to a fixed value.
The 'locked' switch is created but no updated at all ( even if I receive the notification from My T app).
Similar to what is done with the version check of mytoyota, also a check on the actually used version of geopy should be added.
And if it is too old, we should include a message in the domoticz log to update it.
Also update the README.md, to include reference to this check.
A 'Too many requests' Exception is raised when retrieving the vehicle information.
See the Log-file
2022-12-05 21:00:08.059 RAV4: Updating vehicle status
2022-12-05 21:00:09.215 Error: RAV4: 'onHeartbeat' failed 'ToyotaApiError':'HTTP: 429 - Too Many Requests. Please try again later.'.
2022-12-05 21:00:09.216 Error: RAV4: Exception traceback:
2022-12-05 21:00:09.217 Error: RAV4: ----> Line 798 in '/home/pi/domoticz/plugins/Domoticz-Toyota-Plugin/plugin.py', function onHeartbeat
2022-12-05 21:00:09.217 Error: RAV4: ----> Line 164 in '/home/pi/domoticz/plugins/Domoticz-Toyota-Plugin/plugin.py', function onHeartbeat
2022-12-05 21:00:09.218 Error: RAV4: ----> Line 752 in '/home/pi/domoticz/plugins/Domoticz-Toyota-Plugin/plugin.py', function update_devices
2022-12-05 21:00:09.218 Error: RAV4: ----> Line 245 in '/home/pi/domoticz/plugins/Domoticz-Toyota-Plugin/plugin.py', function retrieve_vehicle_status
2022-12-05 21:00:09.219 Error: RAV4: ----> Line 50 in '/usr/lib/python3.7/asyncio/runners.py', function run
2022-12-05 21:00:09.219 Error: RAV4: ----> Line 584 in '/usr/lib/python3.7/asyncio/base_events.py', function run_until_complete
2022-12-05 21:00:09.219 Error: RAV4: ----> Line 254 in '/usr/local/lib/python3.7/dist-packages/mytoyota/client.py', function get_vehicle_status
2022-12-05 21:00:09.219 Error: RAV4: ----> Line 73 in '/usr/local/lib/python3.7/dist-packages/mytoyota/api.py', function get_vehicle_status_endpoint
2022-12-05 21:00:09.219 Error: RAV4: ----> Line 226 in '/usr/local/lib/python3.7/dist-packages/mytoyota/controller.py', function request
Information from 2022-11-29 is still available, and seems to be the latest retrieved information. Since then no updates are received anymore.
Domoticz is already restarted, but doesn't seem to make any difference.
Would be nice if the fuel consumption (in L/100 km) of the last trips can be seen in 'day', 'week' and 'month' graphs.
At this moment the status from the Toyota servers is updated every 5 minutes. This is depending on when Domoticz and/or the plugin is started.
It would be better if the update of the toyota servers is done in such a way that it is done just before the next hour starts. In this way the information is updated in the correct hour, just before the new hour starts.
By slowly increasing or decreasing the interval of the updates, it should be possible to have the update in the last minute of the hour.
In the description of the plugin, there is a link to https://www.toyota-europe.com/service-and-accessories/my-toyota/myt which provides a general description of the MyT.
It would be better if a link is included to the local french/german/dutch/etc... website.
The correct links for some countires seem to be:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.