hardillb / node-red-contrib-alexa-home-skill

A Node-RED node to control things via Amazon Alexa
https://alexa-node-red.bm.hardill.me.uk/
Apache License 2.0
89 stars 42 forks source link

new-account request on config node fails #96

Closed niklas1375 closed 3 years ago

niklas1375 commented 3 years ago

I'm running node-red as an instance in my ioBroker and want to control my thermostat using the alexa-home skill.

When adding the alexa home node to my flow and enter my credentials for the service I can see in the console that it tries to POST /alexa-home/new-account which takes a long time and finally fails with an net::ERR_EMPTY_RESPONSE error.

Other HTTP requests are running through successfully (tested with the http request node).

Any help is highly appreciated, if you need further info I'll be happy to provide it. :)

niklas1375 commented 3 years ago

I do have one suspicion but can't really confirm it: I don't have a public IPv4 since my ISP uses Dual Stack lite. Could this be a connectivity issue?

hardillb commented 3 years ago

The service is IPv4 only (AWS Lightsail doesn't support IPv6) but your ISP should be running NAT64 so that shouldn't be the problem as you obviously can can access the website which is the same host as the HTTP API.

All traffic for the service is initiated from the Node-RED instance, so no need for a public IPv4 address.

Check the Node-RED logs for the time that matches the call to /alexa-home/new-account it should log an error.

Also you might need to test on pure Node-RED (not bundled into ioBroker) as I've seen issues with some of these types of deployment in the past. What URL do you use to access the Node-RED editor?

niklas1375 commented 3 years ago

Your last hint already brought me onto the right path:

Before, I accessed the editor via a port exposed by ioBroker (:1880 in my case) which opened the Node-RED editor in a separate window. This didn't work. After your hint I retried from the built-in editor which is hosted inside the ioBroker UI in an iframe from the same :1880 source.

Somehow this does work so I would guess this is an ioBroker issue and your node is working just fine. Thank you very much for the immensely fast response! Never had such a fast answer on an issue on a one-man-open-source-project :)