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

Register device for tesla telemetry #315

Conversation

0xdev22
Copy link
Contributor

@0xdev22 0xdev22 commented Apr 24, 2024

Proposed Changes

  • Implementation of tesla fleet functionality to register a vehicle for open telemetry
  • Endpoint to allow different integrations register device for Telemetry
  • Unit tests for tesla fleet open telemetry
  • Unit test for endpoint to enable telemetry/subscribe command

Impacted Routes

/user/devices/:userDeviceID/integrations/:integrationID/commands/telemetry/subscribe

Caveats

Copy link

linear bot commented Apr 24, 2024

@elffjs
Copy link
Member

elffjs commented Apr 25, 2024

Is there a way for the frontend to tell whether the config has been sent/accepted? How do they know whether to call this endpoint, I suppose is the question.

@0xdev22
Copy link
Contributor Author

0xdev22 commented Apr 25, 2024

Is there a way for the frontend to tell whether the config has been sent/accepted? How do they know whether to call this endpoint, I suppose is the question.

The status endpoint from #311 provides this information. If the virtual token is connected and the endpoint confirms it, they know to call this endpoint

@elffjs
Copy link
Member

elffjs commented Apr 25, 2024

Is there a way for the frontend to tell whether the config has been sent/accepted? How do they know whether to call this endpoint, I suppose is the question.

The status endpoint from #311 provides this information. If the virtual token is connected and the endpoint confirms it, they know to call this endpoint

After they call it once, how do they know to not call it a second time?

internal/utils/utils.go Outdated Show resolved Hide resolved
@0xdev22 0xdev22 requested a review from elffjs April 25, 2024 21:23
@0xdev22 0xdev22 changed the title Function and endpoint to register device for tesla telemetry Register device for tesla telemetry Apr 26, 2024
Base automatically changed from feature/si-2559-add-telemetry-status-to-integration-status-endpoint to feature/tesla-telemetry-main May 1, 2024 03:23
…te-endpoint-to-enable-telemetry-for-an-integration
@elffjs elffjs merged commit 2e4bad9 into feature/tesla-telemetry-main May 1, 2024
2 checks passed
@elffjs elffjs deleted the feature/si-2558-create-endpoint-to-enable-telemetry-for-an-integration branch May 1, 2024 03:56
elffjs added a commit that referenced this pull request May 1, 2024
* Add Telemetry/Subscribe command to Tesla Commands (#305)

* Move vehice command to smartcar and tesla client, add telemetry/subscribe to tesla commands

* Fix lint issues

* Fix issue from PR review

* declare commands as constants and use the values

* Feature/si 2557 create endpoint to fetch available commands (#308)

* Move vehice command to smartcar and tesla client, add telemetry/subscribe to tesla commands

* Fix lint issues

* Create endpoint for fetching all commands available to an integration

* Compute disabled from capable and enabled commands

* Change method, generate swagger and remove omitempty

* Add tesla virtual key status to integration status endpoint (#311)

* Move vehice command to smartcar and tesla client, add telemetry/subscribe to tesla commands

* Fix lint issues

* Create endpoint for fetching all commands available to an integration

* Create endpoint for fetching all commands available to an integration

* Create endpoint for fetching all commands available to an integration

* Add tesla virtual token status to integration status endpoint

* Add tesla virtual token status to integration status endpoint

* Fix failing test

* Fix issues from PR review

* Fix issues from PR review

* Fix issues from PR review

* Change name from virtual-token to virtual-key

* Register device for tesla telemetry (#315)

* Move vehice command to smartcar and tesla client, add telemetry/subscribe to tesla commands

* Fix lint issues

* Create endpoint for fetching all commands available to an integration

* Create endpoint for fetching all commands available to an integration

* Create endpoint for fetching all commands available to an integration

* Add tesla virtual token status to integration status endpoint

* Add tesla virtual token status to integration status endpoint

* Fix failing test

* Function and endpoint to register device for tesla telemetry

* Add open telemetry config to environment

* Fix issues from PR review

* Fix issues from PR review

* Fix issues from PR review

* Fix issues from PR review

* Fix issues from PR review

* Fix issues from PR review

* Change name from virtual-token to virtual-key

---------

Co-authored-by: Dylan Moreland <[email protected]>

* Try to cut down on big import diff

* More import formatting

* More imports

* Machine comment

* Multiline string for CA

* Remove some Fiber middleware we didn't use

* Weird comment formatting

* Comment for machine

* Swap order of set difference. I feel like this is more normal

* Misspelling

* More import

* More encryption

* Another machine comment

* Nolint

* Get rid of the global integration command list for now

* Clean up tests

* Kill struct

* Regen

* More Joins, some variable names

* Response wrapper

* More unmarshal cleanup

* URL join

---------

Co-authored-by: Doyin.O <[email protected]>
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.

2 participants