nfarina / homebridge-tesla

Tesla plugin for homebridge: https://github.com/nfarina/homebridge
155 stars 37 forks source link

Allow for additional wakeup time #10

Closed kcharwood closed 5 years ago

kcharwood commented 5 years ago

Noticed today my car climate control didn't kick on when expected. Looking at the logs, I see the following:

Feb 01 06:38:57 homepi homebridge[5440]: [2019-2-1 06:38:57] [Model 3] Using vehicle "Smurf" with state "asleep"
Feb 01 06:38:58 homepi homebridge[5440]: [2019-2-1 06:38:58] [Model 3] Using vehicle "Smurf" with state "asleep"
Feb 01 06:39:00 homepi homebridge[5440]: [2019-2-1 06:39:00] [Model 3] Using vehicle "Smurf" with state "asleep"
Feb 01 06:39:00 homepi homebridge[5440]: [2019-2-1 06:39:00] [Model 3] Waiting for vehicle to wake up…
Feb 01 06:39:01 homepi homebridge[5440]: [2019-2-1 06:39:01] [Model 3] Using vehicle "Smurf" with state "asleep"
Feb 01 06:39:01 homepi homebridge[5440]: [2019-2-1 06:39:01] [Model 3] Waiting for vehicle to wake up…
Feb 01 06:39:03 homepi homebridge[5440]: [2019-2-1 06:39:03] [Model 3] Using vehicle "Smurf" with state "asleep"
Feb 01 06:39:03 homepi homebridge[5440]: [2019-2-1 06:39:03] [Model 3] Waiting for vehicle to wake up…
Feb 01 06:39:08 homepi homebridge[5440]: [2019-2-1 06:39:08] [Model 3] Using vehicle "Smurf" with state "asleep"
Feb 01 06:39:08 homepi homebridge[5440]: [2019-2-1 06:39:08] [Model 3] Waiting for vehicle to wake up…
Feb 01 06:39:13 homepi homebridge[5440]: [2019-2-1 06:39:13] [Model 3] Using vehicle "Smurf" with state "offline"
Feb 01 06:39:13 homepi homebridge[5440]: [2019-2-1 06:39:13] [Model 3] Waiting for vehicle to wake up…
Feb 01 06:39:18 homepi homebridge[5440]: [2019-2-1 06:39:18] [Model 3] Using vehicle "Smurf" with state "offline"
Feb 01 06:39:18 homepi homebridge[5440]: [2019-2-1 06:39:18] [Model 3] Waiting for vehicle to wake up…
Feb 01 06:39:23 homepi homebridge[5440]: [2019-2-1 06:39:23] [Model 3] Using vehicle "Smurf" with state "offline"
Feb 01 06:39:23 homepi homebridge[5440]: [2019-2-1 06:39:23] [Model 3] Waiting for vehicle to wake up…
Feb 01 06:39:29 homepi homebridge[5440]: [2019-2-1 06:39:29] [Model 3] Using vehicle "Smurf" with state "offline"
Feb 01 06:39:29 homepi homebridge[5440]: [2019-2-1 06:39:29] [Model 3] Waiting for vehicle to wake up…

Looking at the code, I see you limit it to 30 seconds. Would you be willing to lengthen that, or add a config value that allows someone to set it to a longer value? Model 3 sometimes is a little stubborn waking up.

nfarina commented 5 years ago

Sure thing! I didn't realize it could take that long. Let's try increasing it to a minute and exposing a config var for those who are willing to wait longer.

nfarina commented 5 years ago

Can you give that a shot and reopen if it doesn't work for you?

kcharwood commented 5 years ago

@nfarina I left this comment based on the old 30 second implementation.

https://github.com/nfarina/homebridge-tesla/commit/8711d5a51fc8bc45f889da69ab32c3a890e96235#r32152497

kcharwood commented 5 years ago

Will keep you posted on the results 👍

kcharwood commented 5 years ago

Took 36 seconds to wake up today, so change is looking good 👍