I’m trying to make an intent “GetLatestNews” (be it in Dutch) using this command: /usr/bin/mpg321 http://progressive-audio.lwc.vrtcdn.be/content/fixed/11_11niws-snip_lo.mp3
I thought it would be just a matter of putting this command in an exec-node in node-red. But things don’t work out as expected.
I get this error message:
I think this has to do with having installed node-red (and rhasspy) using docker. Unfortunately I have no idea how to solve this properly (I could of course reinstall everything without docker but then of course I lose the advantages of a docker system). I am also puzzled by the fact that node-red is able to play
the mp3 using a gui-widget. Here is my node-red flow so you can see what I mean.
Yes mpg321 may be on your host system, but is not available in the container. I don’t think the Node-RED Docker image is set up to install your own software in. It’s better to search for a node that does what you want.
There is a official way to customize nodered with software and so on but I found it hard to use because it is based on alpine. I solved that for me by making my own dockerfile for it that more or less mirrors what they do on alpine. So it is possible to somewhat easily install extra software on nodered, but only because their dockerfile is pretty simple in what it does, just creates a user and then uses node to install nodered.
If you are using Home Assistant you can install the Node Red addon.
There is a config system_packages, which can be used to install additional packages
And then build the image as explained in the README. Now you can use your own custom Node-RED image in your Docker Compose file if you refer to the image and tag name you supplied while building the image.
Note that you’re now responsible yourself for rebuilding the image when Node-RED publishes a new version.
Thanks for the info, but I think this might be one risky step too far for just wanting to play an mp3-file located on the Internet (on my raspberry with Rhasspy+node-red in containers). If it only could be done with merely a regular node-red flow…