Pirate Radio refusing connections

I have set up and installed my pirate radio. I have enabled SSH on the pi zero w. I can connect to it via putty on my PC - HOWEVER - after installing the setup script, If I try to connect to it via my internet browser it says that the connection has been refused!

This is driving me bonkers - Please can someone help?

What URL are you using to try and connect to the web interface?

I followed the example in the tutorial - - replacing the ip address in that with the address of my pi of course

I have tried it in both mozilla and chrome

I can connect to the pi in both putty and winscp and have been able to connect to other pi projects through my web browser so I am genuinely stumped by this

Ah! This guide? https://learn.pimoroni.com/tutorial/sandyj/streaming-spotify-to-your-pi

You’ll be using Mopidy, and perhaps there’s a missing dependency or config error- worth reading: https://docs.mopidy.com/en/latest/troubleshooting/

I’m not sure if mopidy has a log file, but you could try (as the above guide mentions) running it in verbose mode to get some useful error output.

That is the guide. There are no dependencies missing. I have an active spotify account.

With great respect, have you actually built this project yourself? I would consider myself very proficient with the pi so I strongly suspect there is something wrong with the installer itself.

Yes, I have.

And yes it’s tangible that the installer could be at fault but it’s only a means to an end. Unless you supply me with some tangible debugging information then I can only guess what the problem might be.

Hi I have the same problem. Pirate radio is running fine however I wanted to add more networks. So I could use the radio on holiday but the pi refuses to connect via putty or windows 10 remote terminal. I can open the VLC web page that controls the Pirate Radio but that does not seem to give me a way back to the terminal. As anyone tried adding more ssid’s to the wpa_supplicant.config at setup while still in Stretch lite? As I cannot ssh into the pi now I will have to add them at the initial set up. As anyone tried using wicd-curses to manage multiple ssid’s? Thanks

Sorry if that came across as slightly rude. I am finding this rather frustrating

This is the log from mopidy

INFO 2018-05-17 00:11:43,783 [1518:MainThread] mopidy.main
Starting Mopidy 2.1.0
DEBUG 2018-05-17 00:11:43,823 [1518:MainThread] mopidy.ext
Loading entry point: ttsgpio = mopidy_ttsgpio:Extension
DEBUG 2018-05-17 00:11:43,832 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-TtsGpio 1.0.2
DEBUG 2018-05-17 00:11:43,835 [1518:MainThread] mopidy.ext
Loading entry point: local-images = mopidy_local_images:Extension
DEBUG 2018-05-17 00:11:43,842 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-Local-Images 1.0.0
DEBUG 2018-05-17 00:11:43,849 [1518:MainThread] mopidy.ext
Loading entry point: iris = mopidy_iris:Extension
DEBUG 2018-05-17 00:11:44,895 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-Iris 3.16.0
DEBUG 2018-05-17 00:11:44,896 [1518:MainThread] mopidy.ext
Loading entry point: mpd = mopidy.mpd:Extension
DEBUG 2018-05-17 00:11:44,901 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-MPD 2.1.0
DEBUG 2018-05-17 00:11:44,902 [1518:MainThread] mopidy.ext
Loading entry point: http = mopidy.http:Extension
DEBUG 2018-05-17 00:11:44,906 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-HTTP 2.1.0
DEBUG 2018-05-17 00:11:44,907 [1518:MainThread] mopidy.ext
Loading entry point: stream = mopidy.stream:Extension
DEBUG 2018-05-17 00:11:44,911 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-Stream 2.1.0
DEBUG 2018-05-17 00:11:44,912 [1518:MainThread] mopidy.ext
Loading entry point: m3u = mopidy.m3u:Extension
DEBUG 2018-05-17 00:11:44,916 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-M3U 2.1.0
DEBUG 2018-05-17 00:11:44,917 [1518:MainThread] mopidy.ext
Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG 2018-05-17 00:11:44,921 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-SoftwareMixer 2.1.0
DEBUG 2018-05-17 00:11:44,921 [1518:MainThread] mopidy.ext
Loading entry point: file = mopidy.file:Extension
DEBUG 2018-05-17 00:11:44,926 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-File 2.1.0
DEBUG 2018-05-17 00:11:44,927 [1518:MainThread] mopidy.ext
Loading entry point: local = mopidy.local:Extension
DEBUG 2018-05-17 00:11:44,952 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-Local 2.1.0
DEBUG 2018-05-17 00:11:44,959 [1518:MainThread] mopidy.ext
Loading entry point: spotify = mopidy_spotify:Extension
DEBUG 2018-05-17 00:11:44,965 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-Spotify 3.1.0
DEBUG 2018-05-17 00:11:45,028 [1518:MainThread] mopidy.ext
Loading entry point: local-sqlite = mopidy_local_sqlite:Extension
DEBUG 2018-05-17 00:11:45,035 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-Local-SQLite 1.0.0
DEBUG 2018-05-17 00:11:45,045 [1518:MainThread] mopidy.ext
Loading entry point: alsamixer = mopidy_alsamixer:Extension
DEBUG 2018-05-17 00:11:45,051 [1518:MainThread] mopidy.ext
Loaded extension: Mopidy-ALSAMixer 1.0.3
DEBUG 2018-05-17 00:11:45,058 [1518:MainThread] mopidy.ext
Discovered extensions: ttsgpio, local-images, iris, mpd, http, stream, m3u, softwaremixer, file, local, spotify, local-sqlite, alsamixer
DEBUG 2018-05-17 00:11:45,086 [1518:MainThread] mopidy.config.keyring
Fetching passwords from your keyring failed. Any passwords stored in the keyring will not be available. (dbus not installed)
INFO 2018-05-17 00:11:45,087 [1518:MainThread] mopidy.config
Loading config from builtin defaults
DEBUG 2018-05-17 00:11:45,146 [1518:MainThread] mopidy.config
Loading config from /etc/xdg/mopidy/mopidy.conf failed; it does not exist
INFO 2018-05-17 00:11:45,150 [1518:MainThread] mopidy.config
Loading config from /home/pi/.config/mopidy/mopidy.conf
INFO 2018-05-17 00:11:45,181 [1518:MainThread] mopidy.config
Loading config from command line options
DEBUG 2018-05-17 00:11:45,435 [1518:MainThread] mopidy.ext
Validating extension: ttsgpio
DEBUG 2018-05-17 00:11:45,454 [1518:MainThread] mopidy.ext
Validating extension: local-images
DEBUG 2018-05-17 00:11:45,494 [1518:MainThread] mopidy.ext
Validating extension: iris
DEBUG 2018-05-17 00:11:45,599 [1518:MainThread] mopidy.ext
Validating extension: mpd
DEBUG 2018-05-17 00:11:45,606 [1518:MainThread] mopidy.ext
Validating extension: http
DEBUG 2018-05-17 00:11:45,615 [1518:MainThread] mopidy.ext
Validating extension: stream
DEBUG 2018-05-17 00:11:45,623 [1518:MainThread] mopidy.ext
Validating extension: m3u
DEBUG 2018-05-17 00:11:45,631 [1518:MainThread] mopidy.ext
Validating extension: softwaremixer
DEBUG 2018-05-17 00:11:45,639 [1518:MainThread] mopidy.ext
Validating extension: file
DEBUG 2018-05-17 00:11:45,647 [1518:MainThread] mopidy.ext
Validating extension: local
DEBUG 2018-05-17 00:11:45,656 [1518:MainThread] mopidy.ext
Validating extension: spotify
DEBUG 2018-05-17 00:11:45,680 [1518:MainThread] mopidy.ext
Validating extension: local-sqlite
DEBUG 2018-05-17 00:11:45,696 [1518:MainThread] mopidy.ext
Validating extension: alsamixer
INFO 2018-05-17 00:11:45,710 [1518:MainThread] mopidy.main
Enabled extensions: iris, mpd, alsamixer, http, ttsgpio, stream, m3u, softwaremixer, file, local-images, local-sqlite
INFO 2018-05-17 00:11:45,715 [1518:MainThread] mopidy.main
Disabled extensions: spotify, local
WARNING 2018-05-17 00:11:45,722 [1518:MainThread] mopidy.main
Found local configuration errors, the extension has been automatically disabled:
WARNING 2018-05-17 00:11:45,728 [1518:MainThread] mopidy.main
local/media_dir must be set.
WARNING 2018-05-17 00:11:45,734 [1518:MainThread] mopidy.main
Found spotify configuration errors, the extension has been automatically disabled:
WARNING 2018-05-17 00:11:45,739 [1518:MainThread] mopidy.main
spotify/client_secret must be set.
WARNING 2018-05-17 00:11:45,745 [1518:MainThread] mopidy.main
spotify/client_id must be set.
WARNING 2018-05-17 00:11:45,751 [1518:MainThread] mopidy.main
Please fix the extension configuration errors or disable the extensions to silence these messages.
DEBUG 2018-05-17 00:11:46,313 [1518:MainThread] mopidy.commands
Available Mopidy mixers: SoftwareMixer, AlsaMixer
INFO 2018-05-17 00:11:46,321 [1518:MainThread] mopidy.commands
Starting Mopidy mixer: SoftwareMixer
DEBUG 2018-05-17 00:11:46,348 [1518:MainThread] mopidy.commands
Mixer volume left unchanged
INFO 2018-05-17 00:11:46,354 [1518:MainThread] mopidy.commands
Starting Mopidy audio
INFO 2018-05-17 00:11:46,379 [1518:MainThread] mopidy.commands
Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend
INFO 2018-05-17 00:11:46,571 [1518:MainThread] mopidy.internal.path
Creating dir /home/pi/.local/share/mopidy/m3u
INFO 2018-05-17 00:11:46,605 [1518:Audio-2] mopidy.audio.actor
Audio output set to “autoaudiosink”
DEBUG 2018-05-17 00:11:46,611 [1518:MainThread] mopidy.file.library
Failed expanding path ($XDG_MUSIC_DIR) from file/media_dirs config value.
INFO 2018-05-17 00:11:46,708 [1518:MainThread] mopidy.commands
Starting Mopidy core
INFO 2018-05-17 00:11:46,885 [1518:MainThread] mopidy.commands
Starting Mopidy frontends: TtsGpio, IrisFrontend, MpdFrontend, HttpFrontend
WARNING 2018-05-17 00:11:47,017 [1518:MainThread] py.warnings
/usr/local/lib/python2.7/dist-packages/mopidy_ttsgpio/gpio_input_manager.py:31: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(self.led_pin, GPIO.OUT)

INFO 2018-05-17 00:11:47,391 [1518:IrisFrontend-8] mopidy_iris.frontend
Starting Iris 3.16.0
ERROR 2018-05-17 00:11:47,399 [1518:MainThread] mopidy.commands
Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use
DEBUG 2018-05-17 00:11:47,408 [1518:MainThread] mopidy.http.actor
Starting HTTP server
ERROR 2018-05-17 00:11:47,416 [1518:MainThread] mopidy.commands
Frontend (HttpFrontend) initialization error: HTTP server startup failed: [Errno 98] Address already in use
INFO 2018-05-17 00:11:47,422 [1518:MainThread] mopidy.commands
Starting GLib mainloop

How are you identifying the IP address of the Pi to ssh into when connected to a new network?

Mopidy keep moving the goal posts and breaking our scripts, I think “spotipy” is broken again and needs either tweaking, or replaced with step-by-step instructions but I haven’t had time to look into it yet.

I am using the ios app ‘Fing’

I can connect to the pi via putty on my PC no problem. Its when I try and access the web page as listed in the tutorial that I get the ‘connection refused’ message

From your debug output, it looks like something is already running an HTTP front-end or service on the port Mopidy wants to use:

Starting Iris 3.16.0
ERROR 2018-05-17 00:11:47,399 [1518:MainThread] mopidy.commands
Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use
DEBUG 2018-05-17 00:11:47,408 [1518:MainThread] mopidy.http.actor
Starting HTTP server
ERROR 2018-05-17 00:11:47,416 [1518:MainThread] mopidy.commands
Frontend (HttpFrontend) initialization error: HTTP server startup failed: [Errno 98] Address already in use
INFO 2018-05-17 00:11:47,422 [1518:MainThread] mopidy.commands

How would I resolve that please?

I am still looking for this to be resolved please

It’s on my TODO list, but it requires potentially rebuilding our whole Mopidy/Spotify install script, and that’s pretty low on my list of priorities right now sorry.

In the mean time you should try asking on the Mopidy forum since they wrote/maintain the actual software that’s being used here and may have a better idea of what’s going wrong - https://discourse.mopidy.com/

Without wishing to sound rude, I did purchase the pirate radio specifically for this Spotify capability.

It’s extremely simple to create a raspberry pi internet radio which is what the pirate radio appears only capable of at this point, so at the moment it’s really been a wasted purchase.

I totally understand your frustration, it’s perfectly possible to run Mopidy and Spotify on a Pi, it is just clear that our installer script is not working at the moment.

Your best bet would be to replace your broken setup with a fresh install by following their own install instructions here: https://docs.mopidy.com/en/latest/installation/raspberrypi/

And don’t miss the link to installing from their apt repositories: https://docs.mopidy.com/en/latest/installation/debian/#debian-install

And then configure Spotify as described in their guide.

While I’ve set Spotify/Mopidy up on a Pi and had it successfully running both with and without our script in the past, I have unfortunately not used it frequently enough to have any top-of-my-head solutions to your problems.

For the record, I went through the setup this morning on a freshly imaged, Raspbian Stretch Desktop, Pi.

You could, however, probably skip all of this and just install Pi Music Box: http://www.pimusicbox.com/

Install Mopidy

From: https://docs.mopidy.com/en/latest/installation/raspberrypi/

wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/stretch.list
sudo apt update
sudo apt install mopidy mopidy-spotify

Install IRIS

From: https://github.com/jaedb/Iris/wiki/Getting-started#installing

sudo pip install mopidy-iris
sudo su
echo "mopidy ALL=NOPASSWD: /usr/local/lib/python2.7/dist-packages/mopidy_iris/system.sh" >> /etc/sudoers

Run Mopidy and configure

From: https://docs.mopidy.com/en/latest/config/

Run once to create a default config file.

  1. CTRL+C to quit mopidy once it has done running
  2. nano ~/.config/mopidy/mopidy.conf
  3. enter your spotify username/password
  4. you also need to go to https://www.mopidy.com/authenticate/#spotify
  5. and authenticate, then put your client_id and client_secret into the config too

Finally run mopidy and visit http://localhost:6680 and set up/use as normal.

At what point will that operate the buttons on the pirate radio itself?