Emulated Hue for hue app

I succcessfully added emulated_hue config to my configuration.yaml:

emulated_hue:
  host_ip: 192.168.1.14
  listen_port: 80
  expose_by_default: false
  exposed_domains:
    - light
  entities:
    light.tv_ambilight:
      name: "TV Ambilight"
      hidden: false
    light.c44f33911ab2_192_168_1_128:
      name: "Lightstrip Jan"
      hidden: false

I can see these 2 devices via:
http:///api/pi/lights

But if I try to get this virtual bridge added into “HUE App” or “IConnect HUE HD” I fail (no new hue bridge found).

The plan was to make those 2 non hue lights which are well working in home assistant available for the HUE app

The Android App “Hue Essentials” at least is giving a more details error message:

Client Request(http://192.168.1.14:80/api/12345678901234567890) invalid: 404 Not Found

and thats true. If I try this URL manually, I get the same error.

A normal bridge would return:
[{"error":{"type":1,"address":"/","description":"unauthorized user"}}]

Any Idea why that is not working?

Regards
Lukas

Exactly the same issue here! I have an even simpler config:

emulated_hue: 
  listen_port: 8300

The emulated_hue seems to be working correctly when accessing http://ip:8300/description.xml or http://ip:8300/api/pi/lights, however I tested two hue apps and both did not work:

Hue maniac - shows a detected bridge at the correct ip, but shows incorrect MAC address. Connecting to the detected bridge or manually (filling in the correct MAC and ip addresses) results in a “Error, bridge not responding” message.

Hue Essentials - shows “No hue bridges found”. Using ‘Advanced’ > ‘Connect manually’ filling in the ip and port 8300, selecting ‘Philips Hue’ option, I get the same error as above:
Unexpected response from bridge. Please try again later. Client request(http://ip:8300/api/12345678901234567890) invalid: 404 Not Found

Home assistant was installed on an ubuntu virtual machine on windows. Anyone having the same issue or any idea how to solve this?

Best regards,

You still have the hue bridge right? If so, then I assume that the IP of the physical bridge is 192.168.1.14 and you choose the same IP for the virtual bridget, this can’t work. In your config host_ip should be the ip of your home assistant machine.

No 192.168.1.14 is IP of HA.

I had a look inside the code now. The so called emulated hue component is has only a few webservices implemented, most just dont exist. Only things which are used by alexa or google are implemented.
Probably this should be noted in the official documentation.
Right now it is not possible to use emulated hue as what the name could let you think :frowning:
If it would be possible this component would be so great. I myself cant code python well enough to do the job, but probably there will be some1 doing that job hopefully.

Regards

What is the IP of your physical hue bridge?

The documentation says that it is to expose HA entities to Google Home or Alexa or similar, nowhere it is mentionend that the Hue app will work with this. Why do you even want to do this?

The IPs of my physical hue bridges are irrelevant here. It is
192.168.1.4
192.168.1.13

HUE App can only handle one single bridge at once. And all of these apps can only handle lights which are compatible. So for hue these are all those zigbee compatible things like pure philips, ikea, and so on.
But with this emulated hue component, you could control all you have within home assistant. This would be super cool and perfect way to control all of them.

Ok, I understand this. But I don’t understand why you want to keep the HUE app, what do you find so good about this app?

I have the exact same issue.
Thanks to hue essentials i traced back the issue to this same error message but I have not been able to solve the issue.

any pointers ?

The Wife Acceptance Factor :slight_smile:

1 Like

Ok. My wife finds the frontend I created for Home Assistant way better than the Hue app. There she can also use the floorplan and other stuff and doesn’t need to switch to another app for this.

Hello. do you have any progress on this topic?
I face the same problem. I want to use the “hue essentials” to get ikea tradfri componets to join by using the touchlink function.

The name of this “component” is just wrong. It is not emulating the (whole) HUE System. The only implemented usecase is the alexa integration. All other apps, where you could interact with not emulated hue hubs dont work at all.
Would be cool if the software would do what the name could make you think about.

1 Like

There is a component called diyhue that allows the original hue app to connect to it and control any lights in diyhue.

I’ve just written code for diyhue that will connect to hone assistant and provide home assistant lights in diyhue. That should allow the hue app to control home assistant lights.

Details here: https://github.com/diyhue/diyHue/pull/523

Also Max has done some great work to make diyhue an add-on see here: diyHue Add-on

I know that emulated hue is a pretty straightforward addition to the config.yaml, but I’m having trouble getting it to bind to port 80. I’m using HassOS and can’t use setcap command, as it’s unavailable in the OS. Is there any method to have Alexa pick up this integration and recognize the devices (possibly on a different port, although everything says current Echoes require port 80). As a side note, I’m unable to get the integration to come up in a web request, of course because I can’t bind :80. Caddy2 seemed to have a foothold on:80 at one point and when I removed that the whole ports section disappeared from the addon.

Any advice is appreciated!

Got it working! It was the Caddy2 addon that binder the port, I’ll need to check for a new method to do http challenges with dns challenges instead.