Tried installing in Pi Musixbox..
Closed this issue · 13 comments
I'm running Pi Musixbox 0.5 and I installed mopidy audioaddict plugin following the installation instructions. I got no errors, but after a reboot Pi Musicbox won't work (the web interface does work, but I get the message "trying to reach musicbox, please wait", which won't go away). My guess was that soemthing with the paths to mopidy/deamon got messed up, but I don't know. Do you need any logs, in that case, which logs?
This is not that urget matter, as I'm going to update to the newest Pi Musicbox 0.5.1 beta anyways (in hope of a fix for mopidy to stop before starting airplay).
Which version of the mopidy-audioaddict plugin are you using? The current version of the plugin is v0.2.6, released a couple of hours ago, which has quite a few fixes. It's also a little more verbose in its output, which is logged to /var/log/mopidy/mopidy.log
To install the latest version you can just run the following command:
pip install Mopidy-AudioAddict
Can you also tell me when you're seeing the 'trying to reach musicbox'-message? Is it when clicking on 'AudioAddict' or when you click on one of the stations (eg. 'Digitally Imported')?
I used the latest version which was available yesterday morning :) Don't remember by heart which one it was..
"Trying to reach musicbox"-message appears straight away when clicking the url for my pi musicbox (from bookmarks), I can't configure anything as I'm not able to get past this step.
Anyway, going to try again with the newest version of Pi Musicbox (plus your newest version of this plugin). I'll get back with the details.
Awesome, keep me posted 👍
I got this message when I tried audioaddict. This is without any configuration in the ini file btw.
INFO AudioAddict: authenticating with API
ERROR Uncaught exception
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 272, in run
backends = self.start_backends(config, backend_classes, audio)
File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 343, in start_backends
config=config, audio=audio).proxy()
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 93, in start
obj = cls(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/mopidy_audioaddict/actor.py", line 55, in init
proxy=full_proxy
File "/usr/local/lib/python2.7/dist-packages/mopidy_audioaddict/client.py", line 37, in init
self._api_key, self._has_premium = self._fetchApiKey(self._username, self._password)
File "/usr/local/lib/python2.7/dist-packages/mopidy_audioaddict/client.py", line 134, in _fetchApiKey
json_object_raw = r.json()
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 793, in json
return json.loads(self.text, **kwargs)
File "/usr/lib/python2.7/json/init.py", line 326, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Installed it on newest Pi musicbox beta now...
root@MusicBox:~# pip install Mopidy-AudioAddict
Downloading/unpacking Mopidy-AudioAddict
Downloading Mopidy-AudioAddict-0.2.6.tar.gz
Running setup.py egg_info for package Mopidy-AudioAddict
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/loc al/lib/python2.7/dist-packages (from Mopidy-AudioAddict)
Requirement already satisfied (use --upgrade to upgrade): Mopidy>=0.18 in /usr/l ocal/lib/python2.7/dist-packages (from Mopidy-AudioAddict)
Requirement already satisfied (use --upgrade to upgrade): Pykka>=1.1 in /usr/lib /python2.7/dist-packages (from Mopidy-AudioAddict)
Requirement already satisfied (use --upgrade to upgrade): pycountry in /usr/loca l/lib/python2.7/dist-packages (from Mopidy-AudioAddict)
Requirement already satisfied (use --upgrade to upgrade): tornado>=2.3 in /usr/l ocal/lib/python2.7/dist-packages (from Mopidy>=0.18->Mopidy-AudioAddict)
Requirement already satisfied (use --upgrade to upgrade): certifi in /usr/local/ lib/python2.7/dist-packages (from tornado>=2.3->Mopidy>=0.18->Mopidy-AudioAddict )
Requirement already satisfied (use --upgrade to upgrade): backports.ssl-match-ho stname in /usr/local/lib/python2.7/dist-packages (from tornado>=2.3->Mopidy>=0.1 8->Mopidy-AudioAddict)
Installing collected packages: Mopidy-AudioAddict
Running setup.py install for Mopidy-AudioAddict
Successfully installed Mopidy-AudioAddict
Cleaning up...
This looks ok to me. After this I did a reboot from the web interface. After a successful reboot I tried connecting to the web interface again, and this time I get Unable to connect so the whole web server seems corrupt...
(I'm booting with a screen connected and I see no errors during startup). However the /var/log/mopidy/mopidy.log tells me otherwise:
2014-11-03 11:08:42,874 - INFO Starting new HTTPS connection (1): api.audioaddict.com
2014-11-03 11:08:42,953 - INFO Audio output set to "alsasink buffer-time=200000 latency-time=10000"
2014-11-03 11:08:43,606 - ERROR Uncaught exception
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 272, in run
backends = self.start_backends(config, backend_classes, audio)
File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 343, in start_backends
config=config, audio=audio).proxy()
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 93, in start
obj = cls(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/mopidy_audioaddict/actor.py", line 55, in init
proxy=full_proxy
File "/usr/local/lib/python2.7/dist-packages/mopidy_audioaddict/client.py", line 37, in init
self._api_key, self._has_premium = self._fetchApiKey(self._username, self._password)
File "/usr/local/lib/python2.7/dist-packages/mopidy_audioaddict/client.py", line 134, in _fetchApiKey
json_object_raw = r.json()
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 776, in json
return json.loads(self.text, **kwargs)
File "/usr/lib/python2.7/json/init.py", line 326, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
2014-11-03 11:08:43,641 - INFO Stopping Mopidy frontends
2014-11-03 11:08:43,645 - INFO Stopping Mopidy core
2014-11-03 11:08:43,648 - INFO Stopping Mopidy backends
2014-11-03 11:08:43,658 - INFO Stopping Mopidy audio
2014-11-03 11:08:43,671 - INFO Stopping Mopidy mixer
root@MusicBox:/var/log/mopidy#
Only thing I've changed is forcing analog output in the config file.
(I'm using RPi Model B+).
Also you say in your installation instructions "Make sure you enable the extension after you've completed the installation. You will also need the Mopidy-Stream extension enabled "
Do I enable the extension from the web interface (assuming it's working)? Just a stupid question...
Edit your Mopidy configuration file:
nano -w /boot/config/settings.ini
And add the following block at the top of the file:
# ----------------
# | Audio Addict |
# ----------------
[audioaddict]
enabled = true
username =
password =
quality = 320k
difm = true
radiotunes = true
rockradio = true
jazzradio = true
frescaradio = true
Save the file and restart Mopidy, while following the Mopidy logfile:
/etc/init.d/mopidy restart && tail -f /var/log/mopidy/mopidy.log
You should see some INFO lines that contain the words "AudioAddict", like these:
2014-11-03 11:25:49,954 - INFO AudioAddict: authenticating with API
2014-11-03 11:25:50,083 - INFO Starting new HTTPS connection (1): api.audioaddict.com
2014-11-03 11:25:51,013 - INFO AudioAddict: premium streams enabled on your account
Good luck!
root@MusicBox:/var/log/mopidy# /etc/init.d/mopidy restart && tail -f /var/log/mopidy/mopidy.log
[ ok ] Restarting Mopidy music server: mopidy.
File "/usr/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
2014-11-03 11:31:42,194 - INFO Stopping Mopidy frontends
2014-11-03 11:31:42,198 - INFO Stopping Mopidy core
2014-11-03 11:31:42,201 - INFO Stopping Mopidy backends
2014-11-03 11:31:42,210 - INFO Stopping Mopidy audio
2014-11-03 11:31:42,223 - INFO Stopping Mopidy mixer
2014-11-03 11:33:30,644 - INFO Starting Mopidy 0.19.4
2014-11-03 11:33:32,828 - INFO Loading config from: builtin defaults, /etc/mopidy/extensions.d/spotify.conf, /etc/mopidy/mopidy.conf, command line options
2014-11-03 11:33:33,629 - INFO Enabled extensions: spotify, mpd, http, stream, spotify_tunigo, podcast-gpodder, local-sqlite, youtube, podcast-itunes, http-kuechenradio, softwaremixer, local-whoosh, soundcloud, moped, musicbox_webclient, websettings, podcast, local, tunein, audioaddict, dirble
2014-11-03 11:33:33,633 - INFO Disabled extensions: internetarchive, gmusic, scrobbler, subsonic, somafm
2014-11-03 11:33:52,948 - INFO Starting Mopidy mixer: SoftwareMixer
2014-11-03 11:33:52,956 - INFO Mixing using GStreamer software mixing
2014-11-03 11:33:52,972 - INFO Mixer volume set to 85
2014-11-03 11:33:52,977 - INFO Starting Mopidy audio
2014-11-03 11:33:53,006 - INFO Starting Mopidy backends: SpotifyTunigoBackend, AudioAddictBackend, LocalBackend, StreamBackend, TuneInBackend, SoundCloudBackend, YoutubeBackend, SpotifyBackend, PodcastBackend, DirbleBackend
2014-11-03 11:33:53,050 - INFO AudioAddict: premium streams not available on your account
2014-11-03 11:33:53,168 - INFO Loaded 0 local playlists from /var/lib/mopidy/playlists
2014-11-03 11:33:53,175 - INFO Audio output set to "alsasink buffer-time=200000 latency-time=10000"
2014-11-03 11:33:53,210 - INFO Using SQLite database schema v3
2014-11-03 11:33:53,240 - INFO Loaded 0 local tracks using sqlite
2014-11-03 11:33:53,665 - INFO Mopidy uses SPOTIFY(R) CORE
2014-11-03 11:33:53,761 - INFO Starting Mopidy-Podcast directories: iTunesDirectory, GPodderDirectory, FeedsDirectory
2014-11-03 11:33:53,804 - INFO Refreshing Mopidy-Podcast directories
2014-11-03 11:33:53,948 - INFO Starting new HTTP connection (1): itunes.apple.com
2014-11-03 11:33:54,036 - INFO Starting Mopidy core
2014-11-03 11:33:54,876 - INFO Starting Mopidy frontends: MpdFrontend, HttpFrontend
2014-11-03 11:33:54,908 - INFO MPD server running at [::ffff:0.0.0.0]:6600
2014-11-03 11:33:54,946 - INFO HTTP server running at [::ffff:0.0.0.0]:6680
2014-11-03 11:33:55,837 - INFO Connected to Spotify
and the local time should be 13.33, not 11:33. Will change the settings after this.
well well, I thought I should change audioaddict configuration from the web interface, not from the settings.ini. This now seems like a big step forward, and the web interface is now working :)
Using "Browse" and "Audioaddict" seem to work fine.
2014-11-03 11:52:43,280 - INFO Starting new HTTP connection (1): listen.di.fm
2014-11-03 11:52:43,638 - INFO AudioAddict: loading 82 channels on Digitally Imported
But when selecting for example Vocal Trance at the digitally imported section, I get this from the log...
2014-11-03 11:46:10,947 - WARNING GStreamer encountered a general stream error. Debug message: gstbasesink.c(3638): gst_base_sink_chain_unlocked (): /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:abin/GstBin:bin0/GstAlsaSink:alsasink0:
Received buffer without a new-segment. Assuming timestamps start from 0.
When I press the back button in the browse section after this, nothing happens, it hangs at Loading data from musicbox, please wait.
That specific error message shouldn't result in you being unable to listen, I see it as well every now and then.
If MusicBox hangs, hit the page reload button in your browser and see if you're returned to the MusicBox main menu. If that fails, be sure to restart Mopidy.
Is it just the vocal trance channel that's failing or have you tried any other channels?
@woutervanwijk fixed your bug in v0.2.7, caused by a bogus username and password in the ext.conf file.
@Jiggz0r here's my output after clicking on Vocal Trance:
2014-11-03 18:27:12,302 - INFO AudioAddict: loading 82 channels on Digitally Imported
2014-11-03 18:27:24,492 - WARNING Error submitting playing track to Last.fm: Missing required parameter artist
2014-11-03 18:27:26,441 - WARNING GStreamer encountered a general stream error. Debug message: gstbasesink.c(3638): gst_base_sink_chain_unlocked (): /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:abin/GstBin:bin0/GstAlsaSink:alsasink0:
Received buffer without a new-segment. Assuming timestamps start from 0.
After this the music starts playing. This is without any settings added to the settings.ini file.
Could you try updating the plugin to see if the problem still persists?
Ahhh, nvm then. Yes, I can listen even though those messages appear in the log. All good 👍
Not quite sure I understand what you mean by fixed the bug in 0.2.7 though. Which bug?
Wouter tried to install the plugin without adding anything to his settings.ini file. Before version 0.2.7 that would result in a crash of the plugin, but that's been fixed in the latest version.
Glad to hear the plugin works for you now!