Page 5 of 5

Re: MyToyota Dashboard

Posted: Saturday 30 August 2025 14:16
by mxpwr
Code changes are added now. You can now change the settings using MQTT. The Example is updated in the readme.
You can send messages to the basetopic + /command (by default: mytoyota/command)

Re: MyToyota Dashboard

Posted: Monday 01 September 2025 9:23
by manjh
That's great!
I am away from home for a week, looking forward to installing and testing next week!

Re: MyToyota Dashboard

Posted: Saturday 06 September 2025 14:56
by manjh
I'm back home, and installed the new version.
Took your example for the LUA code and copied it into my Domoticz setup.
Worked at first try! Great work.

One thing I looked for and could not find: the base topic seems to be hardcoded "mytoyota". I was expecting this as a parameter, same as the current MQTT base topic for outgoing messages.
But no big deal if you leave it as it is. Perhaps one change: in the "settings" page, change the text "Base topic (optional)" into "Base topic outgoing", or words like that.
Just so it is clear that this is the base topic going from the mytoyota-dashboard app into MQTT.

Alternative: have two fields, one for outgoing, and one for incoming base topics. I would prefer this option, if you don't mind the code change.

Perhaps for future development, there could be more settings to be allowed coming in this way. Can't think of one right now.

Re: MyToyota Dashboard

Posted: Monday 15 September 2025 9:39
by manjh
I have a suggestion for a new command from Domoticz into the MyToyota app.

Currently, I can control the polling period through the MQTT command. This way I can set a relatively short period during the charging process, and a longer one once charging is complete.
But in some situations I would want an accurate reading instantly.
Would it be possible to create a command, causing the app to refresh the data instantly, not changing the set polling period?

Re: MyToyota Dashboard

Posted: Monday 15 September 2025 9:42
by mxpwr
Yeah, that shouldn't be too hard. I'll add that.

Re: MyToyota Dashboard

Posted: Monday 15 September 2025 20:34
by mxpwr
Code updated, you should now be able to trigger a data pull via mqtt. Set the payload in the lua script to:

Code: Select all

payload = string.format('{"command": "force_poll"}')

Re: MyToyota Dashboard

Posted: Monday 15 September 2025 20:56
by manjh
mxpwr wrote: Monday 15 September 2025 20:34 Code updated, you should now be able to trigger a data pull via mqtt. Set the payload in the lua script to:

Code: Select all

payload = string.format('{"command": "force_poll"}')
Excellent work, this change worked at first try!

Re: MyToyota Dashboard

Posted: Tuesday 16 September 2025 9:30
by manjh
Instead of implementing in LUA, I decided to see if it is more simple in Node Red.
A function node for sending the force_poll:

Code: Select all

// set up command to force polling (once)
msg.topic   = "mytoyota/command"
msg.payload = { "command": "force_poll" };
return msg;
This function node can be triggered by anything, e.g. a changing status of the power switch that controls charging the car. But it can also be a button on the Node Red dashboard.
The output of the function node is sent to the MQTT interface.

Same principle for setting the appropriate polling period, in my setup again based on the power switch that controls charging.
If it is switched on, then the polling period is set to a low value, in my setup 2 minutes.
If switched off, the polling period is set to a longer time, in my case 30 minutes.

Code: Select all

// Respond to changing power switch message from Domoticz
// set polling period accordingly
// default value when switched off: 30 minutes (1800 seconds)
var value = 1800

// set value when switched on: 2 minutes (120 seconds)
if (msg.payload.nvalue === 1)
    {value = 120}
    
// set up command and send to MyToyota_dashboard app
msg.topic   = "mytoyota/command"
msg.payload = {"setting": "polling", "value": {"mode": "interval", "interval_seconds": value}}

return msg;
In my setup, both function nodes are triggered by the output of a switch node, selecting the input from Domoticz based on idx of the power switch.

Re: MyToyota Dashboard

Posted: Tuesday 16 September 2025 9:58
by mxpwr
That looks like a nice setup. I'll see if I can add some information to the readme.

Re: MyToyota Dashboard

Posted: Wednesday 17 September 2025 9:54
by manjh
mxpwr wrote: Tuesday 16 September 2025 9:58 That looks like a nice setup. I'll see if I can add some information to the readme.
Good idea. Let me know if I can be of help somehow.

Re: MyToyota Dashboard

Posted: Wednesday 24 September 2025 18:17
by manjh
Would it be possible to add a setting to show/suppress the debug lines in the log?

Re: MyToyota Dashboard

Posted: Wednesday 24 September 2025 18:38
by mxpwr
You can change the log level only in the yaml directly at the moment. I'll add a fastAPI hook to allow setting it from the settings page.

Re: MyToyota Dashboard

Posted: Saturday 27 September 2025 12:14
by mxpwr
Changes are added. I also optimized the logging method; it shouldnt hang anymore.

Re: MyToyota Dashboard

Posted: Monday 29 September 2025 13:46
by manjh
mxpwr wrote: Saturday 27 September 2025 12:14 Changes are added. I also optimized the logging method; it shouldnt hang anymore.
Installed and tested. Logs "feel" much faster.
One question: I don't see the options for the logging level in the settings...

updated: sorry, I found it. I expected this option in the settings tab, but it is on the logs page...

Re: MyToyota Dashboard

Posted: Monday 29 September 2025 14:03
by mxpwr
Yeah, I had it on the settings page but then moved it to the logs page. Felt more useful to have it right there.

Re: MyToyota Dashboard

Posted: Tuesday 14 October 2025 9:27
by manjh
Everything works great. :D
But when I click "Logs" it still takes a few minutes before data shows up, and in the mean time the app freezes.
It's not a big deal, but still...

Re: MyToyota Dashboard

Posted: Tuesday 14 October 2025 9:41
by mxpwr
Yeah, I noticed that too. I'll take a look at it when I can find some time.

Re: MyToyota Dashboard

Posted: Tuesday 14 October 2025 14:05
by manjh
mxpwr wrote: Tuesday 14 October 2025 9:41 Yeah, I noticed that too. I'll take a look at it when I can find some time.
:) no rush...

Re: MyToyota Dashboard

Posted: Saturday 01 November 2025 7:11
by mxpwr
I added some updates
- logging should be fixed now
- you can select rolling average for graphs
- you can reorder the tiles for the current statistics via drag and drop (I might add an edit button later)