Hue emulation: Troubleshooting - which solution is best for openhabian

Hi,
I am using openHABian on a Raspi 2B model.
Hue emulation in combination with Alexa on an Echo Dot let me switch several wall plugs until maybe September. Then it stopped working. I read about updates to the echo dots and the upcoming update to openHAB v2.5 and decided to “sit it out”.
Now I updated my openHABian to v2.5 a couple of weeks age and still the hue emulation does not work.
Now it is time to change that.
Reading through the Documentation on the “Add-ons-Integration-HueEmultaion” page (https://www.openhab.org/addons/integrations/hueemulation/) shows that the problem is addressed under the section “Troubleshooting”.

Now there are 3 options given and my question is:
Which option is to be prefered for the openHABian setup and me being a linux “copy & paste” user, not really understanding all of what I am doing there.

For me the easiest way seems to be the

port forward your openHAB installation to port 80, ( iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080 )

method (did I mention I am a copy & paste user :slight_smile: ).

I suppose I just paste it into the Raspi command line (probably with sudo up front) and it is all set!?

I am willing to try, but as I am not familiar with what I would be doing, the question is, if it would not work out for me, how do I undo this? (I would love a “copy & paste” answer :smiley:)

Thanks for help on this.

Great work and thanks a lot to the “makers/maintainers/supporter” of openHAB - you are doing a fantastic job!!! :+1:

Greetings
Eckart

To undo the iptables rule just reboot. The rule is not persistent when you only execute the rule in the command line.

Hi Matthy,

thanks fro the quick reply.
I entered “sudo iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080” on the openhabian-Raspi.
Then a first try with Hue emulation pariing activated through PaperUI did not work,
but with the “openhabianpi:8080/api/status” page und turning on the pairing on that page - it did work!

Do I understand it correctly: After a reboot the changes will be gone, but the paired devices will persist as it is only needed for the pairing itself.
Before a new hue emulation pairing, I just do it again? That`s easy enough, just something to remember!

Thanks a lot!

Best regards
Eckart

I think it’s not only needed for pairing. You have to reapply the rule after reboot.
You can do this automatically with the Debian package iptables-persistent:

apt-get install iptables-persistent

Hi Matthy,

I installed as suggested, rebooted and it seems to work!
Thanks for your help!

Eckart