Upnp update (#2924)

* Update to UPnP documentation

In accordance to pull request
https://github.com/home-assistant/home-assistant/pull/8067

* updated with new option

* Improved

thanks for the comments / review
This commit is contained in:
Diogo Gomes 2017-07-07 07:05:17 +01:00 committed by Paulus Schoutsen
parent dcaa29f358
commit de782ad079

View File

@ -14,22 +14,22 @@ ha_release: 0.18
The `upnp` component enables you to collect network statistics from your router such as bytes in/out and packets in/out. This information is provided by the Internet Gateway Device (IGD) Protocol if enabled on your router.
The IGD can also automatically create port forwarding mappings on your router for Home Assistant.
The IGD automatically creates port forwarding mappings on your router for Home Assistant, exposing your installation to the internet. The mapping will never automatically expire. Upon stopping Home Assistant, the mapping will be removed from your router.
Please note that UPnP or NAT-PMP needs to be enabled on your router for this component to work.
To integrate this into Home Assistant, add the following section to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
# Example configuration.yaml entry with custom external portal
upnp:
external_port: 80
```
A port mapping will be created using the IP address and port that Home Assistant is running on. The mapping will never automatically expire. Upon stopping Home Assistant, the mapping will be removed from your router.
If you which to have the statistics without having port mapping done through IGD, add the option **port_mapping**.
If you which to have the statistics without having port mapping done through IGD, add the option:
```yaml
# Example configuration.yaml entry with port mapping disabled
upnp:
port_mapping: false
```
Configuration variables:
- **external_port** (*Optional*): Expose Home Assistant to the internet over this TCP port. Defaults to Home Assistant configured port.
- **port_mapping** (*Optional*): Disables port mapping maintains the network statistics sensors)
- **unit** (*Optional*): UPnP sensors unit. Valid units are 'Bytes', 'KBytes', 'MBytes' and 'GBytes'.