# Radio doesn't return after internet dropout: mpd-watchdog

**URL:** <https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424>\
**Category:** Pi MusicBox (archive)\
**Created:** [December 14, 2014, 5:05pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424 "2014-12-14T17:05:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![JackRichardson](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jackrichardson/32/1174_2.png) [@JackRichardson](https://discourse.mopidy.com/u/JackRichardson)\
**Post date:** [December 14, 2014, 5:05pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/1 "2014-12-14T17:05:10Z")

</div>

As requested here [https://github.com/mopidy/mopidy/issues/720](https://github.com/mopidy/mopidy/issues/720), could mpd-watchdog please be included in the pimusicbox package?  
Without this installed, if my internet connection drops out for more than about a minute, the radio stream will not come back without user intervention. But with this installed, one’s internet connection can be off for a seemingly infinite period and when the internet returns so will the radio stream.  
I’ve tested it countless times, comparing the result with and without mpd-watchdog installed, and it definitely remedies the problem for me.

Many thanks

---

<div class="post-metadata">

**Author:** ![PerThomsen](https://avatars.discourse-cdn.com/v4/letter/p/c77e96/32.png) [@PerThomsen](https://discourse.mopidy.com/u/PerThomsen)\
**Post date:** [January 5, 2015, 10:59am UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/2 "2015-01-05T10:59:25Z")

</div>

I have the same issue with ver. 0.5.2

Per :o)

---

<div class="post-metadata">

**Author:** ![JackRichardson](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jackrichardson/32/1174_2.png) [@JackRichardson](https://discourse.mopidy.com/u/JackRichardson)\
**Post date:** [January 5, 2015, 11:41am UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/3 "2015-01-05T11:41:39Z")

</div>

Me too. But it’s still rectified by installing mpd-watchdog

---

<div class="post-metadata">

**Author:** ![PerThomsen](https://avatars.discourse-cdn.com/v4/letter/p/c77e96/32.png) [@PerThomsen](https://discourse.mopidy.com/u/PerThomsen)\
**Post date:** [January 8, 2015, 1:50pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/4 "2015-01-08T13:50:43Z")

</div>

In the ssh console just type “mpc repeat on”. It worked for me 😄

---

<div class="post-metadata">

**Author:** ![JackRichardson](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jackrichardson/32/1174_2.png) [@JackRichardson](https://discourse.mopidy.com/u/JackRichardson)\
**Post date:** [January 9, 2015, 12:49pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/5 "2015-01-09T12:49:14Z")

</div>

I suppose that would work. But, if you switch between listening to the radio and listening to Spotify frequently it can be annoying if it repeats the Spotify playlist. Mpd-watchdog doesn’t require ‘mpc repeat on’, and also keeps radio streams playing indefinetly, even after a length internet dropout.

---

<div class="post-metadata">

**Author:** ![DerDom](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@DerDom](https://discourse.mopidy.com/u/DerDom)\
**Post date:** [January 28, 2015, 2:19pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/6 "2015-01-28T14:19:24Z")

</div>

I have internet connection issues, as well and would love if the radio stream continues after connection is on again. I will try “mpc repeat on” but it would be great if it could be added to pi musicbox as a standard. =)

---

<div class="post-metadata">

**Author:** ![DerDom](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@DerDom](https://discourse.mopidy.com/u/DerDom)\
**Post date:** [January 28, 2015, 6:06pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/7 "2015-01-28T18:06:54Z")

</div>

Unfortunately, “mpc repeat on” does not solve the issue. How can I install mpd-watchdog?

---

<div class="post-metadata">

**Author:** ![JackRichardson](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jackrichardson/32/1174_2.png) [@JackRichardson](https://discourse.mopidy.com/u/JackRichardson)\
**Post date:** [January 29, 2015, 6:11pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/8 "2015-01-29T18:11:14Z")

</div>

I’m sure there are better ways to do it. But here’s one way to install it:

1. Download the three files in this folder:  
[https://www.dropbox.com/sh/bhhm24b8bhero5j/AABxHcwNy39bA0H2mWnW9dnIa?dl=0](https://www.dropbox.com/sh/bhhm24b8bhero5j/AABxHcwNy39bA0H2mWnW9dnIa?dl=0)
2. Place the three downloaded downloaded files into the ‘config’ folder on the Pi Musicbox SD card.
3. With the Pi running, open an SSH client, and enter:  
mv /boot/config/mpd-watchdog /usr/bin && mv /boot/config/mpd-watchdog.init /etc/init.d/mpd-watchdog && mv /boot/config/mpd-watchdog.default /etc/default/mpd-watchdog && update-rc.d mpd-watchdog defaults
4. Reboot the Pi

---

<div class="post-metadata">

**Author:** ![DarkHelmet](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/darkhelmet/32/732_2.png) [@DarkHelmet](https://discourse.mopidy.com/u/DarkHelmet)\
**Post date:** [February 1, 2015, 10:40am UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/9 "2015-02-01T10:40:59Z")

</div>

Thanks Jack, I installed mpd-watchdog using your instructions and it’s working well. It would be great if this was part of the default Pi Musicbox installation.

---

<div class="post-metadata">

**Author:** ![tkem](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/tkem/32/22_2.png) [@tkem](https://discourse.mopidy.com/u/tkem)\
**Post date:** [February 3, 2015, 9:03pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/10 "2015-02-03T21:03:51Z")

</div>

FYI: `mpd-watchdog` is now available for Debian-based systems from my [my personal APT archive](http://apt.kemmer.co.at), so you might as well try

```
    wget -q -O - http://apt.kemmer.co.at/tkem.gpg | sudo apt-key add -
    sudo wget -q -O /etc/apt/sources.list.d/tkem.list http://apt.kemmer.co.at/tkem.list
    sudo apt-get update
    sudo apt-get install mpd-watchdog

```

and you should be done (no reboot required).

If you have installed `mpd-watchdog` as described by @JackRichardson, you have to remove the manually installed files first; sorry for the inconvenience, Jack 😉

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [April 7, 2015, 4:04pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/11 "2015-04-07T16:04:37Z")

</div>

I’m not very familar with mpd-watchdog. What stops it from coming along and restarting playback when I’ve decided to manually pause?

---

<div class="post-metadata">

**Author:** ![JackRichardson](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jackrichardson/32/1174_2.png) [@JackRichardson](https://discourse.mopidy.com/u/JackRichardson)\
**Post date:** [April 7, 2015, 11:38pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/12 "2015-04-07T23:38:00Z")

</div>

If the user manually pauses anything playing, mpd-watchdog will not stop you from pausing.

The problem mpd-watchdog solves for me is ensuring that a stream continues playing even if the internet drops out for more than a few minutes. Try it!

To simulate an internet connection outage, simply unplug your ethernet, or for wifi, turn off the router. If you have a radio stream playing and the internet reconnects within about about 30 seconds, then the stream seems to continue playing when the internet returns. However, if the internet is off for say more than a minute, the stream will appear to still be playing, but no audio is outputted. Without mpd-watchdog I have to manually click on the radio stream again - annoying when I wake up, and turn on my speakers to find no audio after there was a short internet outage overnight.

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [April 8, 2015, 7:09am UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/13 "2015-04-08T07:09:51Z")

</div>

I was specifically interested in what prevents it restarting the song when  
I decide to manually pause it.

---

<div class="post-metadata">

**Author:** ![tkem](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/tkem/32/22_2.png) [@tkem](https://discourse.mopidy.com/u/tkem)\
**Post date:** [April 8, 2015, 10:48am UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/14 "2015-04-08T10:48:52Z")

</div>

@kingosticks: mpd-watchdog only acts if mpd state is “playing”.

The full answer can be found here: [https://github.com/tkem/mpd-watchdog](https://github.com/tkem/mpd-watchdog)

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [April 8, 2015, 11:33am UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/15 "2015-04-08T11:33:32Z")

</div>

Oh, I’m a total idiot, it looks at the elapsed time too (obviously).

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [April 8, 2015, 11:40am UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/16 "2015-04-08T11:40:14Z")

</div>

Although, apparently the problem preventing it from inclusion previously was that it restarted things if you had an empty playlist. Perhaps that was with an older version of Mopidy.

---

<div class="post-metadata">

**Author:** ![tkem](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/tkem/32/22_2.png) [@tkem](https://discourse.mopidy.com/u/tkem)\
**Post date:** [April 8, 2015, 11:58am UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/17 "2015-04-08T11:58:10Z")

</div>

Before including it, please note that `mpd-watchdog` is no longer actively developed/supported, since I don’t use it any longer myself. Was great back when I was running stock `mpd` and had a crappy network connection. Whether it was switching to `Mopidy` or fixing my network, I no longer have any of the issues described by @JackRichardson and others. However, as long as it helps somebody, I’ll make it available. Just don’t ask me to fix or change anything, thank you 😉

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [April 8, 2015, 1:21pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/18 "2015-04-08T13:21:54Z")

</div>

Yep, no worries. Thanks for making it available.

---

<div class="post-metadata">

**Author:** ![Robert\_Magnusson](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/robert_magnusson/32/517_2.png) [@Robert\_Magnusson](https://discourse.mopidy.com/u/Robert_Magnusson)\
**Post date:** [January 10, 2017, 9:53pm UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/19 "2017-01-10T21:53:47Z")

</div>

This will work for Spotify to??

---

<div class="post-metadata">

**Author:** ![jodal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jodal/32/2564_2.png) [@jodal](https://discourse.mopidy.com/u/jodal)\
**Post date:** [February 19, 2026, 11:47am UTC](https://discourse.mopidy.com/t/radio-doesnt-return-after-internet-dropout-mpd-watchdog/424/20 "2026-02-19T11:47:21Z")

</div>


