Jump to content

Where to input refresh token


CManson

Recommended Posts

Posted
5 hours ago, Panda88 said:

It looks like the token does not work correctly - it could be the API has locked you out (go to www.tesla.com and try to log in) - if that is ok try to generate another refresh token.  If not recreate your credentials 

You can also try to erase the REFRESH_TOKEN entry under config - both key and token and  then restart  node server - it should auto generate the entry again.   

I think I did change the code to handle a car with no name, but we are not even getting that far here.  

So, overnight, it just started working! Thank you!

Posted

So, before it became unusable due to the authentication issues, using the PG2 node server "Tesla" I had configured programs to set the cabin temperature/defrost the vehicle depending on the outside temp. There was always a challenge in awakening the vehicle with enough time to receive the command however and it was rather hit and miss. 

@Panda88, how do you recommend configuring programs to get around this issue?

Posted (edited)
48 minutes ago, NYCScot said:

So, before it became unusable due to the authentication issues, using the PG2 node server "Tesla" I had configured programs to set the cabin temperature/defrost the vehicle depending on the outside temp. There was always a challenge in awakening the vehicle with enough time to receive the command however and it was rather hit and miss. 

@Panda88, how do you recommend configuring programs to get around this issue?

the code for wake does a loop until the  API responds (but you will not see this from the ISY.  I could possibly make the status  or climate node return a ON/OFF (a control for the  node in the ISY) so it will change state when car goes from sleep to awake) but it has not been done yet - let me think about it - I do not have a car my self to test on and I only know people say the response is fairly fast these days - 30 sec or less worst case

Also - the long poll wakes the car if a sleep so this should be a worst case scenario - you could use heart beat (short poll) at half the long poll duration and then program after a delay on either On or Off  for the heart beat - I believe the PG poll is synchronized initially  so they should happen aligned 

Edited by Panda88
Guest
This topic is now closed to further replies.

×
×
  • Create New...