The timesatamp provided by data request (polling) is not available via Telemetry.
I have to set the timestamp by myself. This will be added to the next version. Thanks for reporting ![]()
You’re welcome, thank you![]()
Hello,
I am trying to ad my tesla. When i insert my id en my secret in have the next error: 400 Bad Request: {“error”:“invalid_audience”,“error_description”:“The ‘audience’ parameter is invalid. Include valid audience in the request.”}
Can anybody tell my what the problem is?
Can you please try anagin, then send me a diagnostics report.
Can you check, what’s your region (NorthAmerica, Europe)?
Hi Ronny,
I have try is one more time. 7bc970a4-bfb7-4390-887e-dc4c4417719e
My region is Europe, The netherlands.
Thank you for your help
I am also having issues to connect from Homey Self Hosted. On the Homey Pro (2023) is works good. But on HSH it only gives error messages when trying to connect.
400 Bad Request: {“error”:“invalid_audience”,“error_description”:“The ‘audience’ parameter is invalid. Include valid audience in the request.”}
I have tried to use the incognito mode of the browser, but without success
It seems the “invalid_audiance” error is caused by an API change. I will check it asap. Please don’t send me further diagnostics reports or suggestions ![]()
Homey Pro 2023
App versie 4.4.2
Tesla Developer App aangemaakt
OAuth Client ID/Secret ingevuld
Fout: 400 invalid_audience
New test version 4.4.3:
- Authentication adjustments
I haven’t found a reson and I can’t reproduce the issue.
The app registers the public certificate for both regions (NA, EU). The “invalid” audience parameter is just the region based URL. The NA registration fails in your case. I don’t know why.
So I added some error handling to skip NA registration on error and continue with EU region. Let’s see if this works or not. If it works, only one region is registered, but this should be ok for personal use.
Some questions…
- If I saw it right, HP23 and SHS are affected? But this shouldn’t be a reason.
- Did you register a new client_id at developer.tesla.com? Or are older client_id’s also affected?
- Is Tesla asking for a region now during app (client_id) registration?
@fmb @Tim_Verwijmeren @Remco_de_Vrijer FYI and test. Please report if it fails again or if it’s ok now.
Hi Ronny,
I tested 4.4.3, but both registrations still fail with invalid_audience. The error is displayed twice, so it appears that both NA and EU token requests fail.
According to Tesla’s current documentation, partner token requests must use:
Valid audience values are:
https://fleet-api.prd.eu.vn.cloud.tesla.com
Could you check whether the app is using the new fleet-auth token endpoint for the client_credentials request, and whether the audience is sent exactly as the regional Fleet API base URL without a trailing slash?
My Client ID is newly created in the Tesla Developer portal. Tesla did not ask me to select a region during registration. I am located in Denmark/EU.
Ok, so next try with version 4.4.4.
I just saw that Tesla changed the token URL, so let’s try with this.
Perhaps I don’t get an issue because my Homey URL is already registered I think. So if this doesn’t work, I have to check with a new client_id on another Homey ![]()
Thnx for diving into it that quick!
Installed Tesla Tesla Auto & Energie v4.4.4 (test) on Homey Self Hosted v13.3.1
1st try: on Homey Self Hosted use the same Tesla Developer “Application” (client ID & secret). This is the same as I use on my Homey Pro 2023.
Gives error:
2nd try: on Homey Self Hosted use a new created Tesla Developer “Application”
400 Bad Request: {“error”:“invalid_audience”,“error_description”:“The ‘audience’ parameter is invalid. Include valid audience in the request.”}
, 400 Bad Request: {“error”:“invalid_audience”,“error_description”:“The ‘audience’ parameter is invalid. Include valid audience in the request.”}
So unfortunately no succes yet on my side.
Update after 1st post:
To answer your 3 questions:
-
If I saw it right, HP23 and SHS are affected? But this shouldn’t be a reason.
It works for me on Homey Pro 2023, but cannot get it working on Homey Self Hosted -
Did you register a new client_id at developer.tesla.com? Or are older client_id’s also affected?
At first tried to use existing one and when that didn’t work made a new one (which also doesn’t work) -
Is Tesla asking for a region now during app (client_id) registration?
I don’t get questions about the region
But the HP23 has an older client_id which was already registered, right? It seems, only new registrations seems to have issues. Alreday registered ones not.
Yes, that is an existing account.
Hi Ronny,
Just wanted to let you know that version 4.4.4 solved the issue! ![]()
I can now log in successfully, and everything is working as expected.
Thank you very much for your quick response, your hard work, and for investigating the problem so quickly. I really appreciate your support and the fast turnaround.
Thanks again for maintaining such a great app!
Best regards,
Nicki
New test version 4.4.5:
- some additional changes for domain registration to fit the documentation and requirements better..
Please report if thsi works now for all for app/domain registration (the process after inserting client_id and client_secret).
Hi Ronny,
With 4.4.4 it is working for me. Thank you
Hi Ronny,
Thanks again for your help with the authentication issue. Version 4.4.4 is now working and I can successfully add my Tesla.
However, I have noticed a few other issues.
In Flows, I seem to be missing several essential Flow cards. For example, under the Then cards I cannot find functions such as:
- Set/preheat the car to a specific temperature
- Start/stop or otherwise control charging
- Other vehicle commands that appear to be supported according to the app’s Flow card overview
I also seem to be missing quite a few cards under both When and And compared with the available cards shown for the app.
Could this be related to the recent updates/API changes, or is there something I need to enable or configure?
I have also tested the Dashboard widget. It displays information, but the buttons do not seem to send any commands to the car. I also can’t see the current charging status or similar live information in the widget.
Authentication itself is now working perfectly with v4.4.5 – these issues only concern the available Flow cards and Dashboard widget functionality.
Thanks again for your help and for maintaining the app!
Best regards,
Nicki
No, no changes, all flows are present.
For conditions, there are flow cards for special cases (dropdown selection etc.). For simple values just use Homey logic cards.
Did you add the “child” devices for battery, climate, location? These devices are used to group thematic data into a device, because else it would end up with a car devucr having 50 flow cards in a selection.
