nfarina / homebridge-tesla

Tesla plugin for homebridge: https://github.com/nfarina/homebridge
154 stars 38 forks source link

Excessive logging of vehicle state #51

Closed aaronenberg closed 2 years ago

aaronenberg commented 3 years ago

Thanks for the awesome plugin. All the accessories in the Home app are functioning as expected after playing with the names a bit.

One thing that's bugging me is the repeated log messages of the vehicle state in getVehicle which is called repeatedly and thus fills the log with the same message. Ideally this would be logged only once until the state changed and then again when awakened. Here's what is logged after opening the room I made for my Tesla accessories in the Home app and then turning the connection on. If anyone can work on this that'd be much appreciated. Thank you again for this great plugin.

[11/4/2020, 8:15:21 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:21 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:21 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:21 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:21 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:21 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:22 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:22 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:22 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:22 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:22 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:28 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:28 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:28 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:28 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:28 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:28 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:29 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:29 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:29 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:29 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:29 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:30 AM] [my] Waking up vehicle.
[11/4/2020, 8:15:30 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:30 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:30 AM] [my] Waiting for vehicle to wake up...
[11/4/2020, 8:15:32 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:32 AM] [my] Waiting for vehicle to wake up...
[11/4/2020, 8:15:34 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:34 AM] [my] Waiting for vehicle to wake up...
[11/4/2020, 8:15:38 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:38 AM] [my] Waiting for vehicle to wake up...
[11/4/2020, 8:15:43 AM] [my] Using vehicle "009237" with state "asleep"
[11/4/2020, 8:15:43 AM] [my] Waiting for vehicle to wake up...
[11/4/2020, 8:15:48 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:49 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:49 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:49 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:49 AM] [my] Charging? false
[11/4/2020, 8:15:49 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:49 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:50 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:50 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:50 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:50 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:50 AM] [my] Remote start active? false
[11/4/2020, 8:15:50 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:50 AM] [my] Using vehicle "009237" with state "online"
[11/4/2020, 8:15:50 AM] [my] Climate on? false
nfarina commented 2 years ago

Fixed in the latest release!