Emulated_hue working in Docker with Echo Gen 2 & Google Home

So basically i was runing the RM Plugin on an old Android Device to get my IR codes on to Alexa as Phillips Hue Blubs. but after upgrading my last Echo Dot to a Echo gen 2 this route stopped working so i turned to Home Assistant to fill this gap, upon some research it would seemed that the emulated_hue component works by default on port 8300, but the gen 2 echo will only work with emulated_hue on port 80, and as im running Home Assistant in a docker container i had to change port on xpenology to free port 80 for the emulated_hue component .

My Set Up

Home Assistant - 0.63.0
xpenology - DSM 6.1.1-15101
HP Gen 8 Micro Server Bare Metal Install

Inside configuration.yaml

# Emulated Hue
emulated_hue:
#  listen_port: 8300
  listen_port: 80
  upnp_bind_multicast: true
  expose_by_default: false
  entities:
    switch.bedroom_tv:
      name: "Bedroom TV"
      hidden: false
    switch.bedroom_tv_volume:
      name: "Bedroom TV Volume"
      hidden: false
    switch.livingroom_tv:
      name: "Television"
      hidden: false

Getting emulated_hue on port 80 in Docker

so start a putty session up and go to the directory

cd /usr/syno/share/nginx/

in ths directory if you do a

ls -al

you should get a list of file, three of which you need to edit those are

server.mustache
DSM.mustache
WWWservice.mustache

edit these as sudo in vi and change all referance to 80 to 81

vi server.mustache then push I to go into insert mode navigate to the 2 references to 80 and change them to 81 then push ESC to exit insert mode the type :wq to quit & save do this to all three files

Now In xpenology

Go to Control Panel>>Network>>Advanced Settings>> Untick Reply TO ARP And Click OK then Apply

Now click on Advanced Settings Again An Retick TO ARP Clcik OK and agaon Apply the change

Now to Create a Reverse proxy

Control Panel>>Application Profiles>>Reverse Proxy Tab>> Create

Description = emulated_hue
protocol=http
hostname= *
port= 1234

destination

protocol=http
hostname=localhost
port=80

Click OK

now back to Putty

sudo vi /usr/syno/etc/www/ReverseProxy.json

push I to insert and find 1234 and change it to 80

the push ESC the type :wq and hit enter

now ask alexa to discover devices and all should be working aslong as you dont have to many devices to emulate and you config files are ok hope this helps some people out

with thanks to nayneyt the rigger with field engineer capabilities for his assistance :grin:

1 Like

Where did you find “hue only works on port 80”?

You are using Synology?
These are server side edits not edits in docker containers?
EDIT: figured this part out by reading again.

From people posts who run home Assistant on Raspberry Pi’s saying that they run emulated_hue on port 80 when using it with Gen 2 echo’s

Edit this was one post: Emulated Hue not seen by Amazon Echo

Hi all.

Old post, but the solution for me! Thanks a lot.

I move my HA server on RASPI to a Synology Docker HA server, and I´d the Port 80 problem.
I follow your instruction, with some litte changes:

  • In HA config file, this is my config:
    emulated_hue:
    host_ip: 192.168.1.8
    listen_port: 8300
    expose_by_default: true
    off_maps_to_on_domains:

    • scene
    • script
      exposed_domains:
    • media_player
    • script
      (I only want to expose an script for change volume of my non-alexa LG OLED TV)
  • Follow all your instruction, but my reverse proxy is:

Finally, I have to reset all my Synology system in order to free my HTTP port 80.

After that, all is working well with Alexa, and my Raspi2 will have another good life :slight_smile: