No sound from Pirate Radio after installing spotipy script

Hi,
I built the Pirate radio no problems and followed the various VLC install tutorials and have an SD card image that works fine…
I have just created a new card from a fresh Jessie-lite image and run
‘curl https://get.pimoroni.com/spotipy | bash’

Iris is running, Spotify has logged in with my account. web GUI shows tracks playing, VUmeter shows activity as if sound is playing…

BUT…

I get no sound out…

pi@raspberrypi:~/Pimoroni/phatbeat/test $ ./test.sh

testing audio

speaker-test 1.0.28

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Using device: phat-beat
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 8192
Period size range from 1024 to 1024
Using max buffer size 8192
Periods = 4
was set period_size = 1024
was set buffer_size = 8192
0 - Front Left
1 - Front Right
Time per period = 2.853761

testing basic wav playback

Using device: phat-beat
Playing WAVE ‘./test.wav’ : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
^CAborted by signal Interrupt…
aplay: pcm_write:1939: write error: Interrupted system call

testing gpio control…
press all buttons along the side of the pHAT…
press the power button on the pHAT to exit…

testing VU meter
Volume Down pressed!
Volume Up pressed!
Volume Up pressed!
Rewind pressed!
Play/Pause pressed!
Fast Forward pressed!
Power On/Off pressed!
exiting…

pi@raspberrypi:~/Pimoroni/phatbeat/test $

All seems to work EXCEPT no actual audio!

If I put VLC card back in everything works… so It’s a software issue, but I need someone else to tell me what, because I’m not familiar enough with all this stuff…

Thanks in advance

Paul

What do you see if you:

cat /etc/asound.conf

And:

cat /boot/config.txt

You should be able to post them, preserving spacing etc, on the forums using three backticks to start/end a code block, like so:

```
Code goes here!
```

ok…here goes…

cat /etc/asound.conf

pcm.!default {
        type plug
        slave.pcm {
                type meter
                slave.pcm "softvol"
                scopes.0 pivumeter
        }
}

ctl.!default {
        type hw
        card 0
}

pcm.dmixer {
        type dmix
        ipc_key 1024
        ipc_perm 0666
        slave.pcm 'hw:0,0'
        slave {
                period_time 0
                period_size 1024
                buffer_size 8192
        }
        bindings {
                0 0
                1 1
        }
}

ctl.dmixer {
        type hw
        card 0
}

pcm.softvol {
        type softvol
        slave.pcm "dmixer"
        control {
                name "PCM"
                card 0
        }
}

pcm_scope.pivumeter {
        type pivumeter
        decay_ms 500
        peak_ms 400
        brightness 128
        output_device phat-beat
}

pcm_scope_type.pivumeter {
        lib /usr/local/lib/libpivumeter.so
}

pcm.pivumeter {
        type meter
        slave.pcm 'hw:0,0'
        scopes.0 pivumeter
}

pcm.dsp0 pivumeter

and

cat /boot/config.txt

# For more options and information see
# http://rpf.io/configtxtreadme
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
#dtparam=audio=on
dtoverlay=i2s-mmap
dtoverlay=hifiberry-dac

Thanks

…and to possibly pre-empt the next q…

$cat /etc/mopidy/mopidy.conf

# For further information about options in this file see:
#   http://docs.mopidy.com/
#
# The initial commented out values reflect the defaults as of:
#   Mopidy 2.1.0
#   Mopidy-ALSAMixer 1.0.3
#   Mopidy-File 2.1.0
#   Mopidy-HTTP 2.1.0
#   Mopidy-Iris 2.13.3
#   Mopidy-Local 2.1.0
#   Mopidy-Local-Images 1.0.0
#   Mopidy-Local-SQLite 1.0.0
#   Mopidy-M3U 2.1.0
#   Mopidy-MPD 2.1.0
#   Mopidy-SoftwareMixer 2.1.0
#   Mopidy-Spotify 3.0.0
#   Mopidy-Stream 2.1.0
#   Mopidy-TtsGpio 1.0.2
#
# Available options and defaults might have changed since then,
# run `mopidy config` to see the current effective config and
# `mopidy --version` to check the current version.

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
#max_tracklist_length = 10000
#restore_state = false

[logging]
#color = true
#console_format = %(levelname)-8s %(message)s
#debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s
debug_file = /var/log/mopidy/mopidy-debug.log
config_file = /etc/mopidy/logging.conf

[audio]
mixer = software
mixer_volume = 35
output = autoaudiosink
#buffer_time =

[proxy]
#scheme =
#hostname =
#port =
#username =
#password =

[local-images]
#enabled = true
#library = json
#base_uri = /images/
#image_dir =
#album_art_files =
#  *.jpg
#  *.jpeg
#  *.png

[ttsgpio]
enabled = true
#debug_gpio_simulate = false
pin_button_main = 6
pin_button_next = 5
pin_button_previous = 13
pin_button_vol_up = 16
pin_button_vol_down = 26
#pin_play_led = 18
#tts_default_volume = 2

[iris]
enabled = true
pusherport = 6681
country = GB
locale = en_GB

[local-sqlite]
#enabled = true
#directories =
#  Albums                  local:directory?type=album
#  Artists                 local:directory?type=artist
#  Composers               local:directory?type=artist&role=composer
#  Genres                  local:directory?type=genre
#  Performers              local:directory?type=artist&role=performer
#  Release Years           local:directory?type=date&format=%25Y
#  Tracks                  local:directory?type=track
#  Last Week's Updates     local:directory?max-age=604800
#  Last Month's Updates    local:directory?max-age=2592000
#timeout = 10
#use_album_mbid_uri = true
#use_artist_mbid_uri = false
#use_artist_sortname = false

[mpd]
#enabled = true
#hostname = 127.0.0.1
#port = 6600
#password =
#max_connections = 20
#connection_timeout = 60
#zeroconf = Mopidy MPD server on $hostname
#command_blacklist =
#  listall
#  listallinfo
#default_playlist_scheme = m3u

[http]
enabled = true
hostname = ::
port = 6680
#static_dir =
#zeroconf = Mopidy HTTP server on $hostname

[stream]
#enabled = true
#protocols =
#  http
#  https
#  mms
#  rtmp
#  rtmps
#  rtsp
#metadata_blacklist =
#timeout = 5000

[m3u]
#enabled = true
#base_dir =
#default_encoding = latin-1
#default_extension = .m3u8
#playlists_dir = /var/lib/mopidy/playlists

[softwaremixer]
enabled = true

[file]
#enabled = true
#media_dirs =
#  $XDG_MUSIC_DIR|Music
#  ~/|Home
#excluded_file_extensions =
#  .jpg
#  .jpeg
#show_dotfiles = false
#follow_symlinks = false
#metadata_timeout = 1000

[local]
enabled = true
library = json
media_dir = /var/lib/mopidy/media
#scan_timeout = 1000
#scan_flush_threshold = 100
#scan_follow_symlinks = false
#excluded_file_extensions =
#  .directory
#  .html
#  .jpeg
#  .jpg
#  .log
#  .nfo
#  .png
#  .txt

[alsamixer]
enabled = true
card = 0
control = PCM

[spotify]
enabled = true
username = xxxxxxxxx
password = xxxxxxxxxx
#bitrate = 160
#volume_normalization = true
#private_session = false
#timeout = 10
#allow_cache = true
#allow_network = true
#allow_playlists = true
#search_album_count = 20
#search_artist_count = 10
#search_track_count = 50
#toplist_countries =

…and re-ran install script…this is the ouput…

pi@raspberrypi:~ $ curl https://get.pimoroni.com/spotipy | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41784  100 41784    0     0   106k      0 --:--:-- --:--:-- --:--:--  107k

This script will install everything needed to use
Spotify Python Server

Always be careful when running scripts and commands copied
from the internet. Ensure they are from a trusted source.

If you want to see what this script does before running it,
you should run: 'curl https://get.pimoroni.com/spotipy'


Do you wish to continue? [y/N] y

Checking environment...
Updating apt indexes...
.........
Reading package lists...
.........

Checking hardware requirements...

Checking for dependencies...

Finalising Install...

Setting up spotipy...

Refreshing sources...
.........
Updating apt indexes...
.........
Reading package lists...
.........
Installing mopidy...
Installing mopidy-alsamixer...
Installing mopidy-local-sqlite...
Installing mopidy-spotify...
Requirement already satisfied (use --upgrade to upgrade): mopidy-iris in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): setuptools>=3.3 in /usr/lib/python2.7/dist-packages (from mopidy-iris)
Requirement already satisfied (use --upgrade to upgrade): pylast>=1.6.0 in /usr/local/lib/python2.7/dist-packages (from mopidy-iris)
Requirement already satisfied (use --upgrade to upgrade): spotipy>=2.3.8 in /usr/local/lib/python2.7/dist-packages (from mopidy-iris)
Requirement already satisfied (use --upgrade to upgrade): Mopidy>=2.0 in /usr/lib/python2.7/dist-packages (from mopidy-iris)
Requirement already satisfied (use --upgrade to upgrade): Mopidy-Local-Images>=1.0 in /usr/local/lib/python2.7/dist-packages (from mopidy-iris)
Requirement already satisfied (use --upgrade to upgrade): ConfigObj>=5.0.6 in /usr/local/lib/python2.7/dist-packages (from mopidy-iris)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/dist-packages (from pylast>=1.6.0->mopidy-iris)
Requirement already satisfied (use --upgrade to upgrade): requests>=1.0 in /usr/lib/python2.7/dist-packages (from spotipy>=2.3.8->mopidy-iris)
Requirement already satisfied (use --upgrade to upgrade): Pykka>=1.1 in /usr/lib/python2.7/dist-packages (from Mopidy>=2.0->mopidy-iris)
Requirement already satisfied (use --upgrade to upgrade): tornado>=3.2 in /usr/lib/python2.7/dist-packages (from Mopidy>=2.0->mopidy-iris)
Cleaning up...
Requirement already satisfied (use --upgrade to upgrade): mopidy-ttsgpio in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from mopidy-ttsgpio)
Requirement already satisfied (use --upgrade to upgrade): Mopidy>=0.18 in /usr/lib/python2.7/dist-packages (from mopidy-ttsgpio)
Requirement already satisfied (use --upgrade to upgrade): Pykka>=1.1 in /usr/lib/python2.7/dist-packages (from mopidy-ttsgpio)
Requirement already satisfied (use --upgrade to upgrade): requests>=2.0 in /usr/lib/python2.7/dist-packages (from Mopidy>=0.18->mopidy-ttsgpio)
Requirement already satisfied (use --upgrade to upgrade): tornado>=3.2 in /usr/lib/python2.7/dist-packages (from Mopidy>=0.18->mopidy-ttsgpio)
Cleaning up...

Configuring mopidy...

patching file /etc/mopidy/mopidy.conf
Synchronizing state for mopidy.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d mopidy defaults
Executing /usr/sbin/update-rc.d mopidy enable

Enter your Spotify account user name: xxxxxxxx
Enter your Spotify account password: xxxxxxxx

What product would you like to configure?

0 : (leave audio unconfigured)
1 : pHAT BEAT
2 : pHAT DAC
3 : Speaker pHAT

Enter an option [0-3]:1

Setting up pHAT BEAT...

The user `mopidy' is already a member of `gpio'.

This script will install everything needed to use
pHAT Beat
Note: pHAT Beat uses the I2S interface
The on-board audio chip will be disabled if you proceed!


Checking environment...

Checking hardware requirements...

Checking for packages required for GPIO control...
RPi.GPIO installed and up-to-date

i2s-mmap overlay already active

hifiberry-dac overlay already active
existing config backed up to /etc/asound.conf.backup

pHAT Beat comes with examples and documentation that you may wish to install.
Performing a full install will ensure those resources are installed,
along with all required dependencies. It may however take a while!


Checking for dependencies...
alsa-utils is already installed
wiringpi is already installed

Installing python-phatbeat...
install ok installed
Installing python3-phatbeat...
install ok installed

Checking for additional software...

Downloading examples and documentation...

The examples directory already exists on your system!
We've backed them up as examples-backup, just in case you've changed anything!


The projects directory already exists on your system!
We've backed them up as projects-backup, just in case you've changed anything!


The test directory already exists on your system!
We've backed them up as test-backup, just in case you've changed anything!

Resources for your pHAT Beat were copied to
/home/pi/Pimoroni/phatbeat

Finalising Install...


hifiberry-dac overlay already active
Already up-to-date.

This script will install everything needed to use
Pi VU Meter

--- Warning ---

Always be careful when running scripts and commands
copied from the internet. Ensure they are from a
trusted source.

Checking for required packages...
build-essential is already installed
autoconf is already installed
automake is already installed
libtool is already installed
libasound2-dev is already installed
libfftw3-dev is already installed
wiringpi is already installed

Compiling Pi VU Meter...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... armv6l-unknown-linux-gnueabihf
checking host system type... armv6l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert armv6l-unknown-linux-gnueabihf file names to armv6l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv6l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether ln -s works... yes
checking for wiringPiSetup in -lwiringPi... yes
checking for snd_pcm_open in -lasound... yes
checking for fftw_plan_dft_r2c_1d in -lfftw3... yes
checking for log in -lm... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
make: Nothing to be done for 'all'.

Installing Pi VU Meter...
make[1]: Entering directory '/home/pi/Pimoroni/pivumeter'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   libpivumeter.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libpivumeter.so.0.0.0 /usr/local/lib/libpivumeter.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libpivumeter.so.0.0.0 libpivumeter.so.0 || { rm -f libpivumeter.so.0 && ln -s libpivumeter.so.0.0.0 libpivumeter.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libpivumeter.so.0.0.0 libpivumeter.so || { rm -f libpivumeter.so && ln -s libpivumeter.so.0.0.0 libpivumeter.so; }; })
libtool: install: /usr/bin/install -c .libs/libpivumeter.lai /usr/local/lib/libpivumeter.la
libtool: install: /usr/bin/install -c .libs/libpivumeter.a /usr/local/lib/libpivumeter.a
libtool: install: chmod 644 /usr/local/lib/libpivumeter.a
libtool: install: ranlib /usr/local/lib/libpivumeter.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[1]: Nothing to be done for 'install-data-am'.
make[1]: Leaving directory '/home/pi/Pimoroni/pivumeter'

All done!

Press Enter to continue...

I can’t see any obvious errors flagged up…
I also did

sudo apt-get update
sudo apt-get upgrade

which didn’t upgrade anything.

hum, strange… but are you saying that the following did not produce any sound either?

pi@raspberrypi:~/Pimoroni/phatbeat/test $ ./test.sh

if so, did you disassemble the radio since you tried other projects, specifically disconnect the speaker? have you tried it in the other set of terminals? does toggling the dip switch into stereo mode makes a difference (for the basic test script)?

That’s correct… it makes the VUmeter move, but no sound…

If I shutdown and pop other card in… VLC streams and plays fine.

What files control/configure which sound output device is used?

Looks like I have dtoverlay=hifiberry-dac correct in /boot/config.txt

right, I finally tracked down the culprit. For reasons known to the developer only, the ttsgpio module responsible for gpio control enforces rather unhelpful defaults, setting a pin crucial to I2S operation as an output.

To stop that happening, it is required to declare the pin_play_led parameter in a sensible way. So, uncomment the following line, replacing it as follows (or using another sensible value - most notably avoiding the other I2S pins and bcm12, used as an input by the phatbeat library):

< #pin_play_led = 18
> pin_play_led = 20

after experimenting a little it seems that it is possible to override the default while not assigning an active pin, if in a non-intuitive way, by setting the value to:

pin_play_led =
(so no value assigned to the variable)

The important thing to note is that the commented out lines in the mopidy config all have built-in defaults that will kick in if not overriden in some way.

… I think leaving the variable unassigned is the safest way, particularly if one has plans to add additional buttons to the setup, or wanted to combine phat-beat with other add-ons as this will avoid potential pin conflicts or worst bringing that pin to ground, with potential damage to the Pi).

Thanks… I’ll rry that later when I get back home…what was confusng was, seeing people saying “it works great” etc… And all I did was fillow the instructions and nothing!..

I don’t think it could have worked with pHAT BEAT in the current state… except for us. If you saw someone claiming success (apart from @sandyjmacdonald on Bilge Tank) then I think they were using a Speaker pHAT, pHAT DAC, or built-in audio.

Just tried your suggested change

pin_play_led =

and now I get sound, and VUmeter lights…
YAY…

BUT…

Now none of the buttons work at all…

Changed line to

pin_play_led = 20

and now buttons work again…

but

Mopidy seems to be unstable and disconnecting randomly (in settings Tab on Iris GUI)

hum, you’re right - leaving the pin unassigned is not an option… you’d think I would have noticed:

2017-03-19 16:17:24,951 WARNING [627:MainThread] mopidy.__main__: Found ttsgpio configuration errors, the extension has been automatically disabled:
2017-03-19 16:17:24,956 WARNING [627:MainThread] mopidy.__main__:   ttsgpio/pin_play_led must be set.

in my defence I had no phat-beat available.

Anyhow, the ttsgpio mopidy extension clearly leaves much to be desired, but it should work, once configured properly. I don’t think your connection issues are related - it sounds like a range or strength issue with the network?

The connectivity seems to have stabilised now.

Is there a way, I can get the top Phatbeat button (BCM 12, I think), to do a safe shutdown?

sure, you can write something similar to this:

This literally saved me from ripping my hair out from thursday until I received a tweet from yourself on sunday morning. was made up!

2 Likes

[quote=“PaulB, post:15, topic:4340”]
Is there a way, I can get the top Phatbeat button (BCM 12, I think), to do a safe shutdown?[/quote]
I’ve now put together a universal clean-shutdown daemon that you can use for that purpose if you’d like:

curl https://get.pimoroni.com/cleanshutdown | bash

… use (bcm) ‘12’ when prompted. I’ll likely roll it in the spotipy script in the near future, so that a separate step is not required, but I have to do some additional work to pass arguments to it safely first.

Brilliant…thanks…I’ll give it a go…