Anyone using Alexa Remote 2 Media Nodes?

Does anyone know if Device can be passed in as
I seem to have found a bug. If I choose a flow.var for the device field and click done, when I open the node again it just shows the first device in the list.

However even though the wrong information is shown in the config, it does send the commands to the device in the flow var. So it is more of an issue with the UI it seems.

I have tried a reboot, and using Chrome and Firefox. Odd thing is others are not getting this problem ?

I'm expanding on the "play music" example flow, but need to get info for different echo devices.

You can feed in msg.payload, with the name of device or id

click hamburger to the right of where it says msg.payload

1 Like

Thanks, What a plank I am for not finding that :wink:

OK so can you try changing it to a flow var deploy and check it again ?

It just reverts back for me

No issues my end. set to flow var and deploys.

Thats very odd, and if you check the node again it still shows your var ?


try deleting the node and trying again.

What version are you using please ?
I have node-red-contrib-alexa-remote2-applestrudel 5.08

Yes 5.08 applestrudel

[edit] you could move flow var to msg just before as a workaround.

Adding a new node makes no difference, nor a reboot.

Any ideas ?

You can also capture and use msg.device_name to select the Alexa device.
Screen Shot 01-15-22 at 07.15 PM

Screen Shot 01-15-22 at 07.18 PM

Dave can you try the echo node, as above ?

I cannot get it to accept a flow var, it just reverts back to the first device in the list.
I can get msg.XX to stay in the box but that doesn't actually work either.

what is your ultimate goal? If it is to eventually use an Alexa routine you can send the echo name directly to it. Here is an example code that I use for that purpose:

msg.payload = {"type": "speak", "payload": { "type": "regular", "text": 'Hello!', "devices": ["Buffet Alexa"]}};

My Alexa routine node looks like:

As soon as I have some free time (probably Monday morning) I'll create a demo/test flow for you.

Here's a very simple demo/test flow (hope it works for you).
I use Amazon BluePrints to catch responses and create a personal response that I can detect and trap.

Screen Shot 01-16-22 at 05.59 PM

Screen Shot 01-16-22 at 06.01 PM 001

[{"id":"5240f4129fea8f59","type":"tab","label":"Alexa demo","disabled":false,"info":"","env":[]},{"id":"5bfd1f212b4af916","type":"alexa-remote-event","z":"5240f4129fea8f59","name":"","account":"65fc5fb4b8d06bdd","event":"ws-device-activity","x":190,"y":160,"wires":[["95928a302a2def4a"]]},{"id":"95928a302a2def4a","type":"function","z":"5240f4129fea8f59","name":"Capture question","func":"var alexa_device_name =;\nvar summary = msg.payload.description.summary;\n\n if ((summary != \"alexa\") && (summary != \"\")) {\n     \n    msg.payload = {};\n\n    msg = {\n        topic: \"Alexa_response\",\n        device_name: alexa_device_name,\n        payload: {\n            \"summary\": summary\n        }\n    }\n    flow.set(\"alexa_device_name\",alexa_device_name);\n    node.status({text:\"Device_name is \"+ alexa_device_name + \" Summary = \" + summary});\n    return msg;\n}\nelse {\n    return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":410,"y":160,"wires":[[]]},{"id":"cda184264334cbb3","type":"alexa-remote-routine","z":"5240f4129fea8f59","name":"","account":"65fc5fb4b8d06bdd","routineNode":{"type":"speak","payload":{"type":"regular","text":{"type":"msg","value":"payload"},"devices":{"type":"msg","value":"device_name"}}},"x":580,"y":260,"wires":[[]]},{"id":"a4761ebdd782465f","type":"function","z":"5240f4129fea8f59","name":"","func":"let alexa_device_name = flow.get(\"alexa_device_name\") || \"study\";\n\nnode.send({device_name: alexa_device_name, payload: \"Door is already open\"});\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":260,"wires":[["cda184264334cbb3"]]},{"id":"61042f5150f9b1f2","type":"inject","z":"5240f4129fea8f59","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":260,"wires":[["a4761ebdd782465f"]]},{"id":"5a3c78c0a04602dc","type":"comment","z":"5240f4129fea8f59","name":"Amazon BluePrints","info":"","x":190,"y":100,"wires":[]},{"id":"65fc5fb4b8d06bdd","type":"alexa-remote-account","name":"Amazon acct","authMethod":"proxy","proxyOwnIp":"","proxyPort":"3456","cookieFile":"/home/pi/amazon_alexa.txt","refreshInterval":"3","alexaServiceHost":"","amazonPage":"","acceptLanguage":"en-GB","onKeywordInLanguage":"","userAgent":"","useWsMqtt":"on","autoInit":"on"}]
1 Like

Thanks for the replies.

I have updated first post to explain the issue, it is just with the echo node, used for music playback etc.

Odd that others are not seeing the same issue but it does seem to be a known bug Issue 34

So for now I will just add a change node before the Alexa one to set the device.

I believe i suggested that in post 5.

Indeed you did :wink:
But I wanted to close it with a link to the issue, to save others wasting time on it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.