bbindreiter / node-red-contrib-alexa-remote2-applestrudel

Node-Red Nodes for interacting with Alexa
https://flows.nodered.org/node/node-red-contrib-alexa-remote2-applestrudel
MIT License
77 stars 21 forks source link

Have to re-initialize constantly, daily #201

Open magyartj opened 2 months ago

magyartj commented 2 months ago

My Alexa Routine nodes are constantly asking me to "open http://192.168.x.xx:3456 in your browser", that IP being the IP address of my Home Assistant install. I go to that webpage in a browser and enter my Amazon username/password and then it tells me "Amazon Alexa Cookie successfully retrieved. You can close the browser.". It then starts working, but within a day, I notice my Alexa isn't speaking again. Have to do it all over again.

I see this in the Node-Red Add-On log during startup:

13 Sep 13:26:59 - [warn] [alexa-remote-account:66fb228ef256d965] ENOENT: no such file or directory, open 'authorizationAlexa'
13 Sep 13:26:59 - [info] [alexa-remote-account:66fb228ef256d965] intialising with the PROXY method and NO saved data...
13 Sep 13:26:59 - [warn] [alexa-remote-account:66fb228ef256d965] open http://192.168.1.9:3456 in your browser

And then when a flow triggers that tries to use it, I see this:

13 Sep 13:39:47 - [error] [alexa-remote-routine:Alexa Speak Living Room Only] Account not initialised!

After I go to the URL and log in, I see this in the log:

13 Sep 13:59:38 - [info] [alexa-remote-account:66fb228ef256d965] intialising with the PROXY method and saved data...

I never see a "Success" message or anything else, which there should be a log entry whether it succeeds or fails. Anyway.

It's quite an annoyance to have to do this daily. I don't exactly recall when this started happening, but I would estimate about 2-3 months ago; I have been procrastinating to figure out a solution until now. And I haven't found one.

Babelbernd commented 1 month ago

Same here, every 24 hours i have to re-initialize. @bbindreiter is there any workaround for this issue?

alanthewild commented 1 month ago

Same here, every 24 hours, which sadly makes this add-on next to useless for me. I'm guessing Amazon changed something in the login process? @bbindreiter any ideas on how to resolve this?

bbindreiter commented 1 month ago

@magyartj to me it looks like the file the cookie is saved to is not persisted? Is the file there when it asks you to reinitialize?

I am reinitializing every 12 hours in my node-red instance and haven't noticed any problem (so far). Doing that for years now.

I am sorry but this solution will never work reliability and it can break every day over and over again.. 😭

Babelbernd commented 1 month ago

Here the file ist there, i remember i had to create the file and add the cookie-text. Is it still working like that or should the file be created itself after receiving the cookie from the Login amazon Website?

DeepflashX commented 1 week ago

I am having most likely a permission problem. Whatever folder I put in the file field, I get some error: "ENOENT: no such file or directory, open '/home/dietpi/alexa.txt'" and: "EACCES: permission denied, open '/home/dietpi/alexa.txt'" The authorization itself works, but is gone after redeploying something. I used different folders but gone none to work