Skip to content

Webhook for Traccar#24762

Merged
MartinHjelmare merged 22 commits intohome-assistant:devfrom
escoand:traccar_webhook
Aug 9, 2019
Merged

Webhook for Traccar#24762
MartinHjelmare merged 22 commits intohome-assistant:devfrom
escoand:traccar_webhook

Conversation

@escoand
Copy link
Copy Markdown
Contributor

@escoand escoand commented Jun 25, 2019

Breaking Change:

Nothing.

Description:

I've created a webhook integration for the Traccar Mobile Client. The same protocol is used by Osmand. Traccar is the simplest GPS tracker on the market and Osmand is one of the most advanced open source navigation apps for Android.

Related issue (if applicable): #24772

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#10090

Example entry for configuration.yaml (if applicable):

none

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@ghost
Copy link
Copy Markdown

ghost commented Jun 25, 2019

Hey there @ludeeus, mind taking a look at this pull request as its been labeled with a integration (traccar) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

@escoand escoand changed the title Traccar webhook Webhook for Traccar and Osmand Jun 25, 2019
@balloob
Copy link
Copy Markdown
Member

balloob commented Jun 26, 2019

@escoand
Copy link
Copy Markdown
Contributor Author

escoand commented Jun 27, 2019

Thanks, but I'm focused on the Mobile Traccar Client. Especially the Android one.

@escoand
Copy link
Copy Markdown
Contributor Author

escoand commented Jul 16, 2019

@balloob I stumbled over #17782 and #19648 - is there any simple to use component (similar to webhook) planned for HTTP GET requests?

@balloob
Copy link
Copy Markdown
Member

balloob commented Jul 16, 2019

Since Traccar is open source, I suggest you contribute support for POST requests.

@escoand
Copy link
Copy Markdown
Contributor Author

escoand commented Jul 17, 2019

OK, I'll create an issue for Traccar. But this doesn't answer my question.

@escoand
Copy link
Copy Markdown
Contributor Author

escoand commented Jul 18, 2019

@balloob I've looked into the traccar code once more and realized they use POST request but the values as URL parameters. Is this working with the webhook component?

@escoand
Copy link
Copy Markdown
Contributor Author

escoand commented Jul 18, 2019

Obviously yes. I've implemented and tested it with wget in this way. Just saw the URL parameters in the code and concluded at GET request without verifying it.

So I have to verify Osmand as well.

@MartinHjelmare
Copy link
Copy Markdown
Member

@escoand are you planning to finish here?

@escoand
Copy link
Copy Markdown
Contributor Author

escoand commented Aug 8, 2019

@MartinHjelmare For me the integration seem production ready. Only the tests are failing because of my comment above. Can you help me here?

@escoand escoand changed the title Webhook for Traccar and Osmand Webhook for Traccar Aug 8, 2019
@frenck
Copy link
Copy Markdown
Member

frenck commented Aug 8, 2019

@escoand Format the code using Black, that should make it pass.

escoand and others added 5 commits August 9, 2019 19:17
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Looks good!

@MartinHjelmare MartinHjelmare merged commit dc5c178 into home-assistant:dev Aug 9, 2019
@escoand escoand deleted the traccar_webhook branch August 10, 2019 18:42
@balloob
Copy link
Copy Markdown
Member

balloob commented Aug 20, 2019

This PR forgot to add translations for the config flow.

@balloob
Copy link
Copy Markdown
Member

balloob commented Aug 20, 2019

Added in #26089

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants