onokje / node-red-contrib-tesla

Node red nodes to control Tesla vehicles and devices
MIT License
20 stars 11 forks source link

Command setScheduldedDeparture throws TypeError: tjs.setScheduledDepartureAsync is not a function #43

Closed Michael-K-at-GitHub closed 9 months ago

Michael-K-at-GitHub commented 2 years ago

Hi, I'm building a simple solution to turn on ScheduledDeparture for one day only (which the Tesla app cannot do). My flow is a simple one: setScheduledDeparture on, wait for next day 11pm , setScheduledDeparture off

My problem: I can't get the Command setScheduledDeparture to work. The node throws TypeError: tjs.setScheduledDepartureAsync is not a function

My setup:

What would be a working json inject? Or is this a defect?

Michael-K-at-GitHub commented 2 years ago

Defect confirmed by another person here: https://discourse.nodered.org/t/node-red-contrib-tesla-setscheduldeddeparture-typeerror-tjs-setscheduleddepartureasync-is-not-a-function/57942/4

GaPhi commented 2 years ago

Use the compatible teslajs library I have updated (@gaphi/teslajs). The pull to the main branch is not available yet I think.

Le mer. 9 févr. 2022 à 00:33, Michael-K-at-GitHub @.***> a écrit :

Defect confirmed by another person here: https://discourse.nodered.org/t/node-red-contrib-tesla-setscheduldeddeparture-typeerror-tjs-setscheduleddepartureasync-is-not-a-function/57942/4

— Reply to this email directly, view it on GitHub https://github.com/onokje/node-red-contrib-tesla/issues/43#issuecomment-1033168089, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADUNWNPIDU6V6FWTWQCTBDDU2GR3HANCNFSM5N3R6HLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

Michael-K-at-GitHub commented 2 years ago

Will try that. The one in src now, pulled today?

GaPhi commented 2 years ago

In fact, the issue is in this package dependencies I think. node-red-contrib-tesla requires "teslajs-4.10.0" to have this API available (and not 4.9.11).

Michael-K-at-GitHub commented 2 years ago

Thanks a lot. Maybe a dumb question, but how do I get the changes on my node red server? Obviously if the maintainer does an update of the node, so I can update it via the node red palette. @onokje Martin, how about an update?

hitnrun30 commented 2 years ago

I may have a add on to this issue. If I set the precondition to false and then to true, the time is midnight even though I sent 450. I need to send twice to the call to get it to update.