Musicbox loses connection to mopidy?

Hi,

I think I raised this a while back on the mopidy forum but never got anywhere. In general everything works very well, apart from occasionally it seems the front end can no longer talk to mopidy.

The javascript console shows the following:

GET http://192.168.1.74:6680/mopidy/ws/ [HTTP/1.1 101 Switching Protocols 624ms]
TypeError: mopidy.playback is undefined gui.js:331
The connection to ws://192.168.1.74:6680/mopidy/ws/ was interrupted while the page was loading. mopidy.min.js:5
TypeError: mopidy.playback is undefined

Nothing erroneous looking in the mopidy logs.
The only thing I use this for is spotify and I do have a large number of playlists which I figure may be causing crazy amounts of processing in the background tying things up.

First thing is first though- does this sound more likely a mopidy or musicbox issue

Cheers

Pete

Hmm, hard to say. We are hopefully not locking up mopidy enough to trigger this. But at the same time given how threading in python only allows for one python thread to run at any time it could well be the case. I would say go run this with debug logging and we could dig into it, but we just switched from cherrypy to tornado in 0.19, and I think musicbox is still on 0.18. So it would be much better use of everyone’s time to see if the new version of mopidy fixes things.

Any idea if I can just update it to latest version using apt?

I tried this, when I read the announcement of 0.19, but mopidy is not shown as an update. I am still on 0.18 on my Pi MusicBox.

I did not change the default sources of apt on my system. Apparently, the new version of mopidy is not on either of these:
`

grep -h ^deb /etc/apt/sources.list /etc/apt/sources.list.d/*

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://apt.mopidy.com/ stable main contrib non-free
deb-src http://apt.mopidy.com/ stable main contrib non-free
deb http://archive.raspberrypi.org/debian/ wheezy main
`

Regards,
slowjoe

The latest version of Mopidy is available at the Mopidy APT archive. Did you do an update and a dist-upgrade?

Mopidy is installed using pip on musicbox. So use:
pip install -U mopidy
This will disable some things, but it works mostly (the settings page and the shutdown/reboot buttons will certainly not wotk). Tornado seems to play nicer with mopidy indeed (lower cpu usage on the pi)! Maybe you have to update the webclient too.

I’ve not had a chance to try updating mopidy yet, but I’ve found out a way to prevent the problem. The issue only arises if I leave a playlist paused for a long time. If I just leave the queue playing to the end instead of pausing it (I guess clearing it would work too) then there’s never any issue.
I should point out that I do use spotify on other devices (but it has occurred when when I haven’t signed in on another device) so could it be something to do with not coping properly with a losing connection?
May want to move this thread to the mopidy cause fairly sure it isn’t pi musixbox’s fault.