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

Apache License 2.0
45 stars 28 forks source link

Account not connecting in Node RED #169

Closed saadqazi1994 closed 1 month ago

saadqazi1994 commented 1 month ago

Hello, I've added the skill on Alexa. It's picking up my device. On node red, I have added the pallette and configured it using the username and password for my account on your website. However, it just is not connecting in Node RED and no device is showing up in node RED. Please let me know what's the issue. Many thanks.

hardillb commented 1 month ago

Does your password contain a @ symbol? if so change your password

hardillb commented 1 month ago

If not, tell me the username and I'll have a look later

saadqazi1994 commented 1 month ago

Fireklomea

saadqazi1994 commented 1 month ago

I've tried changing the password multiple times to remove any symbols but it still isn't connecting

hardillb commented 1 month ago

Check the DNS on the machine running Node-RED can resolve both

(on with bm and one without)

Because I see no attempts to either download the devices list (over https) or connect to the MQTT broker using that username at all. I do see Amazon doing device discovery.

Also check the time is correct on the Node-RED machine

You should also check the Node-RED logs as it should log failure to connect error messages

saadqazi1994 commented 1 month ago

When I do a nslookup on the two links I am getting an ip address response for both of them. Not sure why it isn't working still.

Could it be because the docker container for node red is somehow not configured correctly and that is not allowing me to connect externally? It's been connecting fine with the home assistant palette.

saadqazi1994 commented 1 month ago

Just performed 'nslookup' command using the node red docker container and it's also resolving the websites correctly.

saadqazi1994 commented 1 month ago

I just looked through the logs and can't find any attempts at connecting to my account. It seems like it is not even trying to connect. Am I configuring it wrong? I just pulled in the node, doubled clicked on it, then clicked the + button and proceeded to enter my credentials. Thereafter, I clicked update, deployed it and hoped for the best. Am I skipping something?

hardillb commented 1 month ago

Assuming the username/password are correct yes. (make sure there is no extra whitespace before or after the username or password)

You can click on the "recycle" icon next to the devices drop down which should update the list of devices at any time. It may take a second, but it should then put your device in the drop down list

saadqazi1994 commented 1 month ago

Yea. So I tried making another account just to see that maybe my original account had a symbol in the password, but still no luck. I'll try different things today and see if I can get it running. Then I'll report back here. Thanks

saadqazi1994 commented 1 month ago

NSlookup Result, is this correct:

Non-authoritative answer:
Name:   alexa-node-red.bm.hardill.me.uk
Address: 2a05:d018:8c4:3201:34e4:429d:e434:22f

Non-authoritative answer:
Name:   alexa-node-red.bm.hardill.me.uk
Address: 34.253.228.78
hardillb commented 1 month ago

Yes, those are the correct IPv4 and IPv6 addresses respectively

saadqazi1994 commented 1 month ago

I've tried everything. I just cannot get it to connect to my account on Node RED. I do not understand why there is no attempts being made from node RED instance to connect to your website

hardillb commented 1 month ago

If you are using a relatively modern NodeJS (anything 18.x or newer iirc) release then it will default to using IPv6 if it can, so make sure route via IPv6 from the container.

saadqazi1994 commented 1 month ago

Anywhere I can get instructions for that?

hardillb commented 1 month ago

If you are running this under home assistant you will have to ask on their forums, I don't use it so can't help

saadqazi1994 commented 1 month ago

I am running it as an individual docker container

hardillb commented 1 month ago

Then you'll have to look at the docker docs, but first thing to check is if the container thinks it has a IPv6 address. Running ip a would be a starting point.

saadqazi1994 commented 1 month ago

I do not want to take up too much of your time. Could you please guide me if this means anything. Then I'll try to see if I can learn about how to route via IPv6

~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
26: eth3@if27: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    link/ether 02:42:ac:14:00:02 brd ff:ff:ff:ff:ff:ff
    inet 172.20.0.2/16 brd 172.20.255.255 scope global eth3
       valid_lft forever preferred_lft forever
hardillb commented 1 month ago

Assuming that was run inside the container...

The loopback interface has an IPv6 address, but the but eth3 doesn't (though eth3 inside a docker container seams strange...)

So IPv6 may be a red herring.

The standard Node-RED containers have curl installed, I would test if you can use curl to read the website

e.g.

curl -v https://alexa-node-red.bm.hardill.me.uk/
saadqazi1994 commented 1 month ago

I tried everything I could but could not get Node RED to connect correctly in the docker container. I just ended up installing node red using apt and now it's working. Thanks again for the help. I still need more experience to configure it correctly using docker