Upnp not working anymore on Development env

Hello All,

This take me quite some time today to understand why my Upnpcontrol addons what not working anymore on my Dev environment.

After looking to it, I want to make this post if someone experience the same issue.
The symptom is that UpnpControlHandlerFactory does not initialized because of dependency unsatisfied. The dependency in question is UpnpService coming from the org.jupnp package.

I first think of course of a missing bundle in the Run Requirements / Run Bundles.
But everything was there : io.transport.upnp, discovery.upnp, and of course org.jupnp

Enabling dependency tracing, I see that UpnpServiceImpl can not be start because of another missing dependencies:

19:53:50.458 [DEBUG] [org.jupnp.UpnpServiceImpl ] - bundle org.jupnp:3.0.3 (176)[org.jupnp.UpnpServiceImpl(326)] : Dependency not satisfied: UpnpServiceConfiguration

I’ve also notice this line:

19:53:50.453 [INFO ] [.OSGiUpnpServiceConfigurationEnabler] - OSGiUpnpServiceConfiguration not enabled by class org.jupnp.OSGiUpnpServiceConfigurationEnabler

And in bundle list this strange error:

org.openhab.core.io.transport.upnp.internal.UpnpIOServiceImpl in bundle 175 (org.openhab.core.io.transport.upnp:5.1.0.202510090252) enabled, 1 instance.
Id: 324, State:UNSATISFIED REFERENCE
org.jupnp.OSGiUpnpServiceConfiguration in bundle 176 (org.jupnp:3.0.3) disabled, 0 instances.
org.jupnp.util.SpecificationViolationReporterConfig in bundle 176 (org.jupnp:3.0.3) enabled, 1 instance.
Id: 327, State:ACTIVE

The important part was OSGiUpnpServiceConfiguration in bundle 176 (org.jupnp:3.0.3) disabled

After looking the code of this class, I realize that I’ve got a configuration file in my userdata directory.

C:\eclipse\openhab-main\git\openhab-distro\launch\app\runtime\userdata\config\org\jupnp.conf

This file content was:

:org.apache.felix.configadmin.revision:=L"2"
autoEnable=“false”
service.pid=“org.jupnp”
threadPoolSize=“20”

I don’t really know why I’ve got this file, don’t see to come from the git repos.
But after setting back the value of autoEnable to true, everything work again correctly.

Laurent.

Try installing the UpnP controller binding from main distribution; it may pull in and install the missing feature. Or the Hue binding would work as well.

As said, this was not a dependency issue.
But just a wrong configuration files on my computer.
I made the post to warn about it if someone come into the same issue.

Laurent.

I have just run into the same issue.

My Samsung TV binding stopped detecting the TV on state, which depends on UPNP discovery.

The TV is still advertising the service, but OH is no longer discovering it. I was just about to start digging in to troubleshoot - because we have had visitors all Thanksgiving weekend.

Hopefully this is it.

I can’t find a “jupnp.conf” file - but I’ll keep looking.

But just to confirm your findings- UPNP is broken on the latest few daily builds of OH 5.1.

UPDATE:

I found the following

nick@OpenHab2-Host:/var/lib/openhab/config/org$ cat jupnp.config
:org.apache.felix.configadmin.revision:=L"2"
asyncThreadPoolSize="30"
felix.fileinstall.filename="file:/var/lib/openhab/etc/org.jupnp.cfg"
multicastResponsePort="0"
service.pid="org.jupnp"
threadPoolSize="15"
nick@OpenHab2-Host:/var/lib/openhab/config/org$ cat /var/lib/openhab/etc/org.jupnp.cfg
multicastResponsePort=0
asyncThreadPoolSize=30
threadPoolSize=15
nick@OpenHab2-Host:/var/lib/openhab/config/org$

But no “autoStart” setting, and the issue may be slightly different. It seems that UPNP initially works, but then stops a few minutes later.

so something is going on. Hopefully I’ll have time to dig into it tomorrow.

Hello Nicholas,

Just to make it clear, I don’t think my issue is linked to an update to a recent daily builds.
It happens on my dev machine, and I don’t find explanation about where this file is coming from, and why it was set to disable inside. Perhaps your issue is just different from mine.

Laurent