# Alexa read data when requested

**URL:** <https://discourse.nodered.org/t/alexa-read-data-when-requested/56453>\
**Category:** General\
**Created:** [11 January 2022 10:00 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453 "2022-01-11T10:00:59Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![smart\_hendrik](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@smart\_hendrik](https://discourse.nodered.org/u/smart_hendrik)\
**Post date:** [11 January 2022 10:00 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/1 "2022-01-11T10:00:59Z")

</div>

Hello all,

I've been working with NodeRed since yesterday and I'm excited about the functionality. After some initial difficulties I managed to query a variable (temperature) of my heating boiler. The whole heating system works with a wood boiler.

You can find the previous post about the solution of the "value request problem" here:

> [@Scrape date from Home Network into Sensor](https://discourse.nodered.org/t/scrape-date-from-home-network-into-sensor/56404):
>
> Hello all, I am a proud owner of a Synology NAS with HomeAssistant as VM since a few days. I also downloaded the NodeRed container. In the future, I want to manage my whole smartHome with this powerful systems. Now I would like to first integrate my heating system in the best possible way. It is a wood boiler with buffer tank from the company ETA. I can either access the data via a portal of the company (meinETA.at), or directly query various variables in the network. IP heating boiler: 192.1…

Now I want Alexa to read out the value when I ask for it and when it falls below a certain value.

Can someone help me with the necessary flow?

I want to be able to ask alexa: "What is the temperature of ......." and I want to get the answer: "the temperature is "payload.eta.value[0].$.strValue!".

As another flow I want:

IF temperature  
of payload.eta.value[0].$.strValue! \< 40°  
THEN voice output Alexa (every 30minutes):  
"Temperature of heating boiler is "payload.eta.value[0].$.strValue!" Please make fire."

I hope I was able to describe my issue and I am looking forward to your messages.

Best regards Hendrik  
(from Germany)

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [11 January 2022 11:24 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/2 "2022-01-11T11:24:19Z")

</div>

Perhaps this testbed flow for text to voice from node red to Alexa over bluetooth as well as limited speech input control from Alexa to node red will be helpful.

The node _ **node-red-contrib-play-audio** _ allows you to hear the output on the browser if you are using vnc, while _ **node-red-contrib-wemo-emulator** _ basically emulates a wifi plug controlled through Alexa.

The TTS uses google translate which outputs in mp3, however there is a delay in output. For fastest response the mp3 is converted on the fly to a wav file which is then output to Alexa echo connected to the raspberry pi as a bluetooth speaker.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/6/761c78d5227dbfc9a09efd53279b379f5e4a5728.png)

```auto
[{"id":"e273b97f.97c148","type":"tab","label":"Pi_2_bleSPEAKER","disabled":false,"info":""},{"id":"866572cd.1cabb","type":"comment","z":"e273b97f.97c148","name":"https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl=en&q=Hello+World","info":"https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl=en&q=Hello+World","x":480,"y":120,"wires":[]},{"id":"a58a79e3.5db398","type":"comment","z":"e273b97f.97c148","name":"Voice communication between e.g.Alexa and RPI","info":"# Output Delay to Bluetooth Speaker\n## **ffplay** \n 5-6 seconds\n## **cvlc** \n less than 3 seconds\n## **aplay** \n less than 1 second\n \n# Therefore best to convert mp3 to wav for use\n","x":540,"y":40,"wires":[]},{"id":"5ccbf570.ecdf9c","type":"wemo-emulator","z":"e273b97f.97c148","name":"","friendlyName":"My Pi","serial":"1","port":"34087","onTopic":"Hello Pi Zero","onPayload":"Hello, Pi Zero is now ON","offTopic":"Good Bye Pi Zero","offPayload":"Goodbye My Pi","x":200,"y":380,"wires":[["597a0b09.032f54"]]},{"id":"4d138d69.57e704","type":"comment","z":"e273b97f.97c148","name":"tell Alexa: Turn off My pi","info":"","x":200,"y":440,"wires":[]},{"id":"4a1502b.eda03fc","type":"comment","z":"e273b97f.97c148","name":"tell Alexa: Turn on My pi","info":"","x":200,"y":340,"wires":[]},{"id":"b1e32597.2c78a8","type":"inject","z":"e273b97f.97c148","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Goodbye","payloadType":"str","x":180,"y":280,"wires":[["597a0b09.032f54"]]},{"id":"67bd15e7.7e05cc","type":"inject","z":"e273b97f.97c148","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello","payloadType":"str","x":190,"y":220,"wires":[["597a0b09.032f54"]]},{"id":"bae924d9.b41608","type":"play audio","z":"e273b97f.97c148","name":"","voice":"0","x":850,"y":240,"wires":[]},{"id":"597a0b09.032f54","type":"function","z":"e273b97f.97c148","name":"TTS","func":"msg.url =\"https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl=en&q=\"+msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":240,"wires":[["1a67f7f4.ceebf8","30704c6d15cd1368"]]},{"id":"1a67f7f4.ceebf8","type":"http request","z":"e273b97f.97c148","name":"Download mp3","method":"GET","ret":"bin","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":560,"y":240,"wires":[["fb043dc9.03987","bae924d9.b41608"]]},{"id":"5aa18234.1e1cfc","type":"exec","z":"e273b97f.97c148","command":"DISPLAY=:0 ffplay ","addpay":"payload","append":" >/dev/null 2>&1 -vn -autoexit -nodisp","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":850,"y":340,"wires":[[],[],["fcb0628317c8900a"]]},{"id":"fb043dc9.03987","type":"file","z":"e273b97f.97c148","name":"File write to Buffer","filename":"/home/pi/Desktop/audio.mp3","appendNewline":false,"createDir":false,"overwriteFile":"true","encoding":"none","x":570,"y":280,"wires":[["8f1d43cfb19b69bf"]]},{"id":"819b3cfeb9606e49","type":"comment","z":"e273b97f.97c148","name":"Output on Browser","info":"","x":870,"y":200,"wires":[]},{"id":"bc3fe0386551d616","type":"comment","z":"e273b97f.97c148","name":"Output mp3 to Bluetooth Speaker","info":"","x":870,"y":300,"wires":[]},{"id":"a1f9ee40e25fa20d","type":"comment","z":"e273b97f.97c148","name":"ffplay Desktop/audio.mp3 >/dev/null 2>&1 -vn -autoexit -nodisp","info":"So by specifying > /dev/null 2>&1 you tell the system that you want to redirect the command's standard output into /dev/null, then redirect standard error into standard output (which in turn is redirected into /dev/null). This has the effect of silencing the command by throwing away all of its output that is sent to either stdout or stderr.","x":940,"y":380,"wires":[]},{"id":"6dd3fddb77516621","type":"exec","z":"e273b97f.97c148","command":"DISPLAY=:0 aplay","addpay":"payload","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":590,"y":700,"wires":[[],[],["b8f719b643171b25"]]},{"id":"9739b27be27bd415","type":"exec","z":"e273b97f.97c148","command":"DISPLAY=:0 ffplay","addpay":"payload","append":">/dev/null 2>&1 -vn -autoexit -nodisp -infbuf","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":590,"y":820,"wires":[[],[],["5ebc114217dbbe28"]]},{"id":"f67bc7636a06da18","type":"inject","z":"e273b97f.97c148","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Desktop/audio.mp3 ","payloadType":"str","x":230,"y":820,"wires":[["7b5a966485e2598e"]]},{"id":"7f7b33f409c4ec51","type":"inject","z":"e273b97f.97c148","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Desktop/audio.wav","payloadType":"str","x":230,"y":700,"wires":[["3b00b443ab48f4fd"]]},{"id":"e618a1223a958607","type":"exec","z":"e273b97f.97c148","command":"DISPLAY=:0 cvlc ","addpay":"payload","append":">/dev/null 2>&1 --play-and-exit","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":590,"y":760,"wires":[[],[],["9910a669ea46f618"]]},{"id":"8724b2a3ad73cd8c","type":"inject","z":"e273b97f.97c148","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Desktop/audio.mp3 ","payloadType":"str","x":230,"y":760,"wires":[["c21cc4ef3ea5342f"]]},{"id":"3b00b443ab48f4fd","type":"ui_button","z":"e273b97f.97c148","name":"","group":"0e9c5f30215bb24c","order":2,"width":0,"height":0,"passthru":true,"label":"aplay wav","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Desktop/audio.wav","payloadType":"str","topic":"topic","topicType":"msg","x":400,"y":700,"wires":[["6dd3fddb77516621"]]},{"id":"c21cc4ef3ea5342f","type":"ui_button","z":"e273b97f.97c148","name":"","group":"0e9c5f30215bb24c","order":3,"width":0,"height":0,"passthru":true,"label":"cvlc mp3","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Desktop/audio.mp3 ","payloadType":"str","topic":"topic","topicType":"msg","x":400,"y":760,"wires":[["e618a1223a958607"]]},{"id":"7b5a966485e2598e","type":"ui_button","z":"e273b97f.97c148","name":"","group":"0e9c5f30215bb24c","order":4,"width":0,"height":0,"passthru":true,"label":"ffplay mp3","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Desktop/audio.mp3 ","payloadType":"str","topic":"topic","topicType":"msg","x":410,"y":820,"wires":[["9739b27be27bd415"]]},{"id":"69f00d4149f72637","type":"ui_text_input","z":"e273b97f.97c148","name":"Saved to mp3","label":"Saved to mp3","tooltip":"","group":"0e9c5f30215bb24c","order":1,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"topic","sendOnBlur":false,"className":"","topicType":"msg","x":200,"y":160,"wires":[["597a0b09.032f54"]]},{"id":"be8dde74a6affb79","type":"comment","z":"e273b97f.97c148","name":"and Convert to wav","info":"","x":550,"y":400,"wires":[]},{"id":"fb642b1de20d7af0","type":"exec","z":"e273b97f.97c148","command":"ffmpeg -y -i","addpay":"payload","append":"Desktop/audio.wav","useSpawn":"false","timer":"","winHide":true,"oldrc":false,"name":"","x":550,"y":440,"wires":[["bbdb135076df91fd"],[],[]]},{"id":"8f1d43cfb19b69bf","type":"change","z":"e273b97f.97c148","name":"Set msg.payload \\n to Buffer file","rules":[{"t":"set","p":"payload","pt":"msg","to":"Desktop/audio.mp3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":340,"wires":[["fb642b1de20d7af0","5aa18234.1e1cfc"]]},{"id":"bbdb135076df91fd","type":"exec","z":"e273b97f.97c148","command":"DISPLAY=:0 aplay","addpay":"","append":"Desktop/audio.wav","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":570,"y":520,"wires":[[],[],["00ef3f60401554dd"]]},{"id":"f14fac21b4f26f8b","type":"comment","z":"e273b97f.97c148","name":"aplay Desktop/audio.wav to Bluetooth Speaker","info":"","x":570,"y":580,"wires":[]},{"id":"36a4798f455775ce","type":"ui_text_input","z":"e273b97f.97c148","name":"Dynamic","label":"Dynamic: APLAY as wav after saving as mp3","tooltip":"","group":"0e9c5f30215bb24c","order":6,"width":0,"height":0,"passthru":true,"mode":"text","delay":"0","topic":"topic","sendOnBlur":false,"className":"","topicType":"msg","x":180,"y":1000,"wires":[["ecd390911b63923d"]]},{"id":"ecd390911b63923d","type":"function","z":"e273b97f.97c148","name":"TTS","func":"msg.url =\"https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl=en&q=\"+msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":1000,"wires":[["d346e0ad93496732"]]},{"id":"d346e0ad93496732","type":"http request","z":"e273b97f.97c148","name":"Download mp3","method":"GET","ret":"bin","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":520,"y":1000,"wires":[["e84b49c4b011db9a","bc3cdad30a0078cb"]]},{"id":"e84b49c4b011db9a","type":"play audio","z":"e273b97f.97c148","name":"","voice":"0","x":750,"y":1000,"wires":[]},{"id":"2a47f84eb772d07f","type":"exec","z":"e273b97f.97c148","command":"ffmpeg -i ","addpay":"payload","append":" -f wav - | DISPLAY=:0 aplay - ","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":500,"y":1160,"wires":[[],[],[]]},{"id":"f247a50823a43ed1","type":"change","z":"e273b97f.97c148","name":"Set msg.payload \\n to Buffer file","rules":[{"t":"set","p":"payload","pt":"msg","to":"Desktop/audio.mp3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":1100,"wires":[["2a47f84eb772d07f"]]},{"id":"59b4a592c39a0f2f","type":"comment","z":"e273b97f.97c148","name":"Save Text to file, EXEC converts and outputs as wav by aplay","info":"ffmpeg -y -i Desktop/audio.mp3 -f wav - | aplay - \n","x":280,"y":940,"wires":[]},{"id":"bc3cdad30a0078cb","type":"file","z":"e273b97f.97c148","name":"File write to Buffer","filename":"/home/pi/Desktop/audio.mp3","appendNewline":false,"createDir":false,"overwriteFile":"true","encoding":"none","x":530,"y":1040,"wires":[["f247a50823a43ed1"]]},{"id":"b8f719b643171b25","type":"debug","z":"e273b97f.97c148","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":700,"wires":[]},{"id":"9910a669ea46f618","type":"debug","z":"e273b97f.97c148","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":760,"wires":[]},{"id":"5ebc114217dbbe28","type":"debug","z":"e273b97f.97c148","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":820,"wires":[]},{"id":"fcb0628317c8900a","type":"debug","z":"e273b97f.97c148","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":340,"wires":[]},{"id":"00ef3f60401554dd","type":"debug","z":"e273b97f.97c148","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":520,"wires":[]},{"id":"30704c6d15cd1368","type":"debug","z":"e273b97f.97c148","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":550,"y":180,"wires":[]},{"id":"510fd79235320044","type":"inject","z":"e273b97f.97c148","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Dynamic Output","payloadType":"str","x":150,"y":1080,"wires":[["36a4798f455775ce"]]},{"id":"21e367111b96ca4f","type":"ui_spacer","z":"e273b97f.97c148","name":"spacer","group":"0e9c5f30215bb24c","order":5,"width":1,"height":1},{"id":"261ed9809d91b303","type":"ui_spacer","z":"e273b97f.97c148","name":"spacer","group":"0e9c5f30215bb24c","order":1,"width":1,"height":1},{"id":"0e9c5f30215bb24c","type":"ui_group","name":"Text to Sound via Google Translate","tab":"b6152d595c55a32b","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"b6152d595c55a32b","type":"ui_tab","name":"Pi_2_bleSPEAKER","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<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:** [11 January 2022 12:39 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/3 "2022-01-11T12:39:53Z")

</div>

you can use node-red-contrib-virtual-smart-home or node-red-contrib-amazon-echo to create virtual lights/devices in alexa. You can then set up a routine in alexa for "What is the temperature of .......", to trigger your virtual device and start the flow. You can then use node-red-contrib-alexa-remote2-applestrudel to make alexa speak your "the temperature is "payload.eta.value[0].$.strValue!".

---

<div class="post-metadata">

**Author:** ![smart\_hendrik](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@smart\_hendrik](https://discourse.nodered.org/u/smart_hendrik)\
**Post date:** [11 January 2022 16:07 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/4 "2022-01-11T16:07:00Z")

</div>

> [@E1cid](#):
>
> node-red-contrib-alexa-remote2-applestrudel

Hi, thanks for your description! Everything works great so far. At least the triggering of the routine.

I can not get the "node-red-contrib-alexa-remote2-applestrudel" activated. The login with proxi doesn't work, because I can't get a port forwarding set up on my Synology VM. Logging in with email and password doesn't work for some reason. And the cookie.. I do not know how it works or how to get the cookie. Maybe you could help me with this.

Another question relatet to the virtual Device (node-red-contrib-virtual-smart-home)...  
I can select that the device is a termostat. so it is also displayed in the Alexa app... but only 0.0°C  
Can I also directly display the correct value and avoid the way with "applestrudel"?

---

<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:** [11 January 2022 16:32 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/5 "2022-01-11T16:32:43Z")

</div>

I use Proxy to Initalise the nodes, I save that Authorization to a context variable.  
I set auto initialise to off, and use the init node to Initialise the nodes. I do not use any Docker type container, so can not help there. I will add that you do not need to use port 3456, you can set it to any other.

The VSH node can take an input to feed back changes to alexa. From the help notes

> The node also accepts inbound messages that can be used to inform Alexa about local device changes, which will then be reflected in the Alexa app. If the passthrough option is enabled, this will also trigger an outbound message, just like when the node gets invoked via Alexa

These would be the same as the out bound messages you get when you invoke the devices from alexa.  
From the info help details section

```auto
Temperature Sensor

payload.temperature float
    Temperature
payload.scale string
    Scale / unit of temperature. Allowed values: 'CELSIUS', 'FAHRENHEIT', 'KELVIN' 

Thermostat

payload.powerState string
    'ON' or 'OFF'
payload.scale string
    Scale / unit of temperature. Allowed values: 'CELSIUS', 'FAHRENHEIT', 'KELVIN' 
payload.targetScale string
    Scale / unit of targetTemperature. Allowed values: 'CELSIUS', 'FAHRENHEIT', 'KELVIN' 
payload.targetTemperature float
    Target temperature
payload.temperature float
    Measured temperature
payload.thermostatMode string
    'AUTO', 'HEAT', 'COOL', 'ECO', 'OFF'

```

---

<div class="post-metadata">

**Author:** ![smart\_hendrik](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@smart\_hendrik](https://discourse.nodered.org/u/smart_hendrik)\
**Post date:** [12 January 2022 11:43 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/6 "2022-01-12T11:43:15Z")

</div>

Thanks, i have now extracted and inserted a cookie with DevTools from [Alexa.amazon.com](http://Alexa.amazon.com). It works for now. So i dont need the output with the the VSH node. (I didn't manage it anyway)

When I ask Alexa for "buffer temperature" it starts a routine. The routine "switches" Pufferspeicher (the virtual device in NodeRed) that triggers the flow and asks for the current temp.  
At the end, the "Routine speak" element is triggered and Alexa says the current temp.

Now it's a matter of a few more details: I want the routine to read out not only the variable, but a text before and after it.

".........." payload.eta.value[0].$.strValue "................."

How can I write this?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f185b042f926e1371e90990e28570ac654f5c.png)

The second flow regularly requests the values and shows them to me in the HomeAssistant. If the temperature is \<40 ° C Alexa should inform me. Also works so far without problems.

Only I would like to customize the announcement (text before and after the variable).  
Can I possibly just rewrite my own "msg. payload xy" variable and then use it? So basically link the text and the variable in a new variable?  
Thank you for your patience with all of my questions..!

---

<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:** [12 January 2022 11:52 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/7 "2022-01-12T11:52:07Z")

</div>

You can use Javascript in a function node `var = "some text " + variable + " some text"`

example

```auto
[{"id":"6eb15d69.e29e04","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"24","payloadType":"num","x":160,"y":980,"wires":[["15f57278.602dee"]]},{"id":"15f57278.602dee","type":"function","z":"c791cbc0.84f648","name":"","func":"msg.payload = \"the temerature is \" + msg.payload + \" degrees\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":330,"y":980,"wires":[["cdd3f304.e56e5"]]},{"id":"cdd3f304.e56e5","type":"debug","z":"c791cbc0.84f648","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":520,"y":980,"wires":[]}]

```

or you can use a template node  
example

```auto
[{"id":"6eb15d69.e29e04","type":"inject","z":"c791cbc0.84f648","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"24","payloadType":"num","x":160,"y":980,"wires":[["644e8f4c.4912a"]]},{"id":"644e8f4c.4912a","type":"template","z":"c791cbc0.84f648","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"the temerature is {{payload}} degrees","output":"str","x":320,"y":980,"wires":[["cdd3f304.e56e5"]]},{"id":"cdd3f304.e56e5","type":"debug","z":"c791cbc0.84f648","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":520,"y":980,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![sylviu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sylviu/32/54497_2.png) [@sylviu](https://discourse.nodered.org/u/sylviu)\
**Post date:** [18 January 2022 10:24 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/8 "2022-01-18T10:24:09Z")

</div>

Hello all

I'm new on home assistant / node red and need help pls

I want to write the name of the music on home assistant

i have a node that change state on node-red and send to alexa to play that music.

Is that possible?

Thank you

---

<div class="post-metadata">

**Author:** ![sylviu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sylviu/32/54497_2.png) [@sylviu](https://discourse.nodered.org/u/sylviu)\
**Post date:** [18 January 2022 10:25 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/9 "2022-01-18T10:25:02Z")

</div>

I have a input.text helper on home assistant

---

<div class="post-metadata">

**Author:** ![smart\_hendrik](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@smart\_hendrik](https://discourse.nodered.org/u/smart_hendrik)\
**Post date:** [18 January 2022 11:25 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/10 "2022-01-18T11:25:10Z")

</div>

Hi Sylviu,

please open a new topic to ask your question. you should get answers faster that way. You should also describe your question in more detail. So you could attach your flow or add pictures to the new Topic.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/f/4f1b7112855667cfe52612b5457edfea09b55e0c.png)

Best regards Hendrik

---

<div class="post-metadata">

**Author:** ![sylviu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sylviu/32/54497_2.png) [@sylviu](https://discourse.nodered.org/u/sylviu)\
**Post date:** [18 January 2022 11:30 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/11 "2022-01-18T11:30:18Z")

</div>

thk you for yr reply

---

<div class="post-metadata">

**Author:** ![smart\_hendrik](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@smart\_hendrik](https://discourse.nodered.org/u/smart_hendrik)\
**Post date:** [18 January 2022 11:35 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/12 "2022-01-18T11:35:27Z")

</div>

Hi E1cid  
I have another question regarding proxi authenification. I now also use this method and for this purpose have used an open port of the VM. Also worked great. However, I have to log on again every second day (open 192.168.178........ on you browser and so on..).

Now I tried to enter some data in the field "File Path". However, this does not really work! What exactly do I have to do to bypass or avoid the manual login?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/a/3a81d24739bf48d703a792b31f26c2498bd60ea1.png)

Best regards Hendrik

---

<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:** [18 January 2022 15:31 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/13 "2022-01-18T15:31:43Z")

</div>

What i do is this

```auto
[{"id":"e63c03b3.745b48","type":"inject","z":"d629013b.18a518","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"86400","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"alexa","payloadType":"flow","x":100,"y":1460,"wires":[["89e02d64.da77c8"]]},{"id":"89e02d64.da77c8","type":"alexa-remote-init","z":"d629013b.18a518","name":"","account":"c8738129.d902c","option":"initialise","x":290,"y":1460,"wires":[["fc0183e2.5e7c2"]]},{"id":"fc0183e2.5e7c2","type":"change","z":"d629013b.18a518","name":"","rules":[{"t":"set","p":"alexa","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":1460,"wires":[["421c02e9.68fdec"]]},{"id":"c8738129.d902c","type":"alexa-remote-account","name":"alexa remote 2","authMethod":"proxy","proxyOwnIp":"localhost","proxyPort":"3456","cookieFile":"","refreshInterval":"14","alexaServiceHost":"layla.amazon.co.uk","amazonPage":"amazon.co.uk","acceptLanguage":"en-GB","userAgent":"","useWsMqtt":"on","autoInit":"off"}]

```

and set auto int to off, as below

 ![Screenshot_20220118-153056](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/1/31028ae132665d29546dc60ea0d6386691372a6e.png)

Also make sure your context store is persistant  
[https://nodered.org/docs/user-guide/context#context-stores](https://nodered.org/docs/user-guide/context#context-stores)

---

<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:** [1 February 2022 15:31 UTC](https://discourse.nodered.org/t/alexa-read-data-when-requested/56453/14 "2022-02-01T15:31:51Z")

</div>

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