zoernert / node-red-contrib-toyota-myt

Retrieve Data from Toyota MyT App
MIT License
2 stars 0 forks source link

Data refresh #1

Open Er-i-c opened 2 years ago

Er-i-c commented 2 years ago

Hi, first of all thanks for your work! I created a dashboard in node-red. I'm want to track the charging and send a notification when charging is complete. Everything works fine except that data refresh doesn't happen very often on the MyT side. I keep getting cached data. This is exaclty the same behaviour in the MyT app. I have to press the refresh icon in the Remote Charging screen to get the latest data. Once I do that, node-red also gets this data. Is it possible to simulate the MyT refresh action?

Thanks!

zoernert commented 2 years ago

Let me check. I have not found a specific endpoint to trigger a refresh - but only my side I get updates every hour. So let me check

zoernert commented 2 years ago

I think the following project/issue relays on the same API: https://github.com/calmjm/tojota/pull/7#issuecomment-966053570

let's check if someone knows the trigger for refresh.

Er-i-c commented 2 years ago

That's exactly the same thing I want :)

I just checked, my car is charging right now. I didn't get any updates for over 1.5 hours. Are you sure yours is updating every hour? When I use the car, I do get more updates. After I came home and parked the car, I got 2 updates in less than 10 minutes.

zoernert commented 2 years ago

When I use the car, I do get more updates. After I came home and parked the car, I got 2 updates in less than 10 minutes.

There are several different modes on how/when your car updates:

Long story short: We need to get first option ...

BTW I do not store or proxy any of your data. Your Node-RED is fetching it directly from Toyota.

Er-i-c commented 2 years ago

I checked again yesterday while charging, even no update after 2 hours. It looks like the car decides when to send an update

BTW I do not store or proxy any of your data. Your Node-RED is fetching it directly from Toyota.

Yes, Toyota is caching the data