-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No location information starting with vehicle software 2023.38.x #69
Comments
Here is more info from Tesla about how to get location data with newer vehicle software: Edit: Seems you can still get it, but need to include |
Yes, please consider this request x2. Many automations relying on the location data are now broken with the latest Tesla update. |
Here's a different application and an example of how they have altered their code to suit the new endpoints - |
Here's a flow to pull the new endpoints for location. Note the field 'your id here' is the value of the very first object if you place a debug node on node-red-contrib-tesla. The objects user_id and vehicle_id won't work. |
@ChutneyMary Additionally I do now run into problems as I now need to issue two requests (one with node-red-contrib-tesla and this one) and the server starts throttling (error 408). Need to find a clever timing solution for that (or include all other endpoints into your nodes instead). |
I have the same problem with throttling with two requests running. It's a choice between losing automations that rely on location data versus all the other data... Think I'll have to manually open the garage door for awhile...1st world problems! |
Indeed.
I think your node if a good PoC for a possible fix in node-red-contrib-tesla. |
I use my version @gaphi/node-red-contrib-tesla and do not have any problem
for several years.
I just had to add the location_data endpoint since recent Tesla update in
my automation (my garage door still open automatically), without any change
in this node-red-contrib-tesla code.
Probably a good starting point for the update you want to provide 😊
Le mar. 14 nov. 2023 à 13:53, Lineflyer ***@***.***> a écrit :
… 1st world problems!
Indeed.
Hopefully @onokje <https://github.com/onokje> can come to the rescue soon!
I think your node if a good PoC for a possible fix in
node-red-contrib-tesla.
It might even start to have a look at the source and see if I can provide
a PR, but I am not really familiar with JS and not familiar with node red
syntax. So chances are high, that I will not be successful.
—
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADUNWNPRACQZOWAQI7IYRSTYENSWHAVCNFSM6AAAAAA7JDMJICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJQGE2TANRXGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hello @GaPhi. I tried installing your version using Manage Palette in Node-Red. Unfortunately it has a boxed 'conflict' message. It won't allow installation. It also says the version is 2 years and 2 months ago (1.0.6-0)? Is this the latest branch you have tweaked with the new endpoint? Or have I misunderstood something? |
@GaPhi |
No need to commit anything, API has not changed enough :
msg = {
vehicleID: 'XXX',
command: 'vehicleData',
commandArgs: {
endpoints: ['charge_state', 'location_data', ...any others...],
let_sleep: true
}
}
I just had to add the 'location_data' new endpoint.
Maybe the dependencies should be refreshed to be more up-to-date for your
environment...
It depends to my @gaphi/teslajs fork too to support commandArgs (if I
remember what I did 2 or 3 years ago)
Le mar. 14 nov. 2023 à 15:37, Lineflyer ***@***.***> a écrit :
… Is this the latest branch you have tweaked with the new endpoint? Or have
I misunderstood something?
@GaPhi <https://github.com/GaPhi>
I would have the same question as I did not see any related commit in your
fork?
—
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADUNWNIC4ZJWJVAV77JXRLTYEN62LAVCNFSM6AAAAAA7JDMJICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJQGM2DMMRTGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
And you use these msg.* objects as input into the node-red-contrib-tesla node? |
Yes
Le mar. 14 nov. 2023 à 19:14, Lineflyer ***@***.***> a écrit :
… I just had to add the 'location_data' new endpoint.
And you use these msg.* objects as input into the node-red-contrib-tesla
node?
—
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADUNWNLSYTCEWKDJKMSWUVDYEOYJPAVCNFSM6AAAAAA7JDMJICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJQHA3DIMZTGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@GaPhi |
Here are the command arguments I use
{"endpoints":["charge_state","climate_state","closures_state","drive_state","gui_settings","location_state","location_data","vehicle_config","vehicle_state","vehicle_data_combo"],"let_sleep":true}
Le jeu. 16 nov. 2023 à 22:06, Lineflyer ***@***.***> a écrit :
… @GaPhi <https://github.com/GaPhi>
Do you know the correct name of all the endpoints normally contained in a
node-red-contrib-tesla "overall" request?
I guess that's the reason why I can't get it working.
—
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADUNWNMYXBNQWYCVM2W7IZLYEZ56NAVCNFSM6AAAAAA7JDMJICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJVGMYTKNJXGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'm not able to install npm packages on my node red device. I've tried installing @gaphi/node-red-contrib-tesla via Node Red pallette but get the following error:
@GaPhi could you please fix the version in the Node Red pallete? |
Somehow I can't get it working. |
The version is 1.0.6-0 in your log which is not the latest version...
I have forced an update
***@***.***/node-red-contrib-tesla> which should
now become 2.0.1-9
This can take some time to propagate but I hope it will be available soon
in the palette manager ! ;-)
Le sam. 18 nov. 2023 à 16:12, Bart ***@***.***> a écrit :
… I use my version @gaphi/node-red-contrib-tesla and do not have any problem
for several years. I just had to add the location_data endpoint since
recent Tesla update in my automation (my garage door still open
automatically), without any change in this node-red-contrib-tesla code.
Probably a good starting point for the update you want to provide 😊
I'm not able to install npm packages on my node red device. I've tried
installing @gaphi/node-red-contrib-tesla via Node Red pallette but get the
following error:
2023-11-18T14:51:41.362Z Install : @gaphi/node-red-contrib-tesla 1.0.6-0
2023-11-18T14:51:41.674Z npm install --no-audit --no-update-notifier
--no-fund --save --save-prefix=~ --production --engine-strict
@***@***.***
2023-11-18T14:51:51.990Z [err] npm WARN config production Use --omit=dev
instead.
2023-11-18T14:52:14.476Z [err] npm
2023-11-18T14:52:14.478Z [err]
2023-11-18T14:52:14.479Z [err] ERR! code
2023-11-18T14:52:14.480Z [err] ETARGET
2023-11-18T14:52:14.508Z [err] npm
2023-11-18T14:52:14.509Z [err] ERR! notarget
2023-11-18T14:52:14.511Z [err] No matching version found for
@***@***.***
2023-11-18T14:52:14.514Z [err] npm ERR! notarget In most cases you or one
of your dependencies are requesting
2023-11-18T14:52:14.514Z [err] npm
2023-11-18T14:52:14.517Z [err] ERR! notarget a package version that
doesn't exist.
2023-11-18T14:52:14.540Z [err]
2023-11-18T14:52:14.540Z [err] npm ERR!
2023-11-18T14:52:14.543Z [err] A complete log of this run can be found in:
/data/home/nodered/.npm/_logs/2023-11-18T14_51_50_637Z-debug-0.log
2023-11-18T14:52:14.593Z rc=1
@GaPhi <https://github.com/GaPhi> could you please fix the version in the
Node Red pallete?
@onokje <https://github.com/onokje> it would be nice to merge the pull
request of @GaPhi <https://github.com/GaPhi>
—
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADUNWNKAB3ZROFFOSJZVWDDYFDF63AVCNFSM6AAAAAA7JDMJICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGUZTIMRSHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The palette doesn't get the updated version. I've installed package version 2.0.1-9 using the tgz file. So it seems the cause is in the teslajs package. @GaPhi do you know what might cause this? |
- I do not use this method -> I create a minimalistic flow
- I reproduce the defect
- I think the "body.response[...]" (line 611) should be "body[...]" as the
.response extraction is already in the .get method (line 509)
- I fix this... rewrite a bit and test it
- Hurra, it works
I let you test it now. ;-)
=> release 2.0.1-10
Le mar. 21 nov. 2023 à 21:03, Bart ***@***.***> a écrit :
… The palette doesn't get the updated version. I've installed package
version 2.0.1-9 using the tgz file.
I've configured the API key and I'm able to get a list of vehicles.
I can't get any other get command to work. (haven't tried a post) I keep
getting the
error [error] [tesla-api:Get status] TypeError: Cannot read properties of
undefined (reading '0')
I've modified my live tesla.js file with extra console.log statements and
found the cause of the issue is in the wakeup method line 53. I've put the
whole method in a try catch block and this is the error it produces:
TypeError: Cannot read properties of undefined (reading '0')
@40000000655d094a02a95fa4 at
***@***.***/teslajs/teslajs.js:612:33
@40000000655d094a02a96f44 at Request._callback
***@***.***/teslajs/teslajs.js:512:13)
@40000000655d094a02a97ee4 at self.callback
(/data/home/nodered/.node-red/node_modules/request/request.js:185:22)
@40000000655d094a02a98e84 at Request.emit (node:events:517:28)
@40000000655d094a02a99654 at Request.<anonymous>
(/data/home/nodered/.node-red/node_modules/request/request.js:1154:10)
@40000000655d094a02abbd1c at Request.emit (node:events:517:28)
@40000000655d094a02abc8d4 at IncomingMessage.<anonymous>
(/data/home/nodered/.node-red/node_modules/request/request.js:1076:12)
@40000000655d094a02abdc5c at Object.onceWrapper (node:events:631:28)
@40000000655d094a02abe42c at IncomingMessage.emit (node:events:529:35)
@40000000655d094a02abefe4 at endReadableNT
(node:internal/streams/readable:1368:12)
So it seems the cause is in the teslajs package. @GaPhi
<https://github.com/GaPhi> do you know what might cause this?
—
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADUNWNPSSAOI36ZEEYPPW3LYFUCJLAVCNFSM6AAAAAA7JDMJICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRRGU4TSOJSGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I have found a workaround that works for this node.
From: To:
|
Thanks @osvedman . Confirmed working for me! |
@GaPhi hi, just hijacking this thread. i installed your code into my nodered. and it works well, but only for the first car. i can select whatever i want.. it just takes my first car. any clue? |
I only have one Tesla... but the code seems to support more : const vehicleID = msg.vehicleID ?? config.vehicleID; Then, if you set msg.vehicleID (not in the payload), then another car should be selected I suppose, otherwise it is the one selected in the node configuration. |
hmm the pull down doesnt work for me.. allways my first car as output. Question, since im new to node.red since 4h ;-) |
ah sorry the whole "multiple cars" wont work with me.. i just ask for the model: i allways get model 3, but my 2nd (wife) is a model y. but since you all have no 2nd car... wont help me :( .. this is why i try to understand template and sending maybe the vehicleID per template to the node. |
i will open an own issue now.. i tried all kinds of stuff, but it allways falls back to the first car. |
The attached file works perfectly. I have made the modification mentioned above and added the functionality to also send the latitude and longitude of the vehicle, as I was using it and needed it. Remember to rename the file to Teslajs.js Regards. |
Hello @venomako. I've installed the node-red-contrib-tesla via the Palette Manager. Where do you find the Teslajs.js file to replace with the one you provided? I've installed Node-Red on a 'standard' Raspberry Pi image. |
What model of Tesla are you connecting to? |
IMHO it should not work, despite changes made by @venomako at least for the current models. I deinstalled this node meanwhile and decided to use the service of Teslemetry.com, which provide the exact same data as with the old API via their partner-licensed API access. |
After my vehicle (Model 3) upgraded to 2023.38.6 I noticed, that
drive_state
object is now missing the elementslatitude
andlongitude
. So you are no longer able to use the current vehicle location in Node Red.According to what I read here it might be related to a change in the API respectively, that location information was already moved to new/other endpoints (might be related to #67)?
The text was updated successfully, but these errors were encountered: