Web radio openwrt

hi in lede version 17.6 i have this in my rc.local

sleep 5
while [ 1 ]
do
wget -O - http://icecast4.play.cz:80/frekvence1-128.mp3 | madplay -
sleep 2
done

and with this command every push on on button at speakers the radio starts play!
now after i update to 18.6 with the same command it doesnt play!
it plays only if i go to putty and put manually the command

wget -O - http://icecast4.play.cz:80/frekvence1-128.mp3 | madplay -

could anyone help me with this?

anyone please?

Did you reinstall the packages after upgrade?

1 Like

im not sure what package was required

Ummm...defnately madplay. If you didn't reinstall it, that's likely your problem.

Perhaps also:

  • audio drivers
1 Like

i installed that
it plays every time i put in putty manually

wget -O - http://icecast4.play.cz:80/frekvence1-128.mp3 | madplay -

but it doesnt start automatically after router reboot

1 Like

Maybe try a longer sleep before starting?
Package mpg123 can play http mp3 streams as well.

I don't see any connection to pressing a HID button on the speakers. For that you need something like triggerhappy backed by kmod-usb-hid.

1 Like

Use the full path for each executable.

2 Likes

what do you mean full path?
i already installed mpg123 and kmod usb hid
i dont know how to setup triggerhappy

Full path would be for example /usr/bin/mpg123. Use the which command to find the full path:

root@OpenWrt:~# which mpg123
/usr/bin/mpg123

It's usually best to use the full path for everything in scripts because you can't be sure what the script's working directory and environment (particularly PATH=) will be when it is launched automatically by another process.

Setting up triggerhappy is beyond the scope of this forum. It's a standard Linux thing. There was a long thread here by someone who set up several variations of Internet radios on OpenWrt, including button controls.

1 Like