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

[error] [alexa-home-conf:99cba767.0a7d98] Error: connect ECONNREFUSED xxx.xxx.xxx.xxx:8883 #102

Closed Ralanacam closed 3 years ago

Ralanacam commented 3 years ago

Hello @hardillb! I am using its connection node with Alexa but for a while when I load the nodeRED flows it remains several minutes connecting and disconnecting in port 8883. Could you check if I have something wrong? username: Cameron. Thanks in advance!

hardillb commented 3 years ago

I need a much better description of the problem here.

You need to explain exactly what you're doing.

The error about connection refused for port 8883 is normal (and should be ignored), the node will fall back to connecting to port 1883 after about 10 seconds.

The node disconnects and reconnects if you redeploy the whole flow, since you should not be changing the config node you can change the deploy method to only deploy changed nodes (click on the down arrow at the end of the deploy button). This will stop it disconnecting/reconnecting on each deploy.

If you are seeing the node constantly disconnecting/reconnecting this means that you have multiple instances trying to connect with the same usename/password. This will not work, you can only have 1. This also means that there should only be one config node shared between all the device nodes.

Ralanacam commented 3 years ago

Thank you very much for your quick reply!

Yes, it is true, when I implement all the flow is disconnected, but it remains between 1 and 5 minutes constantly disconnecting / reconnecting until it connects. My question is, is it normal that it takes so long? I only have one instance of config shared on several nodes of the device.

hardillb commented 3 years ago

No that is not normal

It should try and fail to connect to port 8883 (I've just pushed an update to remove this) then try and succeed to connect on port 1883.

As I mentioned it will do this every time you deploy unless you change the deployment type.

Please apply the node update and try again

Ralanacam commented 3 years ago

This is the last version installed in NodeRED: image

My account settings, on all nodes: image

Configuration nodes, 7 nodes, same configuration: image

This is my debug: image

And just now I deployed all nodes and the result is the same. Connected after 3 minutes.

hardillb commented 3 years ago

The latest version is 0.1.19 pushed this morning I'd just not updated flows.nodered.org yet. It should be there now.

This is the first time you've mentioned the ECONNRESET error. That I'll have to look at tonight.

hardillb commented 3 years ago

OK, we'd run out of open file handles so I've added in 10 times more. Should be good now

Ralanacam commented 3 years ago

Works correctly! Thank you!