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

reconnecting error #119

Closed J0han3s closed 2 years ago

J0han3s commented 2 years ago

My connection has logged in, because i can select from the drop down my devices i created on the website. However it keeps saying that it is reconnecting or disconnnected, i have never seen it say connected.

From what i can see i only have one conf. i have installed the Node-Red app and managed to find the devices on Alexa Echo. However, when i press the button on Alexa, nothign happens in Node Red.

My nodered is behind a reverse proxy, in docker

hardillb commented 2 years ago

You should only have 1 config node (where you entered the username/password) in a single instance of Node-RED.

If you have more than one instance of Node-RED or more than one config node this will happen

hardillb commented 2 years ago

Without knowing what your username is there is no way for me to look and see if it's even trying to connect to the broker.

J0han3s commented 2 years ago

Home Assistant and Node Red are installed using docker

hardillb commented 2 years ago

That doesn't help me. What is your username on the service?

hardillb commented 2 years ago

The logs show the node has not been able to connect to the MQTT broker. You need to make sure the docker container is allowed to connect out on port 1883 to alexa-node-red.hardill.me.uk

J0han3s commented 2 years ago

Thank you , very helpful. Sorry for the rookie Q - any idea how i do that please?

hardillb commented 2 years ago

No, I have no idea what firewall rules you have in place or what crap HomeAssistant is doing.

J0han3s commented 2 years ago

Hi, i have changed the settings, please could you check if it is the same error as yesterday.

Thank you

hardillb commented 2 years ago

The nodes will tell you if they have connected, if it's still not connected there isn't anything new I can tell you.

J0han3s commented 2 years ago

Thank you for the response, as i am trying to debug, I was hoping you can help me understand what's going on on the backend, i.e. is it still the same part where it's failing ( i.e. the connecting to port 1883 to alexa-node-red.hardill.me.uk

hardillb commented 2 years ago

I don't know, you've not shared any useful information with me, or anything from the client side logs that would help.

You also appear to have deleted the post with your userid so even if I wanted to I can't look it up to see if it's managed to connect.

J0han3s commented 2 years ago

Hi,

I cannot see any useful things on my docker logs. could you help me know where i can find the client side logs? Please see beloe my Node Red Flow:

[ { "id": "b2f73ef0.814fe", "type": "tab", "label": "Alexa-Home-Skill", "disabled": false, "info": "" }, { "id": "ead2182f8e6a5a9a", "type": "debug", "z": "b2f73ef0.814fe", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 850, "y": 340, "wires": [] }, { "id": "52cb47bde9f1f73f", "type": "link out", "z": "b2f73ef0.814fe", "name": "Vanityfrom Alexa", "links": [ "c4f5e36ac6d1664e" ], "x": 460, "y": 480, "wires": [], "l": true }, { "id": "5be7c4b757f7f3dc", "type": "switch", "z": "b2f73ef0.814fe", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 530, "y": 180, "wires": [ [] ] }, { "id": "3fd7c4c8d06f1fdf", "type": "alexa-home", "z": "b2f73ef0.814fe", "conf": "cd19852349c161ef", "device": "154497", "acknoledge": true, "name": "Vanity Light", "topic": "", "x": 160, "y": 320, "wires": [ [ "ead2182f8e6a5a9a" ] ], "outputLabels": [ "msg.payload" ] }, { "id": "bd214b3bbaba4fc3", "type": "inject", "z": "b2f73ef0.814fe", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payloadType": "date", "x": 120, "y": 440, "wires": [ [] ] }, { "id": "cd19852349c161ef", "type": "alexa-home-conf", "username": "gkchimz28" } ]

J0han3s commented 2 years ago

Thank you again for your help. below is my logs from docker:

,

node-red-docker@2.0.6 start /usr/src/node-red, node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data", , 1 Oct 10:36:04 - [info] , , Welcome to Node-RED, ===================, , 1 Oct 10:36:04 - [info] Node-RED version: v2.0.6, 1 Oct 10:36:04 - [info] Node.js version: v14.17.6, 1 Oct 10:36:04 - [info] Linux 5.10.0-0.bpo.8-amd64 x64 LE, 1 Oct 10:36:04 - [info] Loading palette nodes, 1 Oct 10:36:09 - [info] Settings file : /data/settings.js, 1 Oct 10:36:09 - [info] Context store : 'default' [module=memory], 1 Oct 10:36:09 - [info] User directory : /data, 1 Oct 10:36:09 - [warn] Projects disabled : editorTheme.projects.enabled=false, 1 Oct 10:36:09 - [info] Flows file : /data/flows.json, 1 Oct 10:36:09 - [warn] , , ---------------------------------------------------------------------, Your flow credentials file is encrypted using a system-generated key., , If the system-generated key is lost for any reason, your credentials, file will not be recoverable, you will have to delete it and re-enter, your credentials., , You should set your own key using the 'credentialSecret' option in, your settings file. Node-RED will then re-encrypt your credentials, file using your chosen key the next time you deploy a change., ---------------------------------------------------------------------, , 1 Oct 10:36:09 - [info] Starting flows, 1 Oct 10:36:09 - [info] Started flows, 1 Oct 10:36:09 - [info] [server:Home Assistant] Connecting to http://192.168.1.42:8123, 1 Oct 10:36:09 - [info] Server now running at http://127.0.0.1:1880/, 1 Oct 10:36:10 - [info] [server:Home Assistant] Connected to http://192.168.1.42:8123, 1 Oct 10:44:45 - [info] Stopping flows, 1 Oct 10:44:45 - [info] [server:Home Assistant] Closing connection to http://192.168.1.42:8123, 1 Oct 10:44:45 - [info] Alexa Local Hub closing done..., 1 Oct 10:44:45 - [info] Stopped flows, 1 Oct 10:44:45 - [info] Starting flows, 1 Oct 10:44:45 - [info] Started flows, 1 Oct 10:44:45 - [info] [server:Home Assistant] Connecting to http://192.168.1.42:8123, 1 Oct 10:44:45 - [info] [server:Home Assistant] Connected to http://192.168.1.42:8123

hardillb commented 2 years ago

The service side logs still show you have never connected to the broker.

There is nothing useful in the those client logs.

All I can suggest is that you get a shell into the container and make sure it can resolve alexa-node-red.hardill.me.uk

There have been problems with using the node in the Home Assistant OS environment in the past and as I don't use it and have no interest in it I can't help you with that. I'm sorry I really do not have time to step through this all with you.