# Pirate Radio Buttons No Longer Working

**URL:** <https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567>\
**Category:** Support\
**Created:** [April 13, 2017, 2:34am UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567 "2017-04-13T02:34:32Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![wstevens0n](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wstevens0n](https://forums.pimoroni.com/u/wstevens0n)\
**Post date:** [April 13, 2017, 2:34am UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/1 "2017-04-13T02:34:32Z")

</div>

Good day all,

I recently upgrade using the new VLC OLI  
curl [https://get.pimoroni.com/vlcradio](https://get.pimoroni.com/vlcradio) | bash

Previously I was using the old method, so disabled the cronjob, moved my playlist file, than deleted the vlc folder.

Everything seems to be working except the buttons.

I tried using the [test.sh](http://test.sh) script and confirmed the buttons are registering.

Not sure what else I can do to troubleshoot aside from starting from scratch.

Any ideas?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)\
**Post date:** [April 13, 2017, 2:00pm UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/2 "2017-04-13T14:00:29Z")

</div>

it sounds like the phatbeatd daemon is not running. What do you get from:

```
sudo service phatbeatd status

```

does it say it is active?

if not try to run:

```
sudo service phatbeatd start

```

post any error you get, if any.

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [April 13, 2017, 2:56pm UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/3 "2017-04-13T14:56:38Z")

</div>

It may or may not be relevant, but I pushed a new version of pHAT BEAT to pip recently. It shouldn’t have broken anything but… well you know me :D

---

<div class="post-metadata">

**Author:** ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)\
**Post date:** [April 13, 2017, 4:11pm UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/4 "2017-04-13T16:11:36Z")

</div>

hum, I think the script will continue to use version 0.0.1 from the apt repo for a little while… but I guess it’s best not to overlook thas aspect. @wstevens0n, what version is reported by:

```
pip list
```

---

<div class="post-metadata">

**Author:** ![wstevens0n](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wstevens0n](https://forums.pimoroni.com/u/wstevens0n)\
**Post date:** [April 13, 2017, 4:50pm UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/5 "2017-04-13T16:50:56Z")

</div>

@RogueM l’ll take a look and report back shortly.

Currently stuck at the office arrgh!

Thanks

---

<div class="post-metadata">

**Author:** ![wstevens0n](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wstevens0n](https://forums.pimoroni.com/u/wstevens0n)\
**Post date:** [April 13, 2017, 10:36pm UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/6 "2017-04-13T22:36:05Z")

</div>

> $ sudo service phatbeatd status  
> ● phatbeatd.service - LSB: Starts PHAT BEAT VLC control daemon at boot time  
> Loaded: loaded (/etc/init.d/phatbeatd)  
> Active: active (exited) since Wed 2017-04-12 23:34:20 CDT; 17h ago  
> Process: 403 ExecStart=/etc/init.d/phatbeatd start (code=exited, status=0/SUCCESS)

> Apr 12 23:34:11 piRadi0 phatbeatd[403]: Starting…  
> Apr 12 23:34:12 piRadi0 su[429]: Successful su for root by root  
> Apr 12 23:34:12 piRadi0 su[429]: + ??? root:root  
> Apr 12 23:34:12 piRadi0 su[429]: pam\_unix(su:session): session opened for u…0)  
> Apr 12 23:34:20 piRadi0 phatbeatd[403]: 2017-04-12 23:34:20.285699: PHAT BEA…8  
> Apr 12 23:34:20 piRadi0 systemd[1]: Started LSB: Starts PHAT BEAT VLC contr…e.  
> Apr 13 17:24:14 piRadi0 systemd[1]: Started LSB: Starts PHAT BEAT VLC contr…e.  
> Apr 13 17:26:05 piRadi0 systemd[1]: Started LSB: Starts PHAT BEAT VLC contr…e.  
> Hint: Some lines were ellipsized, use -l to show in full.

```
 $ pip list
phatbeat (0.0.1)

```

I tried doing a stop and start of the service with no avail. Buttons are still registering via test script.

```
~/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.849641

testing basic wav playback

Using device: phat-beat
Playing WAVE './test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

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

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

```

---

<div class="post-metadata">

**Author:** ![wstevens0n](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wstevens0n](https://forums.pimoroni.com/u/wstevens0n)\
**Post date:** [April 21, 2017, 1:51am UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/7 "2017-04-21T01:51:45Z")

</div>

Tried utilizing a fresh Raspbian install and I’m still running into the same problem.

This time I skipped the one line install and tried a manual setup

sudo apt-get install pimoroni  
than ran the [setup.sh](http://setup.sh) for the vlcradio project

localhost:8080 works as expected, but buttons fail to work

ran test and confirmed the buttons are registering accordingly

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [April 21, 2017, 9:09am UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/8 "2017-04-21T09:09:40Z")

</div>

Do you see anything useful in;

```nohighlight
/var/log/phatbeatd.log

```

And

```nohighlight
/var/log/phatbeatd.err

```

---

<div class="post-metadata">

**Author:** ![wstevens0n](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wstevens0n](https://forums.pimoroni.com/u/wstevens0n)\
**Post date:** [April 22, 2017, 12:27am UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/9 "2017-04-22T00:27:07Z")

</div>

Good day @gadgetoid

Both log and err were blank, so I checked /usr/bin/phatbeatd and modified VLC\_HOST 127.0.0.1 to my Pi’s IP address

After saving I manually executed the phatbeatd script in terminal and noticed the buttons started working.

However upon rebooting the buttons stopped working again.

So I added the following line under ~/.config/lxsession/LXDE-pi/autostart  
`@/usr/bin/sudo /usr/bin/phatbeatd`

This seemed to have finally resolved the issue! :)

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [April 23, 2017, 8:44am UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/10 "2017-04-23T08:44:06Z")

</div>

That’s weird, there should be a service for pHAT BEAT that runs at startup and handles that. I wonder why it’s not running/working.

What does: `sudo /etc/init.d/phatbeatd start` do?

Or I suppose these days it should be `systemctl phatbeatd start` or is it `systemctl start phatbeatd` I can never get that right.

---

<div class="post-metadata">

**Author:** ![wstevens0n](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wstevens0n](https://forums.pimoroni.com/u/wstevens0n)\
**Post date:** [April 24, 2017, 5:58pm UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/11 "2017-04-24T17:58:30Z")

</div>

From what I saw the other day was that service is running as intended, but some reason it didn’t register button mappings for VLC unless I manually executed from the terminal.

I’m not sure if it’s conflicting the the boot up of the OS or an additional security “feature”, but I’ve had similar issues like this with other scripts in Raspbian and editing autostart always seemed to be a good fail-safe.

---

<div class="post-metadata">

**Author:** ![siig](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/siig/32/2978_2.png) [@siig](https://forums.pimoroni.com/u/siig)\
**Post date:** [October 5, 2017, 1:27pm UTC](https://forums.pimoroni.com/t/pirate-radio-buttons-no-longer-working/4567/12 "2017-10-05T13:27:34Z")

</div>

I have the same issue. It looks like the service is started:

> pi@PiRadio:~ $ sudo service phatbeatd status  
> ● phatbeatd.service - LSB: Starts PHAT BEAT VLC control daemon at boot time  
> Loaded: loaded (/etc/init.d/phatbeatd)  
> Active: active (exited) since Thu 2017-10-05 15:10:59 CEST; 2min 1s ago  
> Process: 432 ExecStart=/etc/init.d/phatbeatd start (code=exited, status=0/SUCCESS)
> 
> Oct 05 15:10:52 PiRadio phatbeatd[432]: Starting…  
> Oct 05 15:10:52 PiRadio su[507]: Successful su for root by root  
> Oct 05 15:10:52 PiRadio su[507]: + ??? root:root  
> Oct 05 15:10:52 PiRadio su[507]: pam\_unix(su:session): session opened for user root by (uid=0)  
> Oct 05 15:10:58 PiRadio phatbeatd[432]: 2017-10-05 15:10:58.766830: PHAT BEAT daemon running with PID: 683  
> Oct 05 15:10:59 PiRadio systemd[1]: Started LSB: Starts PHAT BEAT VLC control daemon at boot time.

But the buttons do not work. _sudo service phatbeatd start_ does not work, but stopping and starting it does - that is, until reboot. :(

Guess I could autostart it like wstevens0n suggest, but would like a more permanent solution.
