Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Connection #15

Open
droidforever opened this issue Jul 26, 2017 · 6 comments
Open

No Connection #15

droidforever opened this issue Jul 26, 2017 · 6 comments

Comments

@droidforever
Copy link

droidforever commented Jul 26, 2017

I now have your node-alexa-server running on PORT 9000 on my web server. I have forwarded the incoming port 9000 to port 80. I set my endpoint in my Alexa Skill to https://mydomain.com/thermostat. I have other skills running on my domain via Alexa successfully.

When I start the server the output is:
sudo PORT=9000 node app.js
{EMPTY LINE}
there is no confirmation is that the way it should be?

Here is the line from ps -aux:
2025 4.9 0.5 991176 45816 pts/0 Sl+ 05:03 0:01 node app.js so it is for sure running
Netstat:
tcp6 0 0 [::]:9000 [::]:* LISTEN

When I try to access it on the test page I get no repsonse

I am able to browse to my thermostat with http://myserveraddress/tstat and I get a response

Am I missing something here or have I configured it wrong? Your assistance as always is truly appreciated.

@dvideby0
Copy link
Collaborator

dvideby0 commented Jul 26, 2017 via email

@bbrookfield
Copy link
Owner

bbrookfield commented Jul 26, 2017 via email

@droidforever
Copy link
Author

droidforever commented Jul 26, 2017

I feel like I'm getting closer but still not there. In the test of the application on Amazon I get "The response is invalid" where before I got no communication at all. I believe this may be some sort of port forward issue. But when I check for open ports both 9000 and 443 are open and I have port forward set for the internal address of my thermostat external nat 9000 internal 443
thermostat

Maybe I can explain this a little better. I have an independent firewall with IPFire. From that on the wired network I bridged my Linksys router. My wireless network is connected from my Linksys which is on the same subnet as IPFire. So IPFire is on 192.168.10.1 Linksys address is 192.168.10.19 and my Thermostat is 192.168.10.23. The firewall on Linksys is disabled by default when using a bridge. The Node App.js is running on my server 192.168.10.10. I hope this explanation gets me closer to reslove. Thank you for your assistance!

@droidforever
Copy link
Author

Will this work? Please I need to get this working

iptables -t nat -I PREROUTING --src 0/0 --dst 192.168.10.23 -p tcp --dport 443 -j REDIRECT --to-ports 9000

@bbrookfield
Copy link
Owner

bbrookfield commented Jul 29, 2017

you stated in your first emai
I set my endpoint in my Alexa Skill to https://mydomain.com/thermostat
When I try to access it on the test page I get no repsonse
I am able to browse to my thermostat with http://myserveraddress/tstat and I get a response

Can you browse to https://mydomain.com/thermostat/tstat from outside your network.? (Try your cell phone)

If not that is where your issue is. If you have endpoint configured as HTTPS then you have to have a SSL certificate. Amazon requires that all endpoints be HTTPS other than their own. You can use a self signing certificate for testing

https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/registering-and-managing-alexa-skills-in-the-developer-portal#h2_ssl

@droidforever
Copy link
Author

I've got it working now. Thank you again for everything especially your patience. Just stupid errors on my part with my firewall. You are the best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants