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

Apache License 2.0
45 stars 28 forks source link

Can't get Node-Red to connect. #113

Closed muzs1 closed 3 years ago

muzs1 commented 3 years ago

I'm not sure what I am doing wrong. Node-Red is just stuck on reconnecting, I can't see any errors in the Node-Red logs or if I attach a debug to I I also see nothing. I have left it for some time and still nothing. My username is Muzs1 Thanks

hardillb commented 3 years ago

You need to make sure you only have one config node (where you enter the username/password) shared between all the device nodes.

You can check the config nodes by clicking on "Configuration nodes" from the menu in the top right hand corner. You are looking for instance of google-home-conf

You can also only use the account with a single instance of Node-RED.

muzs1 commented 3 years ago

I do only have it added once, it is showing as alexa-home-conf.

muzs1 commented 3 years ago

I have also attempted creating a brand new account and signing it in only once to this one Node-Red. I get the same thing, it just sits at reconnecting I don't think it ever makes a connection.

hardillb commented 3 years ago

Sorry, it should have said alexa-home-conf

I can't even see you trying to connect at the moment. Can you supply a bunch more information.

hardillb commented 3 years ago

What is the username for the new account?

hardillb commented 3 years ago

Also what is your current public IP address?

muzs1 commented 3 years ago

core-2021.1.5 supervisor-2021.01.7 Home Assistant OS 5.10 Node-RED version: 8.0.1 node-red-contrib-alexa-home-skill V0.1.19 IP 86.164.190.65

No Devices are showing in the dropdown No proxy required to get out to the web.

muzs1 commented 3 years ago

The second account was murreyalexa

hardillb commented 3 years ago

8.0.1 is not a valid Node-RED version, the latest version 1.2.7.

Neither of those usernames have tried to connect to the broker today or the API from the nodes point of view.

If you are not seeing the devices in the drop down then you either have made a typo in your usename/password or for some reason your Home Assistant machine is failing to resolve the hostnames used by the service.

Open your browser console and then click on the refresh button next to the device list. Look at the network tab and see if it's showing a DNS error or a timeout or a 401 authorisation error.

I'm going to guess that Home Assisant OS is doing something strange here, it has broken things in the past. Check you can resolve the following 2 hostnames from the command line on that machine.

Both need to resolve to the correct addresses for the service to work.

muzs1 commented 3 years ago

Yes it is V1.2.7 and I am using Home Assisant OS

I can't find the network tap in Node-Red but am getting the following if I ping from my PC.

Pinging alexa-node-red.bm.hardill.me.uk [34.253.228.78] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out.

Pinging alexa-node-red.hardill.me.uk [34.240.81.189] with 32 bytes of data: Reply from 34.240.81.189: bytes=32 time=35ms TTL=225 Reply from 34.240.81.189: bytes=32 time=30ms TTL=225 Reply from 34.240.81.189: bytes=32 time=20ms TTL=225 Reply from 34.240.81.189: bytes=32 time=21ms TTL=225

hardillb commented 3 years ago

Where are you running Home Assistant? You need to run that test on that machine. It may mean logging in with ssh.

Also you have not included any information about what happens when you click on the refresh button (the arrows in a circle next to the device dropdown).

muzs1 commented 3 years ago

I am running the OS in a VM. Nothing happens when I click the refresh the list remains blank and I don't see any errors.

hardillb commented 3 years ago

Please read what I asked earlier, I asked you to open the browser console and check the network tab when you clicked on the refresh link.

You need to test the name resolution inside the VM. This very much sounds like a problem with your Home Assistant OS setup.

muzs1 commented 3 years ago

I am new to Home Assistant, I can't find any network tab when I click on the refresh device button.

When I go a nslookup from the VM running Home assistant I am getting the following.

name: alexa-node-red.bm.hardill.me.uk Address: 34.253.228.78 server can't find alexa-node-red.bm.hardill.me.uk : SERVFAIL

name: alexa-node-red.hardill.me.uk Address: 34.240.81.189 server can't find alexa-node-red.hardill.me.uk : SERVFAIL

I am also only able to ping alexa-node-red.hardill.me.uk

hardillb commented 3 years ago

The network tab will be in the developer console for what ever browser you are using to access the Node-RED front end. On Chrome and Firefox this can be accessed by hitting F12.

As I've said this sounds like a problem with Home Assistant OS which I don't use and has been known to cause problems before. If you can reproduce this in normal Node-RED outside of Home Assistant I'll have another look.

I suggest you try getting help from Home Assistant.