Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vehicle to tesla telemetry server with tests #285

Closed
wants to merge 6 commits into from

Conversation

0xdev22
Copy link
Contributor

@0xdev22 0xdev22 commented Mar 22, 2024

Proposed Changes

The PR adds the following:

  • Fleet API function to help register a vehicle with the tesla telemetry endpoint
  • Add vehicle to telemetry server once Tesla registration is done
  • Add complete set of fields to be reported in telemetry
  • Test to verify how tesla telemetry API is being called
  • Add non-secret config data to environment variables

Impacted Routes

/user/devices/:userDeviceID/integrations/:integrationID [post]

Caveats

Copy link

linear bot commented Mar 22, 2024

@0xdev22 0xdev22 requested a review from a team March 22, 2024 21:40
}
for _, v := range fields {
r.Config.Fields[v] = Interval{
IntervalSeconds: 1800,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Future thoughts - I see there are a lot of different fields. Should we like register different telemetry servers for different fields with different intervals.. Like getting location every 30 seconds but less varying/important data every 1800s (30m) seems fine. I don't know what the limitations of their API is either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a good observation. We can use thesame server though and just change the interval for the ones that are more important, of course we will have to determine which ones are more important.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesReate we can specify a different config on a per-vehicle basis.

@0xdev22 0xdev22 requested a review from JamesReate March 27, 2024 16:07
@0xdev22 0xdev22 requested a review from KevinJoiner March 27, 2024 16:25
@0xdev22 0xdev22 closed this Apr 5, 2024
@0xdev22 0xdev22 reopened this Apr 5, 2024
@0xdev22 0xdev22 marked this pull request as draft April 5, 2024 20:37
@@ -72,7 +73,7 @@ func (udc *UserDevicesController) deleteDeviceIntegration(ctx context.Context, u
if err != nil {
return err
}
defer tx.Rollback() //nolint
defer tx.Rollback() // nolint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having no space here is correct. It's a comment for machines.

@0xdev22 0xdev22 changed the base branch from main to feature/tesla-telemetry-main April 18, 2024 07:12
@elffjs
Copy link
Member

elffjs commented Apr 28, 2024

Trying to tell the difference between this and #315

Base automatically changed from feature/tesla-telemetry-main to main May 1, 2024 19:24
@elffjs elffjs closed this May 5, 2024
@elffjs elffjs deleted the feature/si-2505-tesla-fleet-telemetry-server branch October 10, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants