Pirate Radio Buttons No Longer Working


#1

Good day all,

I recently upgrade using the new VLC OLI
curl 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 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!


#2

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.


#3

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


#4

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

#5

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

Currently stuck at the office arrgh!

Thanks


#6

$ 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...

#7

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 for the vlcradio project

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

ran test and confirmed the buttons are registering accordingly


#8

Do you see anything useful in;

/var/log/phatbeatd.log

And

/var/log/phatbeatd.err

#9

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! :)


#10

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.


#11

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.


#12

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.