You’re right. I missed changing one reference of object to name
@jrb5665 @rlongfield Thanks so much for your replies guys (not gender specific). I’ll give it a go this weekend
I once sat and re-read pages of code trying to find the error in the student lounge. A friend of mine who was in graphic arts grabbed my printout and said ‘let me see that’. After a few minutes she said ‘How come there isn’t a comma here?’
I learned a second set of eyes is super important, it’s always the simple things that cause so many headaches 
I’m glad I was able to help instead of always asking for help.
So, did it work out?
Sorry for the delay, had a family medical situation.
Here is the third flow. This one started as a ‘Good Morning’ flow in which Rhasspy responded with 'Good Morning, it’s here the weather for .
The date and time are pulled from Node Red functions and the local weather is pulled from Home Assistant using the Environment Canada integration which pulls the text of the local weather. This information is combined and sent to Rhasspy to speak.
Here is a screenshot of the flow:
Here is the flow code:
[{"id":"7ade62dd838b317b","type":"link in","z":"0c02c9336ac1f198","name":"Good Morning","links":["e8eb3ccae3875984"],"x":45,"y":300,"wires":[["bda376b2dfecc097"]]},{"id":"bda376b2dfecc097","type":"switch","z":"0c02c9336ac1f198","name":"","property":"intent.name","propertyType":"msg","rules":[{"t":"eq","v":"GoodMorning","vt":"str"},{"t":"eq","v":"GoodAfternoon","vt":"str"},{"t":"eq","v":"GoodEvening","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":160,"y":300,"wires":[["7246466b63027090"],["7246466b63027090"],["7246466b63027090"],["1c8d9c1c4fae7fbb"]]},{"id":"1c8d9c1c4fae7fbb","type":"link out","z":"0c02c9336ac1f198","name":"Unknown Request Out","mode":"link","links":["cec7f37cee58adda"],"x":275,"y":480,"wires":[]},{"id":"81e09a621debb0a7","type":"comment","z":"0c02c9336ac1f198","name":"Unknown Sending to News and Jokes","info":"","x":310,"y":440,"wires":[]},{"id":"7246466b63027090","type":"time-range-switch","z":"0c02c9336ac1f198","name":"Morning","lat":"","lon":"","startTime":"00:00","endTime":"11:59","startOffset":0,"endOffset":0,"x":380,"y":140,"wires":[["08c6bc03df8fdc50"],["f4269ccb40969c6f"]]},{"id":"634b90691a4532e3","type":"time-range-switch","z":"0c02c9336ac1f198","name":"Evening","lat":"","lon":"","startTime":"16:00","endTime":"23:30","startOffset":0,"endOffset":0,"x":380,"y":260,"wires":[["51bd321942fd8a0a"],[]]},{"id":"f4269ccb40969c6f","type":"time-range-switch","z":"0c02c9336ac1f198","name":"Afternoon","lat":"","lon":"","startTime":"12:00","endTime":"15:59","startOffset":0,"endOffset":0,"x":380,"y":200,"wires":[["56ed3d23e4d0c483"],["634b90691a4532e3"]]},{"id":"08c6bc03df8fdc50","type":"change","z":"0c02c9336ac1f198","name":"Good Morning","rules":[{"t":"set","p":"slots.am-pm","pt":"msg","to":"Good Morning","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":120,"wires":[["57ce8155a9b3ed3a"]]},{"id":"4c47ea676720fdbf","type":"template","z":"0c02c9336ac1f198","name":"Good Morning","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{slots.am-pm}}, it is {{slots.time}} on {{slots.date}}. The Environment Canada forecast for {{{slots.weather}}}","output":"str","x":840,"y":260,"wires":[["c2d1bddbe1d79c3e"]]},{"id":"5c885d384d08a1c2","type":"api-current-state","z":"0c02c9336ac1f198","name":"","server":"890f6b21.aaf278","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is_not","entity_id":"sensor.forecast","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"slots.weather","propertyType":"msg","value":"","valueType":"entityState"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":890,"y":180,"wires":[["4c47ea676720fdbf"]]},{"id":"c2d1bddbe1d79c3e","type":"link out","z":"0c02c9336ac1f198","name":"Good Morning Speech Out","mode":"link","links":["fdf0440997c3a4ea"],"x":775,"y":340,"wires":[]},{"id":"2501c141dbe7fecf","type":"function","z":"0c02c9336ac1f198","name":"Get Time","func":"var timeString = new Date().toLocaleTimeString([],\n{\n hour: \"2-digit\", \n minute: \"2-digit\",\n hour12: true\n})\n\n{\nmsg.slots.time = timeString;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":120,"wires":[["5c885d384d08a1c2"]]},{"id":"56ed3d23e4d0c483","type":"change","z":"0c02c9336ac1f198","name":"Good Afternoon","rules":[{"t":"set","p":"slots.am-pm","pt":"msg","to":"Good Afternoon","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":180,"wires":[["57ce8155a9b3ed3a"]]},{"id":"51bd321942fd8a0a","type":"change","z":"0c02c9336ac1f198","name":"Good Evening","rules":[{"t":"set","p":"slots.am-pm","pt":"msg","to":"Good Evening","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":240,"wires":[["57ce8155a9b3ed3a"]]},{"id":"57ce8155a9b3ed3a","type":"change","z":"0c02c9336ac1f198","name":"Get Date","rules":[{"t":"set","p":"slots.date","pt":"msg","to":"$moment().format('ddd MMM DD')","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":120,"wires":[["2501c141dbe7fecf"]]},{"id":"890f6b21.aaf278","type":"server","name":"Home Assistant","version":2,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]
Here is my fourth and (currently) final flow. It is the News and Joke flow. So for each flow there is a switch that takes the intent from Rhasspy and checks to see if it has a switch option for that, if not I use a ‘link out’ node to pass it to the next flow that receives the intent using a ‘link in’ node. Since this is the last flow in the series there isn’t a link out, instead it has a ‘Unknown Request’. This is just a ‘template’ node that say’s “I’m sorry I didn’t understand your request” and sends that off to Rhasspy to speak.
This was the best solution I could come up with to keep the flows as uncluttered as possible and to make it easy to expand the sequence. If I want to add a new flow I just need to move the ‘Unknown Request’ node to the new flow and replace it with a ‘link out’ node.
In this node I’m grabbing the CBC Hourly News mp3 file using a ‘http request node’. I am then passing that .mp3 to a ‘ffmpeg conversion’ node which I have set to convert the mp3 to a mono .wav file. You can get the ‘ffmpeg conversion’ node using the ‘node-red-contrib-media-utils’ add-on.
The .wav is then passed to a ‘function node’ which sets the headers, followed by a delay of 5 secs. I don’t know if the delay is required but I thought I’d bake in a bit of a buffer just in case. After the delay the .wav file is sent to Rhasspy using a ‘http request’ node to the Rhasspy /api/play-wav function.
For the Joke section I’m tapping into the icanhazdadjoke.com website. The only request the have is that when asking for a joke that the User-Agent portion of the http request be set to something that would allow them to see who/what is using the jokes. I’m accomplishing this using a ‘Change node’ to set the User-Agent in the headers to ‘Rhasspy Skill’. After setting the header I user a ‘http request node’ to get a parsed JSON object. Last step is to use a ‘template node’ to pull just the joke out of the payload and pass it along.
This was by far the hardest flow to create as it required a lot of testing to figure out how to get, and then process the information I wanted.
Here is a screenshot of the flow:
Here is the flow code:
[{"id":"3030ec117ce518a1","type":"tab","label":"News and Jokes","disabled":false,"info":"","env":[]},{"id":"fffb8cd8ef850ab4","type":"debug","z":"3030ec117ce518a1","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":970,"y":600,"wires":[]},{"id":"7b4a4df181fa98ef","type":"ffmpeg-conversion","z":"3030ec117ce518a1","name":"MP3 to Wav Conversion","format":"wav","audiochannels":"mono","x":370,"y":260,"wires":[["3fff6d1b7d74f31a"]]},{"id":"3fff6d1b7d74f31a","type":"function","z":"3030ec117ce518a1","name":"Setting Message Headers","func":"msg.headers = {};\nmsg.headers['Content-Type'] = 'audio/wav';\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":260,"wires":[["779ed042f36fde8d"]]},{"id":"6d210ba2f4ec1dcc","type":"http request","z":"3030ec117ce518a1","name":"Get CBC Hourly News","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://podcast-a.akamaihd.net/mp3/hourlynews.mp3","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"credentials":{},"x":360,"y":200,"wires":[["7b4a4df181fa98ef","cd0d4fb0f234acba"]]},{"id":"1759cb7d163cccd2","type":"http request","z":"3030ec117ce518a1","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.230:12101/api/play-wav","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"credentials":{},"x":710,"y":340,"wires":[[]]},{"id":"cd0d4fb0f234acba","type":"template","z":"3030ec117ce518a1","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"One moment while I fetch the news","output":"str","x":620,"y":200,"wires":[["885921b779d12688"]]},{"id":"885921b779d12688","type":"link out","z":"3030ec117ce518a1","name":"News Speech","mode":"link","links":["fdf0440997c3a4ea"],"x":995,"y":340,"wires":[]},{"id":"779ed042f36fde8d","type":"delay","z":"3030ec117ce518a1","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":480,"y":340,"wires":[["1759cb7d163cccd2"]]},{"id":"ccb4bde7dbeb0aa7","type":"switch","z":"3030ec117ce518a1","name":"","property":"intent.name","propertyType":"msg","rules":[{"t":"eq","v":"News","vt":"str"},{"t":"eq","v":"Joke","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":130,"y":260,"wires":[["6d210ba2f4ec1dcc"],["24e196527a2e1d55"],["e23d5444a3db2f0c"]]},{"id":"cec7f37cee58adda","type":"link in","z":"3030ec117ce518a1","name":"News and Jokes","links":["1c8d9c1c4fae7fbb"],"x":35,"y":260,"wires":[["ccb4bde7dbeb0aa7"]]},{"id":"24e196527a2e1d55","type":"change","z":"3030ec117ce518a1","name":"","rules":[{"t":"set","p":"headers","pt":"msg","to":"{\"Accept\":\"application/json\",\"User-Agent\":\"Rhasspy Skill\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":460,"wires":[["d16702df4d092ae5"]]},{"id":"d16702df4d092ae5","type":"http request","z":"3030ec117ce518a1","name":"Dad Jokes","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://icanhazdadjoke.com/","tls":"","persist":false,"proxy":"","authType":"","senderr":true,"credentials":{},"x":570,"y":460,"wires":[["0ec027152009c054"]]},{"id":"0ec027152009c054","type":"template","z":"3030ec117ce518a1","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload.joke}} !","output":"str","x":800,"y":520,"wires":[["885921b779d12688","fffb8cd8ef850ab4"]]},{"id":"68775c9835fbb16f","type":"comment","z":"3030ec117ce518a1","name":"Speech out to Flow 1","info":"","x":1020,"y":260,"wires":[]},{"id":"e23d5444a3db2f0c","type":"template","z":"3030ec117ce518a1","name":"Unknown Request","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"I'm Sorry I did not understand your request.","output":"str","x":330,"y":560,"wires":[["885921b779d12688"]]},{"id":"3cebcbdf801d174d","type":"comment","z":"3030ec117ce518a1","name":"Get Random Joke","info":"","x":470,"y":400,"wires":[]}]
The only issue I have with this is that I’m using NanoTTS for Rhasspy’s voice and it makes understanding the jokes difficult at times as there is some buzz generated in the speaker.
Hi @rlongfield!
Amazing flow! I would love to copy it to hear the (most recent) news from german radio Deutschlandfunk. My problem is I can not find a link that points to the most recent mp3. I only find xml, rss or html links.
https://www.deutschlandfunk.de/nachrichten-108.xml
or
https://www.deutschlandfunk.de/nachrichten-100.rss
for example.
Do you have a tip for me how to solve this?
Thank you! 
So I noticed on this page there is a link to the latest mp3 file.
Nachrichten vom 08.02.2022, 19:00 Uhr →MP3
The →MP3 portion above links out to the actual MP3 file. https://podcast-mp3.dradio.de/podcast/2022/02/08/nachrichten_dlf_20220208_1900_5a7e09eb.mp3
So the difference between your news source and mine is that the CBC has a static file name for the MP3 file so I don’t need to do anything fancy and I can just code NodeRed to grab the one file regardless of the date or time.
Your source seems to update not just the file name but also the file location (sub directories). They also seem to be adding a random string of characters to the end of the file name. Perhaps it’s a hash of some sort?
If it wasn’t for that string it would take some work but it would be possible to create a NodeRed flow that would grab the most current MP3 file and play it. Unless you know what that end string is or figure out what it might be I think you are out of luck.
I recommend you head over to the NodeRed forum, there are some pretty smart people there so there might be a different way of grabbing the link to the most current file that I don’t know about. Perhaps a way to scrape the xml file?
Sorry I couldn’t be of more help.
Thank you very much @rlongfield! Your thoughts helped me a lot!
After your answer I stumbled upon a solution via Home Assistant …and the next problem.
So far I could extract the link to the newest mp3-file via a Home Assistant Sensor,
in my config.yaml it looks like this:
> sensor:
> - platform: scrape
> resource: https://www.deutschlandfunk.de/podcast-nachrichten.1257.de.podcast.xml
> name: podcast_deutschlandfunk_nachrichten
> select: 'enclosure:nth-of-type(1)'
> attribute: url
> scan_interval: 300
Then I am adding one Home Assitant Node in your flow, which checks the current state of sensor.podcast_deutschlandfunk_nachrichten and passes it in your flow.
And everything seems to work until the conversion node. It is stuck with “reading buffer”. Any idea why?
Hmmm there isn’t much to change in the conversion node.
What is the MP3 file your sensor is returning? Can you provide an example and I’ll see what results I get?
This is what I get from the current-state-node as msg.payload (string). It is then passed to your http-request-node
“https://podcast-mp3.dradio.de/podcast/2022/02/10/nachrichten_dlf_20220210_1130_ce2ec5f3.mp3”
In your “Get CBC”-Node I replaced the URL with {{{payload}}}.
And this is what I get as msg.object out of it:
{“intent”:{“name”:“Nachrichten”,“confidence”:1},“entities”:[],“slots”:{},“text”:“nachrichten”,“raw_text”:“nachrichten”,“tokens”:[“nachrichten”],“raw_tokens”:[“nachrichten”],“wakeword_id”:null,“siteId”:“satellite”,“sessionId”:“22f71197-299c-4e56-9049-464c50523cbc”,“customData”:null,“wakewordId”:null,“lang”:null,"_session":{“type”:“websocket”,“id”:“533fd0f13253c7c4”},"_msgid":“af74322157d2cd25”,"_event":“node:8518cd2330e9e245”,“payload”:[73,68,51,3,0,0,0,0,4,101,84,68,65,84,0,0,0,11,0,0,1,255,254,49,0,48,0,48,0,50,0,84,89,69,82,0,0,0,11,0,0,1,255,254,50,0,48,0,50,0,50,0,84,76,65,78,0,0,0,9,0,0,1,255,254,68,0,69,0,85,0,84,65,76,66,0,0,0,33,0,0,1,255,254,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,102,0,117,0,110,0,107,0,84,73,84,50,0,0,0,77,0,0,1,255,254,78,0,97,0,99,0,104,0,114,0,105,0,99,0,104,0,116,0,101,0,110,0,32,0,118,0,111,0,109,0,32,0,49,0,48,0,46,0,48,0,50,0,46,0,50,0,48,0,50,0,50,0,44,0,32,0,49,0,49,0,58,0,51,0,48,0,32,0,85,0,104,0,114,0,67,79,77,77,0,0,0,86,0,0,1,69,78,71,254,255,0,0,255,254,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,114,0,97,0,100,0,105,0,111,0,32,0,45,0,32,0,49,0,48,0,46,0,48,0,50,0,46,0,50,0,48,0,50,0,50,0,32,0,49,0,49,0,58,0,51,0,48,0,58,0,48,0,48,0,84,80,69,49,0,0,0,33,0,0,1,255,254,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,102,0,117,0,110,0,107,0,84,79,80,69,0,0,0,75,0,0,1,255,254,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,102,0,117,0,110,0,107,0,45,0,78,0,97,0,99,0,104,0,114,0,105,0,99,0,104,0,116,0,101,0,110,0,114,0,101,0,100,0,97,0,107,0,116,0,105,0,111,0,110,0,84,80,85,66,0,0,0,33,0,0,1,255,254,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,102,0,117,0,110,0,107,0,84,67,79,80,0,0,0,45,0,0,1,255,254,50,0,48,0,50,0,50,0,32,0,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,114,0,97,0,100,0,105,0,111,0,87,79,82,83,0,0,0,29,0,0,104,116,116,112,58,47,47,119,119,119,46,100,101,117,116,115,99,104,108,97,110,100,102,117,110,107,46,100,101,87,80,85,66,0,0,0,30,0,0,104,116,116,112,58,47,47,119,119,119,46,100,101,117,116,115,99,104,108,97,110,100,114,97,100,105,111,46,100,101,84,73,77,69,0,0,0,11,0,0,1,255,254,49,0,49,0,51,0,48,0,255,251,144,64,0,0,0,0,0,75,128,0,0,8,0,0,9,112,0,0,1,0,0,1,46,0,0,0,32,0,0,37,192,0,0,4,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,32,0,0,0,16,0,0,0,22,64,0,0,0,5,67,143,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],“data”:{“entity_id”:“sensor.podcast_deutschlandfunk_nachrichten”,“state”:“https://podcast-mp3.dradio.de/podcast/2022/02/10/nachrichten_dlf_20220210_1130_ce2ec5f3.mp3",“attributes”:{“friendly_name”:“podcast_deutschlandfunk_nachrichten”},“last_changed”:“2022-02-10T10:45:19.046550+00:00”,“last_updated”:“2022-02-10T10:45:19.046550+00:00”,“context”:{“id”:“dac99ac88baaa989a4d96beab5e75784”,“parent_id”:null,“user_id”:null},“timeSinceChangedMs”:834870,“original_state”:“https://podcast-mp3.dradio.de/podcast/2022/02/10/nachrichten_dlf_20220210_1130_ce2ec5f3.mp3”},“statusCode”:200,“headers”:{“accept-ranges”:“bytes”,“content-type”:“audio/mpeg”,“etag”:"“93e5250f764b3d5292a7f97181f37a68:1644489703.296094"”,“last-modified”:"Thu, 10 Feb 2022 10:41:43 GMT”,“server”:“AkamaiNetStorage”,“content-length”:“4643084”,“date”:“Thu, 10 Feb 2022 10:59:14 GMT”,“connection”:“close”,“access-control-max-age”:“86400”,“access-control-allow-credentials”:“false”,“access-control-allow-headers”:"",“access-control-allow-methods”:“GET, HEAD, OPTIONS”,“access-control-allow-origin”:"",“vary”:“Origin, Access-Control-Request-Headers”,“x-node-red-request-node”:“63f4f96a”},“responseUrl”:“https://podcast-mp3.dradio.de/podcast/2022/02/10/nachrichten_dlf_20220210_1130_ce2ec5f3.mp3",“redirectList”:[],"retry”:0}
EDIT:
And here is a screenshot of the respective flow:
Can anyone help me with this? I still could not solve it. @rlongfield maybe?
Thank you very much in advance!
Can you export the flow and paste it here?
Sorry, apparently my response to your question didn’t get posted. I think there was a site issue a few months back. I’m sure I responded and then when I went to check your question was gone, I assumed it wasn’t relevant anymore.
Ok, just checked the “https://www.deutschlandfunk.de/podcast-nachrichten.1257.de.podcast.xml” site and I remember what is happening.
There is a new broadcast published every 30 minutes. Unlike the CBC here, your provider is changing the URL for each broadcast. This means you can’t set a static URL like I am able to do.
Unfortunately the provider just isn’t changing the Date and Time in the URL they are also including what appears to be a hash of something. If it was just the Date and Time that was changing that would be a fairly easy fix. In your example the URL contains “20220210_0930_” which is Feb 10, 2022 at 9:30am.
The kicker is this bit “ce2ec5f3” which is what I think might be the hash. What it’s purpose is, I’m not sure, other than maybe to prevent exactly what you are trying to do.
Maybe instead of accessing the URL directly as it changes, you scrape the current URL from the website and then use that in the node? I’ve not tried scraping in Node Red but I have scraped successfully for my local marine weather forecast and conditions for use in Home Assistant.
Unless of course you can sort out how that bit of trailing data is generated and then you just need a few extra nodes before the node that grabs the mp3 file.
Update:
I just looked at the source code for the URL and if you scrape the content between the first <guid> </guid> tags you’ll get the latest broadcast mp3 file.
[{“id”:“29a57cf798248946”,“type”:“tab”,“label”:“DLF-Nachrichten”,“disabled”:false,“info”:"",“env”:[]},{“id”:“77b48a195cc71016”,“type”:“ffmpeg-conversion”,“z”:“29a57cf798248946”,“name”:“MP3 to Wav Conversion”,“format”:“wav”,“audiochannels”:“mono”,“audiofrequency”:"",“audiobitrate”:"",“audiocodec”:"",“x”:390,“y”:180,“wires”:[[“8677b6a7755c3f2b”,“6f24b4c0b3fd47d1”]]},{“id”:“8677b6a7755c3f2b”,“type”:“function”,“z”:“29a57cf798248946”,“name”:“Setting Message Headers”,“func”:“msg.headers = {};\nmsg.headers[‘Content-Type’] = ‘audio/wav’;\nreturn msg;”,“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:650,“y”:180,“wires”:[[“3ae254a6bc828a6b”]]},{“id”:“edcad1f5a59e836f”,“type”:“http request”,“z”:“29a57cf798248946”,“name”:“Hole DLF Nachrichten”,“method”:“GET”,“ret”:“bin”,“paytoqs”:“ignore”,“url”:"{{{payload}}}",“tls”:"",“persist”:false,“proxy”:"",“authType”:"",“senderr”:false,“x”:500,“y”:80,“wires”:[[“993eef3f8d2638d2”,“77b48a195cc71016”]]},{“id”:“53bef890e3208840”,“type”:“http request”,“z”:“29a57cf798248946”,“name”:"",“method”:“POST”,“ret”:“bin”,“paytoqs”:“ignore”,“url”:“http://192.168.178.60:12101/api/play-wav",“tls”:"",“persist”:false,“proxy”:"",“authType”:"",“senderr”:false,“x”:630,“y”:260,“wires”:[[]]},{“id”:“993eef3f8d2638d2”,“type”:“template”,“z”:“29a57cf798248946”,“name”:"",“field”:“payload”,“fieldType”:“msg”,“format”:“handlebars”,“syntax”:“mustache”,“template”:"Deutschlandfunk. Die Nachrichten.”,“output”:“str”,“x”:740,“y”:80,“wires”:[[“2b5de698db516805”]]},{“id”:“2b5de698db516805”,“type”:“link out”,“z”:“29a57cf798248946”,“name”:“News Speech”,“mode”:“link”,“links”:[“fdf0440997c3a4ea”],“x”:995,“y”:340,“wires”:[]},{“id”:“3ae254a6bc828a6b”,“type”:“delay”,“z”:“29a57cf798248946”,“name”:"",“pauseType”:“delay”,“timeout”:“5”,“timeoutUnits”:“seconds”,“rate”:“1”,“nbRateUnits”:“1”,“rateUnits”:“second”,“randomFirst”:“1”,“randomLast”:“5”,“randomUnits”:“seconds”,“drop”:false,“allowrate”:false,“outputs”:1,“x”:400,“y”:260,“wires”:[[“53bef890e3208840”,“65a87ebcaa130e61”]]},{“id”:“e7afe18c4bc091af”,“type”:“switch”,“z”:“29a57cf798248946”,“name”:"",“property”:“intent.name”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“Nachrichten”,“vt”:“str”},{“t”:“eq”,“v”:“GetTemperatureBalkon”,“vt”:“str”},{“t”:“eq”,“v”:“GetSolarmodul”,“vt”:“str”},{“t”:“else”}],“checkall”:“true”,“repair”:false,“outputs”:4,“x”:150,“y”:240,“wires”:[[“f59532b125d7e4c0”],[],[],[]]},{“id”:“cc6b12508c37204f”,“type”:“link in”,“z”:“29a57cf798248946”,“name”:“News and Jokes”,“links”:[“8518cd2330e9e245”],“x”:55,“y”:240,“wires”:[[“e7afe18c4bc091af”]]},{“id”:“8b77a0dd57b75bc9”,“type”:“comment”,“z”:“29a57cf798248946”,“name”:“Speech out to Flow 1”,“info”:"",“x”:1020,“y”:280,“wires”:[]},{“id”:“65a87ebcaa130e61”,“type”:“debug”,“z”:“29a57cf798248946”,“name”:“Nach dem Check State Node Suche nach Fehlerquelle bei DLF Nachrichten”,“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“statusVal”:"",“statusType”:“auto”,“x”:1260,“y”:100,“wires”:[]},{“id”:“f59532b125d7e4c0”,“type”:“api-current-state”,“z”:“29a57cf798248946”,“name”:“DLF Nachrichten”,“server”:“38a17052.fa78e”,“version”:3,“outputs”:1,“halt_if”:"",“halt_if_type”:“str”,“halt_if_compare”:“is”,“entity_id”:“sensor.podcast_deutschlandfunk_nachrichten”,“state_type”:“str”,“blockInputOverrides”:false,“outputProperties”:[{“property”:“payload”,“propertyType”:“msg”,“value”:"",“valueType”:“entityState”},{“property”:“data”,“propertyType”:“msg”,“value”:"",“valueType”:“entity”}],“for”:0,“forType”:“num”,“forUnits”:“minutes”,“override_topic”:false,“state_location”:“payload”,“override_payload”:“msg”,“entity_location”:“data”,“override_data”:“msg”,“x”:260,“y”:80,“wires”:[[“edcad1f5a59e836f”]]},{“id”:“2bfa6727c0e1b555”,“type”:“debug”,“z”:“29a57cf798248946”,“name”:“aus dem Switch Node”,“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“statusVal”:"",“statusType”:“auto”,“x”:1120,“y”:40,“wires”:[]},{“id”:“6f24b4c0b3fd47d1”,“type”:“debug”,“z”:“29a57cf798248946”,“name”:“Nach Hole DLF Nachrichten”,“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“true”,“targetType”:“full”,“statusVal”:"",“statusType”:“auto”,“x”:1120,“y”:160,“wires”:[]},{“id”:“2f280f3dc55ede1e”,“type”:“inject”,“z”:“29a57cf798248946”,“name”:"",“props”:[{“p”:“payload”},{“p”:“topic”,“vt”:“str”}],“repeat”:"",“crontab”:"",“once”:false,“onceDelay”:0.1,“topic”:"",“payload”:"",“payloadType”:“date”,“x”:80,“y”:60,“wires”:[[“f59532b125d7e4c0”]]},{“id”:“38a17052.fa78e”,“type”:“server”,“name”:“Home Assistant”,“version”:2,“addon”:true,“rejectUnauthorizedCerts”:true,“ha_boolean”:“y|yes|true|on|home|open”,“connectionDelay”:true,“cacheJson”:true,“heartbeat”:false,“heartbeatInterval”:30}]
Thank you very much for looking this thorougly to my problem here!
I think I managed to scrape the newest URL (via home assistant) to the most recent mp3 file.
The URL is handed to the http-request-node and then this is passed to the ffmpeg-conversion-node:
{"_msgid":“8d2192579d0aa3e0”,“payload”:[73,68,51,3,0,0,0,0,4,101,84,68,65,84,0,0,0,11,0,0,1,255,254,50,0,49,0,48,0,52,0,84,89,69,82,0,0,0,11,0,0,1,255,254,50,0,48,0,50,0,50,0,84,76,65,78,0,0,0,9,0,0,1,255,254,68,0,69,0,85,0,84,65,76,66,0,0,0,33,0,0,1,255,254,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,102,0,117,0,110,0,107,0,84,73,84,50,0,0,0,77,0,0,1,255,254,78,0,97,0,99,0,104,0,114,0,105,0,99,0,104,0,116,0,101,0,110,0,32,0,118,0,111,0,109,0,32,0,50,0,49,0,46,0,48,0,52,0,46,0,50,0,48,0,50,0,50,0,44,0,32,0,50,0,51,0,58,0,48,0,48,0,32,0,85,0,104,0,114,0,67,79,77,77,0,0,0,86,0,0,1,69,78,71,254,255,0,0,255,254,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,114,0,97,0,100,0,105,0,111,0,32,0,45,0,32,0,50,0,49,0,46,0,48,0,52,0,46,0,50,0,48,0,50,0,50,0,32,0,50,0,51,0,58,0,48,0,48,0,58,0,48,0,48,0,84,80,69,49,0,0,0,33,0,0,1,255,254,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,102,0,117,0,110,0,107,0,84,79,80,69,0,0,0,75,0,0,1,255,254,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,102,0,117,0,110,0,107,0,45,0,78,0,97,0,99,0,104,0,114,0,105,0,99,0,104,0,116,0,101,0,110,0,114,0,101,0,100,0,97,0,107,0,116,0,105,0,111,0,110,0,84,80,85,66,0,0,0,33,0,0,1,255,254,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,102,0,117,0,110,0,107,0,84,67,79,80,0,0,0,45,0,0,1,255,254,50,0,48,0,50,0,50,0,32,0,68,0,101,0,117,0,116,0,115,0,99,0,104,0,108,0,97,0,110,0,100,0,114,0,97,0,100,0,105,0,111,0,87,79,82,83,0,0,0,29,0,0,104,116,116,112,58,47,47,119,119,119,46,100,101,117,116,115,99,104,108,97,110,100,102,117,110,107,46,100,101,87,80,85,66,0,0,0,30,0,0,104,116,116,112,58,47,47,119,119,119,46,100,101,117,116,115,99,104,108,97,110,100,114,97,100,105,111,46,100,101,84,73,77,69,0,0,0,11,0,0,1,255,254,50,0,51,0,48,0,48,0,255,251,144,64,0,0,0,0,0,75,128,0,0,8,0,0,9,112,0,0,1,0,0,1,46,0,0,0,32,0,0,37,192,0,0,4,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,32,0,0,0,16,0,0,0,22,64,0,0,0,5,67,143,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],“topic”:"",“data”:{“entity_id”:“sensor.podcast_deutschlandfunk_nachrichten”,“state”:“https://podcast-mp3.dradio.de/podcast/2022/04/21/nachrichten_dlf_20220421_2300_d4ecb66b.mp3",“attributes”:{“friendly_name”:“podcast_deutschlandfunk_nachrichten”},“last_changed”:“2022-04-21T21:16:23.099835+00:00”,“last_updated”:“2022-04-21T21:16:23.099835+00:00”,“context”:{“id”:“c591a7431b7b6498aff49ff2bfbecbd3”,“parent_id”:null,“user_id”:null},“timeSinceChangedMs”:2837895,“original_state”:“https://podcast-mp3.dradio.de/podcast/2022/04/21/nachrichten_dlf_20220421_2300_d4ecb66b.mp3”},“statusCode”:200,“headers”:{“accept-ranges”:“bytes”,“content-type”:“audio/mpeg”,“etag”:"“4e97c696603d52775594579366fef8a6:1650575693.51835"”,“last-modified”:"Thu, 21 Apr 2022 21:14:56 GMT”,“server”:“AkamaiNetStorage”,“content-length”:“9634574”,“date”:“Thu, 21 Apr 2022 22:03:41 GMT”,“connection”:“close”,“access-control-max-age”:“86400”,“access-control-allow-credentials”:“false”,“access-control-allow-headers”:"",“access-control-allow-methods”:“GET, HEAD, OPTIONS”,“access-control-allow-origin”:"",“vary”:“Origin, Access-Control-Request-Headers”,“x-node-red-request-node”:“62bcc15c”},“responseUrl”:“https://podcast-mp3.dradio.de/podcast/2022/04/21/nachrichten_dlf_20220421_2300_d4ecb66b.mp3",“redirectList”:[],"retry”:0}
After that nothing happens except that below the ffmpeg-conversion-node I can see “reading buffer”. But nothing more happens.
What did I do wrong?
I have imported the flow and I am now checking you sensor.
Is there a specific reason you use the scrape platform?
The mp3 name changes every 30 mins. The change includes date and time, as well as what appears to be a short hash.
I suggested a scrape to get the most current file.
Are you able to play the mp3 file outside of NodeRed?
You could also try scraping inside NodeRed
node-red-contrib-scrape-it (node) - Node-RED (nodered.org)


