Node-Red in docker amazon doesn't work

Odd. I’ve not seen (noticed maybe) this on any Discourse site until today.

I get it heaps on HE

Like now! :thinking:

1 Like

Anyway, back to topic on hand
@april.brandt when im at my pc, i will take some screenshots of my docker setup (i use docker on unraid) but it should be similiar.
I know i had to set a container path to my auth file location in my docker settings.
But after a while, using the auth file stopped working, so i changed to saving the cookie as a variable in NR.

This has now stopped working for me also, but i always thought it was is an amazon issue with an australian account! Maybe now, im not so sure!!
Anyway, as soon as i can ill post some of my settings to compare

2 Likes

if there is a reply to the latest post it doesn’t show. It’s evidently by design. It’s stupid and I can’t change it. Now you know. It’s not a glitch.
I lied … we’re probably going to change it.

1 Like

Flip-flop much? :stuck_out_tongue_winking_eye:

I’m a girl. You have to ask that question? Seriously?

3 Likes

@april.brandt
I have NR running on Unraid Docker, so you settings/filepaths would look a bit different.
I added a variable for authFile path and IP. Not sure if Port variable was needed, but it worked initially so i have left it


Using Proxy Method, i put the mapped variable as the authFile path
image
That worked for a while, then I started receiving a node error: “Unexpected end of JSON input”
Which I thought was due to it being an Australian account, as when i used my USA test account the cookie generated.
After those issues, i changed to saving the cookie in NR variable
image

[{"id":"f3ff139b.01dd3","type":"alexa-remote-init","z":"7b84f49a.9ad5cc","name":"","account":"49135c4f.6bdd74","option":"initialise","x":270,"y":80,"wires":[["74cd0c7b.325354"]]},{"id":"ba61ab31.e4d208","type":"inject","z":"7b84f49a.9ad5cc","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"00 00 * * 2,4,0","once":false,"onceDelay":0.1,"topic":"","payload":"alexa","payloadType":"flow","x":120,"y":80,"wires":[["f3ff139b.01dd3"]]},{"id":"74cd0c7b.325354","type":"change","z":"7b84f49a.9ad5cc","name":"set","rules":[{"t":"set","p":"alexa","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":80,"wires":[[]]},{"id":"2a1fc81f.b96e28","type":"comment","z":"7b84f49a.9ad5cc","name":"Alexa Init","info":"","x":90,"y":40,"wires":[]},{"id":"443b92d6.132dfc","type":"inject","z":"7b84f49a.9ad5cc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"3600","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"Started!","payloadType":"str","x":110,"y":140,"wires":[["6313cbe4.e7fc64"]]},{"id":"6313cbe4.e7fc64","type":"change","z":"7b84f49a.9ad5cc","name":"set","rules":[{"t":"set","p":"payload","pt":"msg","to":"alexa","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":140,"wires":[["6c43f2b4.15104c"]]},{"id":"6c43f2b4.15104c","type":"alexa-remote-init","z":"7b84f49a.9ad5cc","name":"","account":"49135c4f.6bdd74","option":"initialise","x":390,"y":140,"wires":[[]]},{"id":"49135c4f.6bdd74","type":"alexa-remote-account","name":"Alexa AUS","authMethod":"cookie","proxyOwnIp":"192.168.20.10","proxyPort":"3456","cookieFile":"","refreshInterval":"3","alexaServiceHost":"alexa.amazon.com.au","amazonPage":"amazon.com.au","acceptLanguage":"en-US","userAgent":"","useWsMqtt":"on","autoInit":"on"}]

image
The file path should be blank, and auto Init set to OFF

But now that doesnt work for me - I get the “Unexpected end of JSON input” error again,
so im back to manually inputting the cookie!!! BUT that is getting old very quick!!!

Hopefully some of this might assist!!

2 Likes

Hmm interesting. I will have some time to tinker later today. (vacation daaaaay! - whoo woo) I’ll see what I can come up with. maybe I’m just out of luck with this, which would suck because my radio automation is loved by all who see it.

2 Likes

Why did you move NR from where it was previously when alexa2-remote worked?

My pie died, so I moved it to another piece of equipment I had. I had to put it in docker. Any thoughts?

I had Home Assistant running on a Virtual Machine and it just added to the complexity level of an already complex entity. I now have it back running on an RPi 4. I was wondering if you could create another instance of Node Red that just had flow(s) that require the Alexa2-remote node for your radio.

I never trusted the SD cards so I have mine running off SSDs. I had one SD card crash. Did the entire RPi crap out or just SD card?

3 Likes

Sd card. I replaced and have it up and running again. This is quite a question that no one has been able to answer, though. Might be sunbathing to work on just to solve it.

Thinking of doing this. Did you use a certain method? I’ve seen a bunch of different ways of doing this, but am not sure if any are better than others.

Are you saying that you got the “host” networking set up in Docker and it didn’t fix it?

No, I’m saying that I gave up on the current method of doing it. Where I have docker installed is just too locked down for my liking. I redid my SD install on my pi and my house is harmonious again. But with Unifi running, the change was easy, one rule and it was up and running on my pi. Should I get another wild hair to tinker, I’ll just flip that switch again and launch a different version.

2 Likes

I saw this on the Node Red forums. No solution to your problem but might have some helpful information so worth following. It’s only got one post currently though.

No offense to this community but the Node Red forum might be a better spot to find an answer. :smile:

Alexa is not working at all anyway. getting the “no body” error. I’ve ordered some googles.

Are you going to be able to Google-fy your antique radio? There was a huge outage for Amazon a couple of days ago that affected a bunch of people and companies that rely on AWS.

I’m going to try. I’m interested in some of the other integrations that google and node red offer. They’re much more granular than Alexa.

Do you think this is why my alexa isn’t finding any devices? And why my token will quit working after 5 minutes?

I wonder if amazon change something in their cookie and the node cant retrieve it, or just a node issue. Cos, the manual cookie method works, its just a pita to keep up to date! Plus we both get a different error