stdevel / radio_api

Simple mplayer-based radio player controllable via REST API
https://hub.docker.com/r/stdevel/radio_api
BSD 4-Clause "Original" or "Old" License
2 stars 1 forks source link

No database tables created? #1

Closed ThongSong7 closed 3 years ago

ThongSong7 commented 3 years ago

FileNotFoundError: [Errno 2] No such file or directory: '/opt/radio_api/radio_api/schema.sql'

stdevel commented 3 years ago

Hi @ThongSong7, thanks for pointing out! The database template was missing and I fixed this in commit 1bdc5130c13c33ea4165169a679cec0a1eb267c6.

The amd64 docker image was already updated. Right now I'm also rebuilding the armv6 image. So, make sure to use the amd4 tag instead of latest right now for testing. I was not able to reproduce the issue anymore.

ThongSong7 commented 3 years ago

Thanks, I added a slight oversight in your latest commit... it is working well.
Now if I can figure out how to output to snapcasts' fifo, -- I must admit, this is all new to me. I would like to simply stream a radio site to given speakers via snapcast and/or homeassistant. Thanks again for your help!

stdevel commented 3 years ago

Thanks for the feedback! :-)

What does your setup look like? How is radio_api interacting with snapcast? What needs to be fixed for you?

Best wishes, Christian.

ThongSong7 commented 3 years ago

Thanks for your willing to assist!
Well I have the HA running in a docker container amd64. I think that this is what is causing the fact that I cannot play media streams through lovelace cards or when I call the media_player service. ffmpeg is installed in the official docker image, but it does nothing when called and no log errors either.

Wanted: I simply would like to have the abilitiy to stream a radio and snapcast it to a speaker (snapclient), with the issues above, this is not working and I cannot see why. So Far: I have been able to take your image and plug into it a /etc/asound.conf as well as a /etc/pulse/client.conf which tells it to output to write to a pipe of the snapfifo which is in a shared /tmp - this actually works! After working around file permissions but it works for albeit a few seconds until the mpeg in the radio_api crashes due to resources (already at max). Needed/Wanted: An image that will be able to write to a tmp file which will be configured to be the snapfifo of snapcast server (not docker) - ideally what would be REALLY awesome would be that I call via API radio station "1" with the output of snapclient and stream... https://github.com/badaix/snapcast/blob/master/doc/json_rpc_api/v2_0_0.md shows that if your radio_api could simply take an ENV of what IP is snapcast and plug in the above on call - this might actually work. Meaning of course the user would need to know the actual client_ids of the snapclient to plug into the api call to radio_api.

Thanks so much for your help and interest!

Highest regards, Jeff

stdevel commented 3 years ago

Hi Jeff, that's an interesting setup. :-)

I will just copy your last comment into a new issue.

I assume the former database table issue is fixed? So I would close this issue.

Best wishes, Christian.