[APP]PRO] Tesla

Hmm, I guess it should be, right?
Or am I missing something…

/Johan

REST commands, so it’s an older S/X? Perhaps they don’t provide all API fields.
Anyone with a similar car who can check this?

Yes, it’s an Model S P100D from 2019 :grinning:

The API count seems a bit off, or am I missing something?

/Johan

Not really. If your are timezone +0 (UTC), that are 18,5h x 12requests/h.
How many commands did you send (manually or with flow actions)? Today it depends in time of app update. Tomorrow it stats again at 0:00 UTC.

New test version 1.7.3:

  • Added flow action to set online interval.
    Adjust the polling interval during the day dependent on car usage or API request counter.

@copiis FYI and test :wink:

1 Like

Okay, i start with 1 min.

Hi Ronny,
My Tesla app stops always after a few requests. Like today after 5-10 API requests or stops. Here is the error log: 8362edcc-f10e-4c7f-9fd6-42b390638d8e
Since many days I can’t use it realy to run solar powered charging
.I even reduced the API calls dramatically. But it doesn’t help. After a few calls it stops.

Please read some post above. Tesla introduced rate limits. :man_shrugging:

If you have days with a different usage profile, you can set the online poll interval to a value that covers the driving time (or sentry mode time). So you can set an interval between 1min and 5min (that would cover 24h).

In addition you can make a flow that adjusts the interval if your online time is more than expected. This way you can increase the interval step by step to prevent a rate limit.

That’s just a simple flow to increase in steps. Just try some conditions to get a flow for your needs.


(sorry, only german screenshot :slight_smile: )

1 Like

App version 1.7.3 is live now.
In Summary, the following changes are included since 1.7.0:

  • Optimizes API handling. No car requests if car is not online. This makes sure, that only online times are used to call the car which counts on the rate limit.
  • request counter for API calls (data readings)
  • request counter for CommandAPI (sending commands)
  • flow action to set online interval dynamically
1 Like

I wonder if I understand well…

  1. I tried to send a messages to a Homey/Tesla-user when the doors of the car are ‘unlocked’ and the user is/is not in the car after 25 seconds and the doors are locked (by Tesla) after this 25 seconds. Only sometimes the messages are sent: why not every time? Is this caused by a (due to Tesla’s quite) limited ‘polling’ frequency?
  2. ‘Doors were locked’ can be used as a ‘trigger’ in Homey, but does that make sense? It should when in case the doors are locked, the flow will run, but it seems that’s not the case. How/why ‘Doors were locked’ can be a trigger?

The “door locked” capability is boolean value. The trigger is started if the value changes from one to another value. So only a state change will trigger the flow.

A “the door gets locked” trigger can be used to send you a confirmation about a correct locked car.
But in real world, this is not needed because the door locks already if you are some meters away.

What do you want to trigger with your flow?
An unlocked door because it was not closed correctly?
Then you can use the trigger “user detected as absent”. Then you can wait some seconds. Then check the condition if “doors are locked” = true.
If yes, doors got locked.
If false, the door is still open.

You will only get state changes while the car is online. If your online interval triggers data update only after the car got offline, the app can’t read the current state. In most cases the car keeps awake for at least 5min. So an online interval of 5min should cover this the online time after leaving the car. After driving, it’s awake for a longer time because of cooling down or drying the A/C.

I made it hourly

1 Like

I noticed that when I use the Homey Tesla app (e.g. unlocking doors button), the push notifications are sent. But when I use the ‘unlock’ button in the Tesla app or just open/close the doors physically, nothing happens (most times). That’s expected behaviour?
I tried several flows:


None are sending a notification when Tesla app of physical actions (e.g. leaving the car after driving) are expected to ‘trigger’.
(I understand this flows are not the most useful ones, it’s mainly to understand how the API/Tesla app works).

Hi, thankf for the hint. There was an app issue using the triggers.
The descriptions were wrong (reversed).
This will be fixed in the next app version.

If you change the state from HomeyApp or flow, the Homey device changed instantly after sending the command.
But if you lock/unlock the door at the car or via Tesla app, the Homey app sees this change only after the next data reading (depending on your online interval).

A new live version 1.8.0 is available

  • with a biiiiig translation update
  • fixed door locked flow trigger

Current available languages: :uk: :de: :netherlands:
New languages: :fr: :it: :sweden: :norway: :es: :denmark: :ru: :poland:

All texts are GPT translated.
If you want to distribute, please check all texts from app store description over pair/repair views to device view and flow cards.
Please report any wrong text or spelling. If you have better suggestions for technical words, please let me know.
Describe, where I can find the text, best with english naming for flow cards or device attribute.

Hi all,
Perhaps not the right topic, but has anyone have an example flow to link the production of your solar panels to the charging amp of your Tesla?

I have this flow, which worked like a charm previously but now getting the note of “Too Many Requests. Retry in 0 minutes”
Requests made: 120/300 at noon

Just curious to see how others set this up to minimise the polling/ requests.

Thanks

I first calculate the surplus of the solar system and convert it directly into amps.


Then I set the charging current of the car to the value calculated in the variable, but only if there is a difference.

Hi Ronny,
Still confused… (also after app update)

  1. After about 1,5 hour I reached home, I got a push message based on ‘user detected as absent’ (and I assume when Tesla is locked, user gets status ‘absent’ as well; I was driving alone)
  2. Even when I set online polling to 1 minute (see screenshot), the push messages are rarely sent (maybe 1 out of 10)
  3. I also tried ‘Tesla Vehicle Command Protocol (Alpha)’ (normally I use 'Tesla Vehicle Command Proxy), but it makes no difference and when using ‘Tesla Vehicle Command Protocol (Alpha)’ commands from Homey (like ‘open trunk’) are ignored.

FYI, this are my actual settings:





Any settings that should be changed (or are recommended to change)?

Settings are right. And Command Proxy is correct, too.
The Alpha-Versionis only for my tests.

This flow doesn’t make sense:
grafik

If the pollign interval is 1min. The chance is very low that the condition after 25sec is different.
Means: If doors get unlocked, the trigger is started. But the following conditions are using the data from last polling (where doors got seen as unlocked). The “Doors are locked” condition will never be true.

1 Like