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 odometer event / topic #351

Merged
merged 6 commits into from
Feb 12, 2025
Merged

Conversation

ExploracuriousAlex
Copy link
Contributor

add the following topic and corresponding event:

/{user_id}/{vin}/service-event/vehicle-status/odometer

@WebSpider
Copy link
Contributor

WebSpider commented Feb 8, 2025

Thanks for your contribution 🎉

Two questions:

  • Is there any specific data structure in the event that (optionally) contains additional information which could be used to update entities?
  • Do you have any idea when the event is issued?

@ExploracuriousAlex
Copy link
Contributor Author

Unfortunately the message does not contain any valuable information. Only userId_and vin.
It gets sent twice right after ignition off.

{_version_:1__traceId_:_eec160e7-5700-4022-9c9b-f3240c6f606a___timestamp_:_2025-02-08T06:39:04.448Z___producer_:_SKODA_MHUB___name_:_vehicle-ignition-status-changed___data_:{_ignitionStatus_:_OFF___userId_:_ABC___vin_:XYZ}}
{_version_:1__traceId_:_a81de822-0dff-4439-b848-39089cac1200___timestamp_:_2025-02-08T06:39:36.639Z___producer_:_SKODA_MHUB___name_:_change-odometer___data_:{_userId_:_ABC___vin_:XYZ}}
{_version_:1__traceId_:_a81de822-0dff-4439-b848-39089cac1200___timestamp_:_2025-02-08T06:39:36.639Z___producer_:_SKODA_MHUB___name_:_change-odometer___data_:{_userId_:_ABC___vin_:XYZ}}

@ExploracuriousAlex
Copy link
Contributor Author

Added service event name for odometer (change-odometer) and test.

Copy link
Contributor

@WebSpider WebSpider left a comment

Choose a reason for hiding this comment

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

Thanks for bringing support for these topics, the PR is looking good 👍.

I do have one online question.

docs/events.md Show resolved Hide resolved
@@ -167,6 +172,7 @@ async def _connect_and_listen(self) -> None:
_LOGGER.info("Connected to MQTT")
_LOGGER.debug("using MQTT client %s", client)
for vin in self.vehicle_vins:
# await client.subscribe(f"{self.user_id}/{vin}/#")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why add this remark?

Copy link
Contributor Author

@ExploracuriousAlex ExploracuriousAlex Feb 10, 2025

Choose a reason for hiding this comment

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

It was an mistake that I left this in the commit. I'll toggle the comment to subscribe to all topics.

@ExploracuriousAlex
Copy link
Contributor Author

It drives me crazy that changes in my repo are automatically added to the pull request.

Copy link
Contributor

@WebSpider WebSpider left a comment

Choose a reason for hiding this comment

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

I will accept this with the remark in the code, we can clean it up later 🧹

@WebSpider WebSpider merged commit 3b33be6 into skodaconnect:main Feb 12, 2025
1 check passed
@WebSpider WebSpider added the enhancement New feature or request label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants