586837r / node-red-contrib-alexa-remote2

MIT License
87 stars 72 forks source link

Cannot authorise Alexa on Synology NAS #166

Open Mikee1234K opened 3 years ago

Mikee1234K commented 3 years ago

I have a Synology DS918+ NAS. I have installed docker, iobroker and node red. All working fine. But I cannot get the node-red-contrib-alexa-remote2 to authorise. I set the authorisation mode to proxy. It comes up open :3456 in your browser to authorise. That works fine on a PC. But on the NAS, I do not have a browser to go to that IP to authorise the acount. I have tried using the cookie from my PC by changing the auth method to cookie, and pasting the cookie text I had from my PC. It then says ready, and if I send a TTS, it says success but nothing comes out of my Alexas.

BeefyBeck commented 3 years ago

Hi, just came accross the same problem myself. You need to configure the node-red docker container to map the local port 3456 to the container port 3456, and instead of using localhost as the IP, use the IP address of your NAS.

FelixGaebler commented 3 years ago

@BeefyBeck this redirects to localhost:3456 in every request. There has to be another solution

Mikee1234K commented 3 years ago

I have got port 3456 in local port and container port. When authorising, I use NAS IP:3456 I have a feeling that it might be some permissioning to write the cookie file, but not sure as I am not knowledable with NAS or docker...

FelixGaebler commented 3 years ago

I solved it by setting up a ssh tunnel on that port and it via localhost on my laptop

Mikee1234K commented 3 years ago

I solved it by setting up a ssh tunnel on that port and it via localhost on my laptop

not sure how to do that

FelixGaebler commented 3 years ago

Yeah, thats one minute of google..

ssh -L [LOCAL_IP:]LOCAL_PORT:DESTINATION:DESTINATION_PORT [USER@]SSH_SERVER e.g. if you got a raspberry and its running on 192.168.0.18 ssh -L 3456:192.168.0.18:3456 pi@192.168.0.118

Mikee1234K commented 3 years ago

I am running this on a Synology NAS. I did find something on using putty to ssh into a synology. Trying to understand it and what to do. I have port forwarding for port 3456 enabled in my docker. If I open a webpage on my PC with NAS IP:3456 it wont load the page. I will see if I can set that port with putty if that works then The article is from 2011 so not sure how relevant that is now

AleksCee commented 3 years ago

On my Syno-NAS with Node-red Docker and the Proxy method it‘s work fine. Have you fill out this ip in the config proxy form to your Synology ip? And the node shows localist:3456 but I change it manual to the NAS ip and Port like @BeefyBeck and it’s work fine for me without an ssh tunnel.

Mikee1234K commented 3 years ago

I have mapped the local port 3456 to 3456 container port. In the node red alexa I specified NAS IP and port 3456. The main problem is I cannot open the web page to authorise from the NAS. If I try from another PC on the network, the page wont open (I tried NAS IP:3456)