Blog

 

User projects: Didier’s streaming players

Our user Didier built two interesting devices, both based on Kodi/OpenELEC and with the following features:

  • accessing a centralized multimedia database on a NAS with MySQL
  • tvheadend service for radio channels from DVB-T and DVB-C
  • Kore remote app to control the system remotely from the smartphone
  • automatic start of the last radio channel after a reboot

The first player is built into an old radio. The electronics were replaced by a Raspberry Pi 3 and an HiFiBerry Amp+ and installed using a 3D printed mounting board, the loudspeakers were replaced as well. To round it up, a rotary encoders to control the player’s volume and to mute/unmute was installed, this is integrated using a custom Kodi add-on. Since the add-on supports up to 3 rotary encoders, there is room to add some more controls. Further ideas for future tunings are a touch screen or some status LEDs.

Here is a photo of the front of this player:

The custom Kodi add-on for using the rotary encoders (these were used) to control the player can be downloaded here: Didier_service.rotaryEncoder-0.9.9.
It configures three encoders, each of them has three GPIO pins, two (called pin A and Pin B) for the rotary encoder itself and one for the push button.

In the configuration of the add-on, the GPIO pins of the Raspberry Pi connected to each of the encoders need to be selected. If a GPIO pin number is left to ‘None’ (default value) it is not used. For rotary encoders without a push button this GPIO pin value should be set to ‘None’, it will work as well as long the pins A/B are defined.

The three rotary encoders are defined as follows:

  • Volume up/down and mute:
    • ‘Pin A’ and ‘B’ control volume Up and Down for clockwise and anticlockwise events.
    • ‘Button’ controls the mute/unmute action.
  • Up/down and ok:
    • ‘Pin A’ and ‘B’ control up and down keys for clockwise and anticlockwise events.
    • ‘Button’ controls the ‘enter’ key action.
  • Left/Right and cancel:
    • ‘Pin A’ and ‘B’ control left and right keys for clockwise and anticlockwise events.
    • ‘Button’ controls the ‘cancel’ action.

The second audio player is based on the Raspberry Pi Zero W with an HiFiBerry MiniAmp. These are connected to a waterproof in-wall loudspeaker, the whole assembly will be installed in his bathroom’s ceiling and powered by the power line of the in-ceiling lamps so that the music starts when the light is switched on.

The photo below shows this player’s test setup, still with different loudspeakers and an HDMI cable for the setup:

Anton (HiFiBerry team)image-mask
Posted by Anton (HiFiBerry team) on June 26, 2017