Hello Community.
My Problem in short:
I am using OpenHAB 2.3 running on Debian GNU/Linux 9.5 (stretch). I am using OpenHab in combination with the Hue-Emulation because i want to control my KNX installation with an Amazon Echo Dot and Amazon Echo both 2nd gen. The Echo devices do not find the Hue emulated items.
I have never wrote a post in such a forum so i am sorry if something is not formatted the right way. I try to fix it.
I do not want to use the OpenHab Cloud connector.
I already read at least 5 forum posts regarding this topic and this is what i already tried:
-
I checked if the Hue Emulation binding offers the Items to the network. I did this with:
http://ip-of-OH-server:8080/api/testuser/lights?debug=true
It shows me my Hue Emulated items⊠this works. -
I found out, that the Echo devices are using Port 80 to discover Hue Bridges/Hue Emulated Items.
My first solution was to edit the iptables of my pc, i did this with:
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
Then i set the âoptional discovery web portâ of the Hue Emulatin settings to â80â.
Then i saved everything and Alexa was able to find the Hue Emulated items, but it stopped working after one day so deleted everything regarding iptables.
Then i tried to change the OpenHab Port from 8080 to 80 in which i already succeeded. The OpenHab log-file : âtail -f var/log/openhab2/openhab.logâ shows:
âŠstarted Dashboard at http:///ip-of-OH-server:80
Confirmed this further with
âsudo netstat -atn | grep 80â
and it showed me fitting results.
To compare with:
âsudo netstat -atn | grep 8080â
gave no output/results.
Then i let Alexa search for new devices⊠nothing foundâŠ
Then i did the following:
In the File â/etc/default/openhab2â i changed
â#OPENHAB_USER=openhabâ
â#OPENHAB_GROUP=openhabâ
to
â#OPENHAB_USER=rootâ
â#OPENHAB_GROUP=rootâ
I kept the â#â, donât know if this is relevant.
In the same file i changed
â#OPENHAB_HTTP_PORT=8080â to
â#OPENHAB_HTTP_PORT=80â
Then i executed
systemctl daemon-realod and
systemctl restart openhab2 and
systemctl restart openhab2.service
(is there a difference between the last two commands?)
After that Alexa did not found new DevicesâŠ
ThenâŠ
I went to â/usr/share/openhab2/runtime/bin/â and edited the file âsetenvâ and changed:
if( ! -z $(OPENHAB_HTTP_PORT ); then
HTTP_PORT=$(OPENHAB_HTTP_PORT)
else
HTTP_PORT=8080
fi
to
if( ! -z $(OPENHAB_HTTP_PORT ); then
HTTP_PORT=$(OPENHAB_HTTP_PORT)
else
HTTP_PORT=80
fi
Then i executed
systemctl daemon-realod and
systemctl restart openhab2 and
systemctl restart openhab2.service
I hope i didnât forgot anything⊠I have worked the last 10h over 2 days on that and maybe i am missing something obvious.
With this Post i summed up at least 5 different related posts which i have read.
Thanks
EDIT:
I dont think that there is another service running on port 8080, its a PC only for OH