UPNP new module?

Hi

Just upgraded to 0.48 in my virtualenv on my PI and I encounter an issue with new PNP module. I just declared upnp: in my config file and restarted but HA tells me invalid config and I have that in logs:

2017-07-02 13:11:49 ERROR (MainThread) [homeassistant.setup] Error during setup of component upnp
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/setup.py", line 190, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/upnp.py", line 71, in setup
    external_port, 'TCP', host, internal_port, 'Home Assistant', '')
Exception: ConflictInMappingEntry

The most strange is that it has well added at main page of HA stats of my main Interner router :wink:

Thanks

Vincèn

I don’t know whether this will fix it, but the upnp component automatically tries to forward ports. You can disable that functionality (and still get the stats) by using:

upnp:
  port_mapping: false

Well that error means that some other device is already mapping the requested port.

As @tbrasser put it, just add the port_mapping to false and the stats should work.

In fact sorry if my first message was confusing but stats are already working :wink: I was just confused by the error message in log but I did what you said and now it’s silent and stats are still working !
A way to personalise name of stats ? as I have IGD Packets received/sent… I have already defined my internet box in my config file but it doesn’t look to use that name for upnp stats :frowning:

You can do stuff like that with the component: template sensor
As far as I know, if you only want to change the title of the sensor you can use the customize feature of home assistant instead of the template components.

1 Like