# Google Home example configuration.yaml entry
emulated_hue:
type: google_home
# Google Home does not work on different ports.
listen_port: 80
but the last step, I cannot make it to work:
An additional step is required to run Home Assistant as non-root user and use port 80 when using the AiO script. Execute the following command to allow emulated_hue to use port 80 as non-root user.
pi@raspberrypi:~ $ sudo setcap ācap_net_bind_service=+epā /srv/homeassistant/homeassistant_venv/bin/python3
Failed to set capabilities on file `/srv/homeassistant/homeassistant_venv/bin/python3ā (Invalid argument)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
Anyone knows whatās going on? What did I miss? Is there any other extra steps that I need to follow?
17-02-02 23:04:50 WARNING (Thread-6) [homeassistant.components.emulated_hue] Listen IP address not specified, auto-detected address is 192.168.1.111
17-02-02 23:04:55 ERROR (MainThread) [homeassistant.components.http] Failed to create HTTP server at port 80: [Errno 98] Address already in use
I have HA setup with SSL so Iām not sure why port 80 has already been usedā¦
Any pointers would be really helpful for me at this point.
When I installed php7 a while ago, it also installed apache2 and thatās why my port 80 was in usedā¦
I stopped apache2 service and restarted HA and the emulated hue component works! I can pair it with Google Home. I donāt have any lights yet but this is a good start
So I was following this thread here because I had the same problem with the command used for the AiO. I used the command you referenced here, and it seems the emulated_hue component is working (or at least broadcasting exposed domains) but all of a sudden I cannot access my front end.
Did this command change port settings to access my front end in anyway? Reason I ask is because the past couple of days, the only config changes Iāve made are with the emulated hue component. FYI - HASS is running and I can control a few things with remotes, etc. No errors in the log. Seems itās running fine but I canāt access the front end. I use letās encrypt with duck dns.
Sorry if this is vague, just curious if you had any insight.
I did try and disable the emulated hue component last night. Didnāt seem to change anything. Since HASS is running I can only assume it has something to do with letās encrypt or duckdns, Iām just not sure what.
I did try going to http:<pi ip>:8123 for a shot in the dark, and it loads the login page for the front end. But when I type the password it says itās incorrect.
I may try to renew certs with Letās Encrypt tonight but if it doesnāt work Iām at a loss. Will post a new topic at that point.
For anyone else still having this issue here is what got it working for me:
I am running the Virtualenv setup.
I was able to see the āpython3ā file was there via my Windows machine.
But apparently it is a sym-link.
I ran the following command to find the actual file:
readlink -f /srv/homeassistant/bin/python3
I got the following output:
/usr/bin/python3.4
So I ran the setcap command on the actual file location:
Failed to set capabilities on file `/usr/bin/python3.4' (Invalid argument)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
I had PiHole running on port 80, I moved it on port 81.
My readlink output for me is /usr/local/bin/python3.6
Nowā¦ If I try sudo setcap ācap_net_bind_service=+epā /usr/local/bin/python3.6 I got the error
fatal error: Invalid argument
usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ā¦ (-r|-|<capsN>) <filenameN> ]
Note <filename> must be a regular (non-symlink) file.
Iām sure that nothing is working on port 80 (sudo netstat -tulpn | grep :80). What could be my problem? Anyone could help me? Thanks!
Solved! The problem was the apostrophe before and after the cap_net_bing_service=+ep
I have to use the standard " ā " and all works.
Have a nice day!
If that seems to use a different python3.x for other services then thatās the one to use. Mine had 3.9 so
go with:- sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/python3.9