teslamotors / fleet-telemetry

Apache License 2.0
648 stars 73 forks source link

Add event for connect and disconnect #188

Open Bre77 opened 2 months ago

Bre77 commented 2 months ago

It would be a huge value to have the Fleet Telemetry server emit an event when a vehicle connects and disconnects, so that a third party service knows if a vehicle is awake or asleep/offline, and avoid polling the Fleet API when a vehicle is asleep or to find out when it wakes up.

I can see these events written to standard out, but they are not emitted through the event buses.

rileymd88 commented 2 months ago

This is already supported. If the vehicle is awake and you are subscribed to some fields then it will send data. When the car stops sending data then it is asleep

On Sun, Jul 7, 2024 at 11:38 Brett Adams @.***> wrote:

It would be a huge value to have the Fleet Telemetry server emit an event when a vehicle connects and disconnects, so that a third party service knows if a vehicle is awake or asleep/offline, and avoid polling the Fleet API when a vehicle is asleep or to find out when it wakes up.

I can see these events written to standard out, but they are not emitted through the event buses.

— Reply to this email directly, view it on GitHub https://github.com/teslamotors/fleet-telemetry/issues/188, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRFLPWIZP5DCHJIO57CQT3ZLEEARAVCNFSM6AAAAABKPGRKZWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4TGOJXGQ2TOMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Bre77 commented 2 months ago

This is already supported. If the vehicle is awake and you are subscribed to some fields then it will send data. When the car stops sending data then it is asleep

That is incorrect, certain telemetry fields are only sent under certain conditions, so when you might think a vehicle is "asleep" might actually be the vehicle in park.