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

Disable creating port mappings from UI, add discovery from component #18565

Merged
merged 4 commits into from Dec 21, 2018

Conversation

@StevenLooman
Copy link
Contributor

StevenLooman commented Nov 18, 2018

Description:

Disable creating port mappings from UI (see #17937)
Add discovery from component (see #17400)
Upgrade to async_upnp_client==0.13.3 to support async discovery
Possible fix for #18066: SSL being required when talking to non-SSL-enabled services

Related issue (if applicable):
fixes #17937, fixes #17400

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

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.
  • New files were added to .coveragerc.
@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Nov 18, 2018

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Nov 19, 2018

Please do not merge. I'm not happy with the state of the flow.

@frenck

This comment has been minimized.

Copy link
Member

frenck commented Nov 19, 2018

Please do not merge. I'm not happy with the state of the flow.

Please add WIP: to the title in that case...

@MartinHjelmare MartinHjelmare changed the title Disable creating port mappings from UI, add discovery from component WIP: Disable creating port mappings from UI, add discovery from component Nov 20, 2018

@StevenLooman StevenLooman requested a review from home-assistant/core as a code owner Nov 24, 2018

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Nov 24, 2018

@dgomes Please review. Any comment is welcome.

The component has been rewritten to use the DiscoveryFlowHandler, simplifying things for the component itself. Also, now the component creates a device in the device registry, which the sensors are using/reporting.

@StevenLooman StevenLooman changed the title WIP: Disable creating port mappings from UI, add discovery from component Disable creating port mappings from UI, add discovery from component Nov 24, 2018

@dgomes

dgomes approved these changes Nov 24, 2018

Copy link
Member

dgomes left a comment

LGTM!

Show resolved Hide resolved homeassistant/components/upnp/__init__.py Outdated
@balloob

This comment has been minimized.

Copy link
Member

balloob commented Nov 27, 2018

I think that we need to login to Lokalise to remove the no longer needed translation keys. Just removing the files won't help as they are not the source of truth.

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Nov 28, 2018

I think that we need to login to Lokalise to remove the no longer needed translation keys. Just removing the files won't help as they are not the source of truth.

I don't get what you're trying to say.

I removed the files as these were:

  1. incomplete for most languages, and
  2. no longer up to date, and
  3. Not added by me. I.e., new (and better, given these were obsolete/not up to date) translations are added by others.
@balloob

This comment has been minimized.

Copy link
Member

balloob commented Nov 28, 2018

Changing the translation files has no effect at all. We just run script/translations_download and they will be back, because Lokalise is the source of truth.

@balloob

This comment has been minimized.

Copy link
Member

balloob commented Nov 28, 2018

And because the are no longer up to date because you changed the keys, you have to log in to Lokalise and update them there

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Nov 28, 2018

Ok, thank you for explaining. I've joined the backend project. It seems that I cannot change any keys in Localise.
I will add (new) translations for the component when possible.

@wafflebot wafflebot bot removed the in progress label Nov 28, 2018

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Nov 28, 2018

Wrong button...

@StevenLooman StevenLooman reopened this Nov 28, 2018

@wafflebot wafflebot bot added the in progress label Nov 28, 2018

@dgomes

This comment has been minimized.

Copy link
Member

dgomes commented Dec 5, 2018

@StevenLooman you need to remove the translations from the PR in order for this PR to be merged

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Dec 6, 2018

Done!

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Dec 7, 2018

Minor fix to async_upnp_client.

@dgomes

This comment has been minimized.

Copy link
Member

dgomes commented Dec 7, 2018

@StevenLooman make sure you remove the commits that remove the translation files

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Dec 9, 2018

Can we restart travis? @dgomes
It seems something unrelated has failed.

@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Dec 9, 2018

Restarted the job.

@balloob

This comment has been minimized.

Copy link
Member

balloob commented Dec 10, 2018

This PR now removes translations instead of not changing them in this PR.

@StevenLooman StevenLooman force-pushed the StevenLooman:igd_discovery branch from 460ed89 to ca9b1e6 Dec 10, 2018

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Dec 10, 2018

I must have mis-read @dgomes' comment. I can only remove the commit which deleted the translations, not which altered them as it contains more changes.

Is this mergable now?

@StevenLooman StevenLooman force-pushed the StevenLooman:igd_discovery branch from 4fbe059 to 4a06064 Dec 10, 2018

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Dec 10, 2018

I've re-applied all the changes. No translations are touched.

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Dec 12, 2018

Anything I can do?

(DOMAIN_UPNP, self.unique_id)
},
'name': self.name,
'via_hub': (DOMAIN_UPNP, self._device.udn),

This comment has been minimized.

@balloob

balloob Dec 14, 2018

Member

I see that you register a via_hub here but that device is not created anywhere ?

This comment has been minimized.

@StevenLooman

StevenLooman Dec 14, 2018

Contributor

It is created in the upnp component itself

@StevenLooman StevenLooman force-pushed the StevenLooman:igd_discovery branch from 8426a51 to 65d9709 Dec 14, 2018

@dgomes dgomes merged commit 501b3f9 into home-assistant:dev Dec 21, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.01%) to 92.874%
Details

@wafflebot wafflebot bot removed the in progress label Dec 21, 2018

@StevenLooman

This comment has been minimized.

Copy link
Contributor

StevenLooman commented Dec 21, 2018

Thanks!

mxworm added a commit to mxworm/home-assistant that referenced this pull request Dec 22, 2018

Merge branch 'dev' into current
* dev: (22 commits)
  Update yale smart alarm client to v0.1.6 (home-assistant#19495)
  Add deprecation warning (home-assistant#19515)
  Restore state for zha binary_sensors on restart. (home-assistant#19314)
  Add ZHA battery sensor (home-assistant#19363)
  Clean up RFLink tests and add two tests (home-assistant#19511)
  Allow scrape sensor to retry setting up platform if initial setup fails (home-assistant#19498)
  Add Lutron Homeworks component (home-assistant#18311)
  Disable creating port mappings from UI, add discovery from component (home-assistant#18565)
  Bumped version to 0.84.6
  Remove check if base url is local (home-assistant#19494)
  Remove check if base url is local (home-assistant#19494)
  Bumped version to 0.84.5
  Bump pyharmony (home-assistant#19460)
  Bumped version to 0.84.4
  Use web sockets for Harmony HUB (home-assistant#19440)
  Fix IHC config schema (home-assistant#19415)
  Updated frontend to 20181211.2
  Bumped version to 0.84.3
  Fix not being able to update entities (home-assistant#19344)
  Fix restore state for manual alarm control panel (home-assistant#19284)
  ...

dshokouhi added a commit to dshokouhi/home-assistant that referenced this pull request Dec 25, 2018

Disable creating port mappings from UI, add discovery from component (h…
…ome-assistant#18565)

* Disable creating port mappings from UI, add discovery from component

* Remove unused constant

* Upgrade to async_upnp_client==0.13.6 and use manufacturer from device

* Upgrade to async_upnp_client==0.13.7

@StevenLooman StevenLooman deleted the StevenLooman:igd_discovery branch Jan 8, 2019

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

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