Upnp properties (fix)#8294
Closed
dgomes wants to merge 19 commits into
Closed
Conversation
Latest version of miniupnpc is 2.0, but pypi only has 1.9 Fortunately it is enough
miniupnpc will do network calls, so this component can’t be moved to coroutine
If port can’t be mapped, advise user on how to disable port_mapping
|
@dgomes, thanks for your PR! By analyzing the history of the files in this pull request, we identified @robbiet480 and @fabaff to be potential reviewers. |
houndci-bot
reviewed
Jul 2, 2017
| ''.format(external_port), | ||
| title=NOTIFICATION_TITLE, | ||
| notification_id=NOTIFICATION_ID) | ||
| return False |
| except ConflictInMappingEntry as ex: | ||
| _LOGGER.error("UPnP failed to configure port mapping: %s", str(ex)) | ||
| persistent_notification.create( | ||
| hass, 'Port {} is already mapped, please disable port_mapping<br />' |
|
|
||
| except ConflictInMappingEntry as ex: | ||
| _LOGGER.error("UPnP failed to configure port mapping: %s", str(ex)) | ||
| persistent_notification.create( |
There was a problem hiding this comment.
undefined name 'persistent_notification'
|
|
||
| hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, deregister_port) | ||
|
|
||
| except ConflictInMappingEntry as ex: |
There was a problem hiding this comment.
undefined name 'ConflictInMappingEntry'
houndci-bot
reviewed
Jul 2, 2017
| upnp.deleteportmapping(hass.config.api.port, 'TCP') | ||
|
|
||
| hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, deregister_port) | ||
| persistent_notification = loader.get_component('persistent_notification') |
Contributor
Author
|
I'm creating a new branch with this fix only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Fix to previous pull request #8067
If a user already has a port_mapping in its router (either through UPnP or other means (eg. Web Interface to router) the port_mapping code will fail.
This adds a persistent notification advising users to disable port_mapping (as already explained in the documentation)
Related issue (if applicable): fixes https://community.home-assistant.io/t/upnp-new-module/20839