CManson Posted June 20, 2022 Author Posted June 20, 2022 On 6/20/2022 at 6:29 AM, 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. Expand So, overnight, it just started working! Thank you!
Panda88 Posted June 20, 2022 Posted June 20, 2022 On 6/20/2022 at 11:43 AM, CManson said: So, overnight, it just started working! Thank you! Expand
NYCScot Posted June 20, 2022 Posted June 20, 2022 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?
Panda88 Posted June 20, 2022 Posted June 20, 2022 (edited) On 6/20/2022 at 8:29 PM, 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? Expand 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 June 20, 2022 by Panda88
Recommended Posts