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 APRS device tracker component #22469

Merged
merged 3 commits into from
Jun 11, 2019
Merged

Conversation

PhilRW
Copy link
Contributor

@PhilRW PhilRW commented Mar 27, 2019

Description:

This new APRS component keeps open a connection to the APRS-IS infrastructure so messages generated by filtered callsigns can be immediately acted upon. Any messages with certain values for the 'format' key are position reports and are parsed into device tracker entities.

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

Example entry for configuration.yaml (if applicable):

device_tracker:
  - platform: aprs
    callsigns:
      - 'XX0FOO*'
      - 'YY0BAR-1'

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.

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

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.

@syssi
Copy link
Member

syssi commented Mar 27, 2019

Yeay! First(?) hamradio component for HA! :-)

@PhilRW PhilRW changed the title Add APRS device tracker component [WIP] Add APRS device tracker component Mar 29, 2019
@PhilRW PhilRW changed the title [WIP] Add APRS device tracker component Add APRS device tracker component Mar 29, 2019
@PhilRW
Copy link
Contributor Author

PhilRW commented Mar 29, 2019

I'm trying to figure out how to pass the PlatformNotReady back to the main thread.

@PhilRW PhilRW changed the title Add APRS device tracker component [WIP] Add APRS device tracker component Apr 7, 2019
@codecov
Copy link

codecov bot commented Apr 15, 2019

Codecov Report

Merging #22469 into dev will decrease coverage by 0.3%.
The diff coverage is 75.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #22469      +/-   ##
==========================================
- Coverage   94.09%   93.78%   -0.31%     
==========================================
  Files         452      449       -3     
  Lines       36795    36618     -177     
==========================================
- Hits        34623    34343     -280     
- Misses       2172     2275     +103
Impacted Files Coverage Δ
homeassistant/components/aprs/device_tracker.py 75.55% <75.55%> (ø)
homeassistant/components/mqtt/light/schema_json.py 73.06% <0%> (-20.65%) ⬇️
homeassistant/components/mqtt/lock.py 91.83% <0%> (-8.17%) ⬇️
homeassistant/components/deconz/config_flow.py 97.77% <0%> (-2.23%) ⬇️
homeassistant/components/mqtt/vacuum.py 92.46% <0%> (-2.05%) ⬇️
homeassistant/bootstrap.py 58.08% <0%> (-1.18%) ⬇️
homeassistant/components/homekit/util.py 99.05% <0%> (-0.95%) ⬇️
homeassistant/components/mqtt/climate.py 99.43% <0%> (-0.57%) ⬇️
homeassistant/components/google_assistant/trait.py 96.36% <0%> (-0.26%) ⬇️
homeassistant/components/automation/webhook.py 95.65% <0%> (-0.19%) ⬇️
... and 153 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f89f88...f7e5a8a. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 15, 2019

Codecov Report

Merging #22469 into dev will decrease coverage by 0.5%.
The diff coverage is 75.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #22469      +/-   ##
==========================================
- Coverage   94.29%   93.78%   -0.51%     
==========================================
  Files         458      449       -9     
  Lines       37203    36618     -585     
==========================================
- Hits        35079    34343     -736     
- Misses       2124     2275     +151
Impacted Files Coverage Δ
homeassistant/components/aprs/device_tracker.py 75.55% <75.55%> (ø)
homeassistant/components/mqtt/fan.py 74.33% <0%> (-23.64%) ⬇️
homeassistant/components/mqtt/light/schema_json.py 73.06% <0%> (-20.65%) ⬇️
homeassistant/bootstrap.py 58.08% <0%> (-16.33%) ⬇️
homeassistant/components/mqtt/lock.py 91.83% <0%> (-8.17%) ⬇️
homeassistant/components/axis/device.py 93.02% <0%> (-6.98%) ⬇️
homeassistant/components/hassio/ingress.py 71.3% <0%> (-6.75%) ⬇️
homeassistant/components/deconz/config_flow.py 97.77% <0%> (-2.23%) ⬇️
homeassistant/components/mqtt/vacuum.py 92.46% <0%> (-2.05%) ⬇️
homeassistant/components/hue/bridge.py 73.07% <0%> (-1%) ⬇️
... and 178 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a89c7f8...88c9b77. Read the comment docs.

@PhilRW
Copy link
Contributor Author

PhilRW commented Apr 15, 2019

I don't quite get what's going on here with codecov. I've rebased onto the latest dev branch but it says I've changed all these files that I haven't touched in my commit(s).

@brent20
Copy link

brent20 commented Apr 15, 2019

I just wanted to drop by and add some support for this component. I was just thinking about APRS and telemetry and thought "wouldn't it be cool for Home Assistant to be able to receive and transmit telemetry on the APRS-IS network!?" Sure enough, I come to find that the community is already working on this! Thanks! @PhilRW!

@PhilRW
Copy link
Contributor Author

PhilRW commented Apr 22, 2019

Long-term we could send locations and messages to the network, but I'm starting simple with a device tracker component.

@PhilRW
Copy link
Contributor Author

PhilRW commented Apr 22, 2019

Perhaps some additional developer documentation is needed when adding a codeowner.

@PhilRW PhilRW changed the title [WIP] Add APRS device tracker component Add APRS device tracker component Apr 23, 2019
This component keeps open a connection to the APRS-IS infrastructure so
messages generated by filtered callsigns can be immediately acted upon.
Any messages with certain values for the 'format' key are position
reports and are parsed into device tracker entities.
@PhilRW
Copy link
Contributor Author

PhilRW commented Apr 26, 2019

@syssi Now that I finally have it passing CI, could you take another look? 🙂

Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

Ok to merge when tests converted from class functions to standalone functions and PlatformNotReady replaced with error logging.

@PhilRW
Copy link
Contributor Author

PhilRW commented Jun 11, 2019

Fixed.

@balloob balloob merged commit 8fcfcc4 into home-assistant:dev Jun 11, 2019
@PhilRW PhilRW deleted the component-aprs branch June 11, 2019 20:55
@frenck frenck mentioned this pull request Jun 11, 2019
9 tasks
@balloob balloob mentioned this pull request Jun 26, 2019
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