[hueemulation] Could not send UPNP response

I have started to play around with Hue emulation. Mainly because I found some nice features I want to use in my entire system.
However after installing the binding, I get the following error:

Could not send UPNP response: Cannot assign requested address (sendto failed)

As I have read that it uses port 1900 and 5000. But these ports are not in use. What am I doing wrong?

What version of openHAB?

Also what are you connecting to the hue emulation?


And I’m trying to connect the original Hue App. But this error happens right after starting the bundle and then periodically. Even before I’m trying to connect

What I have tried since then:

  • I have redirected openHAB to port 80.
  • Tried restarting the bundle, openHAB, etc…

Also I’m using TasmoAdmin to manage my Tasmota lights, it is running in a Docker on port 8081, but since this, it stopped working (looks like it also uses alternative ports).

I am unfortunately not familiar with connecting to the hue app using the emulation. I use emulation to connect alexa.

From your post it implies just clicking install gives that error ? Have you stopped openHAB cleared cache then restarted?

Just having the binding installed should give no errors generally.

Yes. Right after the first install, it started…
Now I even removed the binding, but the UPNP client is still there and giving these errors

If you install HUE binding and HueEmulation IO-Service this might cause trouble.
Hue binding is not particularly good written und bombs HueEmulation with create-user requests.

Apart from that: If IPv6 is disabled, the current HueEmulation release stops working. Fixed in a non released version.

If you want to use the Hue App: You MUST enable https via a reverse proxy for example (nginx) and you MUST use a certificate where the subject is the mac address of your system. This is a Hue requirement. Should be documented.

Cheers, David

1 Like


That’s good to know. However only the Hue Emulation is installed right now.
I saw that commit about these IPv6-v4 problem. I didn’t explicitly disabled IPv6, but I don’t use them in my network. So this error can be thrown by this?

Also after uninstalling it, to get rid of the errors, I still get these, looks like the UPNP client is still running…

HueEmulation includes a small UPNP Server not client. And that service belongs to the HueEmulation bundle. After uninstallation everything related should be gone. But I can’t do anything about Karaf, openHAB, OSGI problems of course.

Check the log if the addon is really gone. Maybe a jar file still sits somewhere?

Thanks. A restart solved it. Anyway are you aware of some tutorial showing how could I setup this with the Hue App?

Hey there, after Updating to OH 2.5 on my Raspberry, I got the same issue.
I’m trying to enable some .items to be able to be switched by my Logitech Harmony, which worked fine on 2.4.
Now my Harmony App is unable to be paired with the emulated Hue.

The OH is completely blank, except Hue Emulation.
I tend to get:

[io.hueemulation.internal.ConfigStore] - Using discovery ip a02:908:a62:c600:6a3a:8af0:2e88:512a%wlan0 which is the IPv6 of my Pi
[ueemulation.internal.upnp.UpnpServer] - Could not send UPNP response: Network is unreachable (sendto failed)

I tried to use the local IPv4 of my Hab as optional discovery address, which seems to be ignored, as well as disabling the use of “IPv6 if available” in the system settings of OH.

Is there furthermore anything I missed setting up ?
Thanks in advance

There was an update to the hueemulation binding to 2.5.4 just over a week ago I reckon. Try to upgrade to that by either uninstalling-reinstalling or upgrading the whole OpenHAB. This will make hueemulation run on IPv4 addresses again, which should help already.
Nevertheless I kept getting the same UPNP error every once in a while and it took me some time to find out that I had to put in a manual discovery address inside PaperUI/Services/IO/Hueemulation/Optional Discovery address - the own address of my RPI. If left blank, it seemed that Hueemulation took as an address and perhaps that’s why it probably threw the error message.

I found a solution that works for me. I was getting the “Could not send UPNP response” error every 2 minutes. I worked on this for 2 weeks. This is the fix I found:

  1. In Paper UI, go to Configuration | Services and choose the Hue Emulation.
  2. Click on the “Configure” button for the Hue Emulation.
  3. Scroll down to “Optional Discovery Address” (is it blank? it was for me).
  4. In this field, type the address of your Hue Hub.
  5. Click Save

This fixed the repeated error.

An additional problem I have is that at startup, the Hue Emulation would lose the Hue Hub IP address every time. I don’t know if this fix it, but I am hoping so.


Great, this fixed the repeated error for me too :+1: