My Home Assistant setup uses nginx to proxy the web interface to HTTPS. I bought a Google Assistant for black friday and I want it to be able to control my lights... I haven't tested it yet but I figure I may as well start doing some setup!
The Home Assistant docs say that the emulated_hue component needs to run on port 80. This won't work by default because it doesn't have root permissions. I also didn't want to grant python the ability using cap_net_bind. My solution in the end was to create a NAT firewall rule on my server (see the end of this post). This takes anything that comes in via TCP on port 80 and redirects it to port 8300 (which is the port that Home Assistant was told to use for the emulated hue).
The issue with this is that nothing else that uses port 80 will work anymore - in particular nginx pages such as pi-hole. I figured I could just run pi-hole through HTTPS!
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8300
and for localhost redirects too (optional):
sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 8300
To remove these rules:
iptables -t nat --line-numbers -n -L
My Home Assistant setup uses nginx to proxy the web interface to HTTPS. I bought a Google Assistant for black friday and I want it to be abl...
I have been working on a MATLAB Simulink based Alamouti testbed for USRP software defined radio. I am using the Ettus B210. I have impleme...
For a project we are working on we invested in a ThorLabs KPA101 Position Aligner and a very sexy looking piezo actuated mirror mount as wel...
I have been working on a laser diode bias driver for a while now, in line with my latest research project. ThorLabs recently released some g...