Skip to main content

Mopidy extension for GPIO input on a Raspberry Pi

Project description

Latest PyPI version CircleCI build status Test coverage

Mopidy extension for GPIO input on a Raspberry Pi

Installation

Ensure Mopidy has access to GPIO:

sudo usermod -a -G gpio mopidy

Install by running:

python3 -m pip install Mopidy-Raspberry-GPIO

Or, if available, install the Debian/Ubuntu package from apt.mopidy.com.

Configuration

Before starting Mopidy, you must add configuration for Mopidy-Raspberry-GPIO to your Mopidy configuration 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

Each bcmN entry corresponds to the BCM pin of that number.

You must assign an event, mode and bouncetime (ms) to your desired pins.

Supported events:

  • play_pause

  • volume_up

  • volume_down

  • next

  • prev

Supported modes:

  • active_low - configures the pin with a pull-up and triggers when it reads 0/low (RECOMMENDED)

  • active_high - configures the pin as a pull-down and triggers when it reads 1/high

Events volume_up and volume_down both support an (optional) “step” option, which controls the amount (in percent) that the volume is adjusted with each button press.

Eg:

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

Project resources

Credits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mopidy-raspberry-gpio-1.0.3.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

mopidy_raspberry_gpio-1.0.3-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file mopidy-raspberry-gpio-1.0.3.tar.gz.

File metadata

  • Download URL: mopidy-raspberry-gpio-1.0.3.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.10

File hashes

Hashes for mopidy-raspberry-gpio-1.0.3.tar.gz
Algorithm Hash digest
SHA256 b91671ded07f24606e2d0c6a4890745934024d074ef7a15f3f8082f0b97f27bd
MD5 096770d8351e93fefb9835e48cfdb86e
BLAKE2b-256 0df573d268568aadd64215b02e9468ca7a98c2189da589f435333176f684374d

See more details on using hashes here.

File details

Details for the file mopidy_raspberry_gpio-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: mopidy_raspberry_gpio-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.10

File hashes

Hashes for mopidy_raspberry_gpio-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bd46647ca2697053e990121b26bcc0748144e3c3032d10e3bb1d6f9ac619181c
MD5 9e643f9084b374eef71ef3708c68d4eb
BLAKE2b-256 140e7189b033a973412f84db7ce2594928cd58643c0d6fe4452be71a449822f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page