# Anyone using Alexa Remote 2 Media Nodes?

**URL:** <https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705>\
**Category:** Dashboard\
**Created:** [15 January 2022 17:25 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705 "2022-01-15T17:25:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [15 January 2022 17:25 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/1 "2022-01-15T17:25:32Z")

</div>

~~Does anyone know if **Device** can be passed in as msg.property?~~  
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 ?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bb61761f91d766c6b2982c0c08a0e2ff085e1436.png)  
I'm expanding on the "play music" example flow, but need to get info for different echo devices.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [15 January 2022 18:25 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/2 "2022-01-15T18:25:56Z")

</div>

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

 ![Screenshot_20220115-182334](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/6/c623ca9b2e169cf69bef16f5ae7d1e088326380b.png)  
click hamburger to the right of where it says msg.payload

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [15 January 2022 18:28 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/3 "2022-01-15T18:28:15Z")

</div>

Thanks, What a plank I am for not finding that 😉

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [15 January 2022 18:34 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/4 "2022-01-15T18:34:36Z")

</div>

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

It just reverts back for me

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [15 January 2022 18:57 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/5 "2022-01-15T18:57:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [15 January 2022 18:59 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/6 "2022-01-15T18:59:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [15 January 2022 19:00 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/7 "2022-01-15T19:00:49Z")

</div>

Yes

 ![Screenshot_20220115-185957](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/e/dec635e307f90d64a0be7c66514e27528f2e960f.png)

try deleting the node and trying again.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [15 January 2022 19:02 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/8 "2022-01-15T19:02:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [15 January 2022 19:03 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/9 "2022-01-15T19:03:47Z")

</div>

Yes 5.08 applestrudel

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

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [15 January 2022 19:06 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/10 "2022-01-15T19:06:24Z")

</div>

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

Any ideas ?

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [15 January 2022 19:17 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/11 "2022-01-15T19:17:42Z")

</div>

You can also capture and use msg.device\_name to select the Alexa device.  
 ![Screen Shot 01-15-22 at 07.15 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/e/7e637cd78eb653dff5aba33518ff20720813c2e2.gif)

![Screen Shot 01-15-22 at 07.18 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6ec49d45f6eacff989536657b5d8e8345121eb2f.gif)

 ![Screen Shot 01-15-22 at 07.19 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/e/0e093a0387c424c6a705bf80e5d077fb1f8bd601.gif)

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [16 January 2022 13:35 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/12 "2022-01-16T13:35:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jmorris644](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jmorris644/32/31964_2.png) [@jmorris644](https://discourse.nodered.org/u/jmorris644)\
**Post date:** [16 January 2022 15:58 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/13 "2022-01-16T15:58:29Z")

</div>

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:

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

```

My Alexa routine node looks like:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/c/3c5729631bc7a8925dae6774d38a773f0b6778f1.png)

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [16 January 2022 16:16 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/14 "2022-01-16T16:16:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [16 January 2022 18:08 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/15 "2022-01-16T18:08:24Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/2/12e86d2519743dd68a0ad920c5ec25f8b4899e4f.gif)

![Screen Shot 01-16-22 at 06.01 PM 001](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9eebe40f550bb9668c6fedd5b0c084006f2e8031.gif)

```auto
[{"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 = msg.payload.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":"https://blueprints.amazon.co.uk/","x":190,"y":100,"wires":[]},{"id":"65fc5fb4b8d06bdd","type":"alexa-remote-account","name":"Amazon acct","authMethod":"proxy","proxyOwnIp":"192.168.1.156","proxyPort":"3456","cookieFile":"/home/pi/amazon_alexa.txt","refreshInterval":"3","alexaServiceHost":"alexa.amazon.co.uk","amazonPage":"amazon.co.uk","acceptLanguage":"en-GB","onKeywordInLanguage":"","userAgent":"","useWsMqtt":"on","autoInit":"on"}]

```

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [17 January 2022 00:03 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/16 "2022-01-17T00:03:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [20 January 2022 19:12 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/17 "2022-01-20T19:12:08Z")

</div>

Odd that others are not seeing the same issue but it does seem to be a known bug [Issue 34](https://github.com/bbindreiter/node-red-contrib-alexa-remote2-applestrudel/issues/34)

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

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [20 January 2022 19:31 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/18 "2022-01-20T19:31:00Z")

</div>

I believe i suggested that in post 5.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [20 January 2022 19:48 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/19 "2022-01-20T19:48:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 February 2022 19:49 UTC](https://discourse.nodered.org/t/anyone-using-alexa-remote-2-media-nodes/56705/20 "2022-02-03T19:49:01Z")

</div>

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