Hello,
I am making a simple app to control my HiFi Berry and everything is working fine using the API, but I am missing one function and I read it was in the works a few years ago, so I was wondering if there are any updates on that.
I'd like to be able to add a function to start a specific radio station, which is currently saved in my favourites. It would be great if I could call this function from the app and/or by a physical button.
Is that possible? I think somebody mentioned it's possible using the interact features but I can't seem to find out how to use that.
Thanks
3 comments
-
HiFiBerry team There is no such funtion in API. You could use the MPD AP as radio is based on MPD:
https://mpd.readthedocs.io/en/latest/protocol.html -
troglodisme Thank you. I did take a look at the mpd but couldn't get my head around how it connects to hifiberry os. Do you have any examples or tutorials around this by any chance?
Also, on a separate note, is mpd the name of the player for the radio? In other words, should ".../api/player/activate/mpd" work by itself or it needs more to it?
Thanks -
HiFiBerry team MPD is the "music player daemon" that is responsible for radio and local music files. Just sending an activate to this doesn't do anything as you have to gie it a playlist with the web radio URL. That's not possible with the APIs of HiFIBerryOS. Therefore I recommended to directly interact with mpd via its own API.