Skip to main content

Mopidy Pummeluff extension

Project description

Mopidy Pummeluff

Pummeluff is a Mopidy extension which allows you to control Mopidy via RFID cards. It is as simple as that:

  • Register an action to an RFID card

  • Touch that card on the RFID reader and the action will be executed

Thus, the Mopidy Pummeluff extension adds the following features to Mopidy:

  • A radically simple web UI which can be used to manage the RFID cards

  • A daemon which continuously reads RFID cards in the background and executes the assigned actions

There are several actions included, such as replacing the tracklist with a desired URI, setting the volume to a specific level or controlling the playback state.

Hardware

Requirements

To get the whole thing working, you need the following hardware:

  • A Raspberry Pi 3 Model B

  • An RC522 RFID module (available on AliExpress for approx. USD 1)

  • RFID cards, keyfobs or stickers (ISO 14443A and Mifare should work)

Connecting the RC522 module

Please connect the RC522 RFID module to the RPi as follows:

  • RC522 pin 1 [SDA ] ––– RPi pin 24 [SPI0 CE0 ]

  • RC522 pin 2 [SCK ] ––– RPi pin 23 [SPI0 SCLK]

  • RC522 pin 3 [MOSI] ––– RPi pin 19 [SPI0 MOSI]

  • RC522 pin 4 [MISO] ––– RPi pin 21 [SPI0 MISO]

  • RC522 pin 5 [IRQ ] ––– RPi pin 18 [ GPIO 24 ]

  • RC522 pin 6 [GND ] ––– RPi pin 20 [ GND ]

  • RC522 pin 7 [RST ] ––– RPi pin 22 [ GPIO 25 ]

  • RC522 pin 8 [3.3V] ––– RPi pin 17 [3.3V PWR ]

Please have a look at the Raspberry Pi SPI pinout if you want to have a graphical view of the RPi GPIO pins.

Installation

Prepare Raspberry Pi

Before you can install and use Mopidy Pummeluff, you need to configure your Raspberry Pi.

We want to enable the SPI interface and give the mopidy user access to it. This is required for the communication to the RFID module. Enter this command:

sudo raspi-config

In the configuraton utility, Enable the SPI under 5 Interfacing Options – P4 SPI.

After that, add your mopidy user to the spi and gpio group:

sudo usermod -a -G spi,gpio mopidy

If you’re planning to use a card to shutdown the system, you also need to create a sudo rule, so that the mopidy user can shutdown the system without a password prompt:

echo "mopidy ALL = NOPASSWD: /sbin/shutdown" > /etc/sudoers.d/mopidy

Install via pip

The recommended way to install Mopidy Pummeluff by using pip and thus by executing the following command:

sudo pip install mopidy-pummeluff

Install from source

Alternatively, you can also install Mopidy Pummeluff from source, by running this command:

sudo su -
cd /usr/src
git clone https://github.com/confirm/mopidy-pummeluff.git
cd mopidy-pummeluff
python setup.py install

Configuration

Activate and configure the Mopidy HTTP extension and make sure you can connect to the Web UI. The minimal config looks like this:

[http]
enabled = true
hostname = 0.0.0.0

Usage

Open the Mopidy Web UI (i.e. http://{MOPIDY_IP}:6680/). You should see a pummeluff web client which can be used to regsiter new RFID cards.

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-Pummeluff-0.1.0.tar.gz (19.2 kB view hashes)

Uploaded Source

Built Distribution

Mopidy_Pummeluff-0.1.0-py2-none-any.whl (14.8 kB view hashes)

Uploaded Python 2

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