Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons on Pirate Headphone occasionally generate runtime error #43

Closed
brian-burton opened this issue Jan 19, 2021 · 3 comments
Closed

Comments

@brian-burton
Copy link

brian-burton commented Jan 19, 2021

Hi, I'm running a standard script-installed Pirate Audio Headphone attached to a Pi 0 W. I've added dleyna and local mopidy addins, but otherwise I've changed nothing.

I've found that sometimes the Y button fails to work, meaning I can't turn the volume up via buttons (A, B, X all fine), but turning volume up in IRIS is fine. (Updated) it seems to be mostly the Y button, but a couple of times I've had all buttons fail with the same error message in the logs.

Syslog shows the following error:

Jan 19 17:30:41 pirate-audio mopidy[487]: INFO     [MainThread] mopidy.commands Starting Mopidy core
Jan 19 17:30:41 pirate-audio mopidy[487]: INFO     [MainThread] mopidy.commands Starting Mopidy frontends: RaspberryGPIOFrontend, PiDiFrontend, IrisFrontend, HttpFrontend
Jan 19 17:30:42 pirate-audio mopidy[487]: ERROR    [MainThread] mopidy.commands Got un-handled exception from RaspberryGPIOFrontend
Jan 19 17:30:42 pirate-audio mopidy[487]: Traceback (most recent call last):
Jan 19 17:30:42 pirate-audio mopidy[487]:   File "/usr/lib/python3/dist-packages/mopidy/commands.py", line 241, in _actor_error_handling
Jan 19 17:30:42 pirate-audio mopidy[487]:     yield
Jan 19 17:30:42 pirate-audio mopidy[487]:   File "/usr/lib/python3/dist-packages/mopidy/commands.py", line 438, in start_frontends
Jan 19 17:30:42 pirate-audio mopidy[487]:     frontend_class.start(config=config, core=core)
Jan 19 17:30:42 pirate-audio mopidy[487]:   File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 91, in start
Jan 19 17:30:42 pirate-audio mopidy[487]:     obj = cls(*args, **kwargs)
Jan 19 17:30:42 pirate-audio mopidy[487]:   File "/usr/local/lib/python3.7/dist-packages/mopidy_raspberry_gpio/frontend.py", line 42, in __init__
Jan 19 17:30:42 pirate-audio mopidy[487]:     bouncetime=settings.bouncetime,
Jan 19 17:30:42 pirate-audio mopidy[487]: RuntimeError: Failed to add edge detection
Jan 19 17:30:42 pirate-audio mopidy[487]: INFO     [IrisFrontend-10] mopidy_iris.core Starting Iris 3.55.4
Jan 19 17:30:42 pirate-audio mopidy[487]: INFO     [HttpFrontend-12] mopidy.http.actor HTTP server running at [::ffff:0.0.0.0]:6680
Jan 19 17:30:42 pirate-audio mopidy[487]: INFO     [MainThread] mopidy.commands Starting GLib mainloop

Happy to do more debugging.

@brian-burton brian-burton changed the title Y button on Pirate Headphone generates runtime error Buttons on Pirate Headphone occasionally generate runtime error Jan 22, 2021
@TrollDecker
Copy link

Try this:

Edit /etc/mopidy/mopidy.conf and change either bcm20or bcm24 to blank, with just one space after the =. Don't delete that line or comment it out, because when your configuration is merged with the defaults, it'll include the default setting of that pin. Leaving it blank in your configuration prevents that.

If your board is an original revision, blank bcm24. If it's the newer revision, it'll be bcm20 you'll want to blank.

I think this just solved it for me, but I'm keeping an eye on mine for now.

@TrollDecker
Copy link

Apparently, it did not. 😭

@brian-burton
Copy link
Author

I've done a bit more digging and realised that I raised this against the wrong repo and pimoroni/mopidy-raspberry-gpio#9 already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants