Pirate Radio Phat Buttons Config

Hello,

I have set up my new pirate radio from pimoroni with the pHat BEAT and Raspberry pi zero W. After long hours of trying to figure out why the so called one-liner did not work I decided to take the high way and installed everything one by one myself and what do you know… it worked, so far.

I am now able to listen to spotify connecting from mopidy (with the fancy lights) which is great however I wanted to map the buttons which I cannot seem to find a lot of information about. I have installed the raspberry-mopidy-GPIO by writing “python3 -m pip install Mopidy-Raspberry-GPIO” and can see that it is working on my dependencies.

mopidy-raspberry-gpio: 1.0.0 from usr/local/lib/python3.7…

Also installed Mopidy-ALSAMixer and can see that on my dependencies too (not sure if it was necessary tbf)

I also added the configuration to the correct mopidy.conf file

[raspberry-gpio]
enabled = true
bcm5 = play_pause,active_low,250
bcm6 = volume_down,active_low,250
bcm16 = next,active_low,250
bcm20 = volume_up,active_low,250

which to my understanding should enable the buttons to work, is there anything else I need to do for this?

I have also tested the buttons with test.sh and they are all positive and operational.

I know I am definitely missing something silly somewhere but have now spent all my sunday on this and am hoping someone here will identify my mistake.

(I unfortunately cannot copy my deps or config since I am running on raspbian lite and dont know how to access this page on there)

You could likely SSH into it via Putty. Then clip and past from Putty to a web browser.
I have a Pirate Radio setup. I did mine with the one line installer many moons ago, do you remember what error message you got? Did you try sudo curl…?
I can try to have a look at some files on mine latter on today. Just tell me what config file to look at. My Linux skills are noob level if I’m honest.

Hey, the one-liner has installed everything for mine on python2.7 whereas most mopidy extensions have been updated with no backward compatibility at least mopidy-iris has been. With manual installation and the latest versions of everything iris works perfectly. I think the one-liner is just simply outdated with all the updates for the packages.
The config doc is in /etc/mopidy/mopidy.conf if you can copy me what is in there it for yours it could potentially save me, however, i am guessing yours will be all set on python2.7 since that s what the one liner sets up :/

Those button pins aren’t quite correct. It looks like you’ve used the Pirate Audio (note, not Pirate Radio 😁) button pins which are the default for that plugin. The button pins for the pHAT BEAT are:

BCM 5: fast forward
BCM 6: play/pause
BCM 12: on/off
BCM 13: rewind
BCM 16: volume up
BCM 26: volume down

Note that the functions I’ve listed there are just named after the symbols on the board, but it makes sense to link them to the corresponding functions in Mopidy, so you’re config would be:

[raspberry-gpio]
enabled = true
bcm6 = play_pause,active_low,250
bcm5 = next,active_low,250
bcm13 = prev,active_low,250
bcm16 = volume_up,active_low,250
bcm26 = volume_down,active_low,250

Thank you so much :) I will try this as soon as I get home from work.
My only concern though is that shouldn’t bcm5 and bcm 6 be working since they were already assigned?
Does the complete config fail if there is one wrongly assigned button?

I have tried updating the config with the suggested settings and it still does not work I am afraid :/

UPDATE: I have tried to delete mopidy-raspberry-GPIO manually then with pip uninstall and reinstall now it has completely disappeared from my dependencies even though the folders are there. Then to top it up I have discovered Mopidy-TtsGpio which I have tried to install and it told me it was already satisfied and now does not appear on dependencies. Not sure if there is much more I can do on this to be fair going to have to live with no buttons :D.