timolex / radiodawg Goto Github PK
View Code? Open in Web Editor NEWRadiodawg Volumio webradio watchdog
License: MIT License
Radiodawg Volumio webradio watchdog
License: MIT License
Hi,
thanks for sharing this script.
I had problems getting it to run as systemd service.
It was stuck on "activating" and never printed any logs.
Had more luck with this service description:
[Unit]
Description=run radiodawg Python script at startup
After=network.target
After=syslog.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/python3 -u /usr/bin/radiodawg.py
[Install]
WantedBy=multi-user.target
notice the "-u" parameter in ExecStart for unbuffered output. Without it I could not see any logs in "systemctl status .." .
Maybe all the flushes in the python script become obsolete with this change.
Cheers
hello,
great job - simple and very effiicent !! great job ...
only as you want to improve ...
i made few small changes .. not comfort to make an extra fork on github ...
anyhow ...
Sometimes the webradio hangs or drops out despite an internet connection.
Volumio/mpd doesnt do a very good job at detecting this unfortunately. So it will sit there as if everything is still working.
I'd suggest implementing a similar logic as mpd-watchdog and check if the stream is still progressing.
the "seek" attribute in volumio status might be a good indicator.
Not sure if the attribute is reliably mirroring what MPD is doing, though.
The current playback status is not considered.
If it is "stop" before internet dropout it would be resumed by the script, right?
So "status": "play"
should be checked in is_streaming_webradio(),
e.g. volumio status | grep '"status": "play"'
volumio@volumio:~$ volumio status
{
"status": "stop",
"position": 0,
"title": "egofmbw.mp3",
...
"trackType": "webradio",
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.