Page 4 of 5

Re: Python Plugin: Toyota

Posted: Sunday 24 August 2025 14:35
by mxpwr
Ah, thanks for clarification. I'll add that option.

Re: Python Plugin: Toyota

Posted: Sunday 24 August 2025 14:36
by manjh
Meanwhile I am experiencing problems logging into the MyToyota app, is it just me or is their server down?
I tried updating the app, and cleared the cache. No result...

Re: Python Plugin: Toyota

Posted: Sunday 24 August 2025 14:42
by mxpwr
Same here. Can't login through the app.

Re: Python Plugin: Toyota

Posted: Sunday 24 August 2025 16:34
by mxpwr
It works on my iphone and the the python backend, but not my Android phone. I updated Android 16 QPR2 Beta 1, maybe it's related to that.

Re: Python Plugin: Toyota

Posted: Monday 25 August 2025 16:36
by manjh
mxpwr wrote: Sunday 24 August 2025 14:42 Same here. Can't login through the app.
Received a reply from Toyota tech support, they have problems in their servers and are working on a solution.
Meanwhile the plugin works OK, and also the login via the Toyota website. So it's just the app.
Makes you wonder, a huge company that can build technically wonderful automobiles, but have problems getting a reliable Android app running...

Re: Python Plugin: Toyota

Posted: Monday 25 August 2025 16:37
by manjh
mxpwr wrote: Sunday 24 August 2025 14:35 Ah, thanks for clarification. I'll add that option.
Any ideas about how this will function?

Re: Python Plugin: Toyota

Posted: Monday 25 August 2025 16:41
by mxpwr
My plan is to add the option to change settings via http post requests. Then you can have domoticz change the polling interval whenever needed.

Re: Python Plugin: Toyota

Posted: Monday 25 August 2025 19:03
by mxpwr
manjh wrote: Monday 25 August 2025 16:37
mxpwr wrote: Sunday 24 August 2025 14:35 Ah, thanks for clarification. I'll add that option.
Any ideas about how this will function?
The feature is added now.
you can use curl to create the POST request for testing and you can find an example lua script in the readme to trigger it in Domoticz when a specific event occurs.

The curl command to change the polling to 300seconds looks like this:

Code: Select all

curl --silent -X POST -H 'Content-Type: application/json' -d '{"mode": "interval", "interval_seconds": 300}' http://192.168.1.123:8000/api/settings/polling

Re: Python Plugin: Toyota

Posted: Monday 25 August 2025 20:05
by waltervl
mxpwr wrote: Monday 25 August 2025 16:41 My plan is to add the option to change settings via http post requests. Then you can have domoticz change the polling interval whenever needed.
For python plugins a polling setting is normally done by a python plugin parameter. There are 6 parameters available. Debug setting is mostly one of them, so you have 2 spare available.

Re: Python Plugin: Toyota

Posted: Monday 25 August 2025 23:18
by manjh
waltervl wrote: Monday 25 August 2025 20:05
mxpwr wrote: Monday 25 August 2025 16:41 My plan is to add the option to change settings via http post requests. Then you can have domoticz change the polling interval whenever needed.
For python plugins a polling setting is normally done by a python plugin parameter. There are 6 parameters available. Debug setting is mostly one of them, so you have 2 spare available.
I don't think this is a "real" Domoticz plugin. It is a standalone app that can export values via MQTT, and from there values can be forwarded to Domoticz. At least, that is how I did it.

What we're looking for now is the way back: from Domoticz there will be the ability to change a setting (polling frequency) in the app.
Reason is that we would want a polling frequency of 30 or even 60 minutes normally, except when the vehicle is charging at home. This charging process is completely controlled by Domoticz, and I would want the info from the vehicle to be as accurate as possible. So I would like to change the polling frequency to (maybe) 5 minutes during the charging period. As soon as charging is terminated from Domoticz, polling frequency can go back to 30 or 60 minutes.

Having said all this, making the app a "native" Domoticz plugin is tempting, integration is easier.
On the other hand, it can now run as fully standalone app, or it can feed data into Domoticz or HA. So perhaps this is more flexible?

Re: Python Plugin: Toyota

Posted: Tuesday 26 August 2025 6:46
by mxpwr
Making a domoticz only plugin would remove a lot of functionality I was looking for when I created the dashboard. The current method offers a lot of flexibility how to integrate and use it with domoticz or other automation systems.

Re: Python Plugin: Toyota

Posted: Tuesday 26 August 2025 10:09
by waltervl
Then you better create a new topic because this is originally about a plugin and then probably also not a lot to do with python and Domoticz...

Re: Python Plugin: Toyota

Posted: Wednesday 27 August 2025 12:03
by manjh
waltervl wrote: Tuesday 26 August 2025 10:09 Then you better create a new topic because this is originally about a plugin and then probably also not a lot to do with python and Domoticz...
Perhaps you're right. Any suggestions on where we can continue this? Or should we move the content?

Re: Python Plugin: Toyota

Posted: Wednesday 27 August 2025 12:05
by manjh
mxpwr wrote: Monday 25 August 2025 19:03
manjh wrote: Monday 25 August 2025 16:37
mxpwr wrote: Sunday 24 August 2025 14:35 Ah, thanks for clarification. I'll add that option.
Any ideas about how this will function?
The feature is added now.
you can use curl to create the POST request for testing and you can find an example lua script in the readme to trigger it in Domoticz when a specific event occurs.

The curl command to change the polling to 300seconds looks like this:

Code: Select all

curl --silent -X POST -H 'Content-Type: application/json' -d '{"mode": "interval", "interval_seconds": 300}' http://192.168.1.123:8000/api/settings/polling
Thanks, I will update and test this new feature as soon as I find a little time.
Meanwhile, would an import of data via MQTT not be a neat (=easier) way to do it?

Re: Python Plugin: Toyota

Posted: Wednesday 27 August 2025 12:34
by mxpwr
Good idea, didn't think about that option. Ill have a look at it.

Re: Python Plugin: Toyota

Posted: Wednesday 27 August 2025 13:33
by manjh
mxpwr wrote: Wednesday 27 August 2025 12:34 Good idea, didn't think about that option. Ill have a look at it.
It would open the way to having perhaps some more settings updated this way.
With a config window similar to the "sensors to publish"...

Re: MyToyota Dashboard

Posted: Wednesday 27 August 2025 16:56
by waltervl
Splitted the messages into a new topic for the MyToyata Dashboard application.

Re: MyToyota Dashboard

Posted: Thursday 28 August 2025 16:16
by manjh
waltervl wrote: Wednesday 27 August 2025 16:56 Splitted the messages into a new topic for the MyToyata Dashboard application.
Thank you!

Re: Python Plugin: Toyota

Posted: Thursday 28 August 2025 22:51
by manjh
mxpwr wrote: Wednesday 27 August 2025 12:34 Good idea, didn't think about that option. Ill have a look at it.
Apologies, I've not yet tested the new development due to some other things I had to attend to.
I'll be away for a short while, back on September 1 or 2 .

Meanwhile, have you had a chance to think about the MQTT interface into the application?

Re: MyToyota Dashboard

Posted: Thursday 28 August 2025 22:56
by mxpwr
I added the code, but want to do some more refactoring before I push the changes. Something this weekend.