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

Apache License 2.0
45 stars 28 forks source link

Device list no longer appears on node-red #128

Closed Anthom12 closed 2 years ago

Anthom12 commented 2 years ago

Hello, I wanted to add a new device to my account and I just saw that on Node-red the list of devices in my account no longer appears. Previously created devices still work but I cannot select a new one. Can you help me please? image

hardillb commented 2 years ago

I assume that the list still shows all the devices on the website?

What happens if you hit the refresh button next to the drop down?

And what is shown in the Node-RED logs when you do hit refresh?

Anthom12 commented 2 years ago

On the website everything seems normal image If I press the refresh button it doesn't change anything. On nodered there is nothing written in debug. Thank you for your quick reply

hardillb commented 2 years ago

No, not the debug sidebar, the actual console logs output from Node-RED.

It should log if it fails to pull down the list of devices

You can also try removing the comment from the start of line 327 of the alexa.js file to get a better error message.

Anthom12 commented 2 years ago

Ok I found the logbut he does not move when I refresh the device list. If I uncomment line 327, nodered does not start anymore. image

hardillb commented 2 years ago

How are you looking at the logs?

Also there must be an error if Node-RED fails to start with the // removed from that line (which REALLY shouldn't cause it not to start)

Anthom12 commented 2 years ago

I am using the terminal log (see below) log.txt

Anthom12 commented 2 years ago

I got this error removing the // from line 327 image

hardillb commented 2 years ago

Change line 327 to

console.log("err: ", err);
Anthom12 commented 2 years ago

I have no more errors - nodered is launching now . When I update the list of devices I have this error in the log: err: Error: certificate has expired

hardillb commented 2 years ago

What version of NodeJS and Node-RED are you running?

hardillb commented 2 years ago

Actually it's in the log you sent 8.17.0 which is VERY VERY out of support. NodeJS has a built in set of root CA certificates and the CA cert required to verify the connection to my server is expired.

You will need to upgrade to a supported version of NodeJS (You should probably upgrade Node-RED as well)

You can try running with the following environment variable exported:

NODE_TLS_REJECT_UNAUTHORIZED=0

Which might work as a temp fix, but this is not something you should run in a "production" environment as it basically turns off all the protection TLS grants.

https://stackoverflow.com/questions/69400610/axios-fails-with-certificate-has-expired-when-certificate-has-not-expired

Anthom12 commented 2 years ago

Ok thank for your help