Djuke - DIY Audio

build your own audio equipment

  • Increase font size
  • Default font size
  • Decrease font size
Find many useful products for DIY audio in the menu on the right
Home Support PreAmplifier Preamplifier v2.0 Volumio integration

Preamplifier v2.0 Volumio integration

Print PDF

Introduction

This section describes the python integration between the Preamplifier and a Volumio2 media player. Some examples of use case:

  • Switch on amplifier when media player playback is started
  • Set the input to the Raspberry Pi
  • Show the song title in the display each time a new song is played

For connecting with Volumio python SocketIO client is used: https://pypi.org/project/socketIO-client/

For connecting to the Preamp python serial is used.

The DjukePreamp python files can be found on on GIT: https://github.com/Djuke-DIYAudio/preamp/tree/master/python

Preparations

Lets login using ssh on Volumio2 (default user=volumio, pw=volumio):

ssh 
 This e-mail address is being protected from spambots. You need JavaScript enabled to view it
  (replace the ip-address if needed)

The first time after login, update the package database.

sudo apt-get update

Install pip and use pip to install python-SocketIO-client (this will take some time, since many depending packages need to be installed)

sudo apt-get install python-pip
sudo pip install python-SocketIO-client

The connection to the Preamplifier uses python-serial, if it is not already installed, install it with

sudo apt-get install python-serial

Install GIT and checkout the Preamplifier files:

sudo apt-get install git
git checkout https://github.com/Djuke-DIYAudio/preamp.git

Testing

In the python folder, there are two test programs for testing individually the Volumio connection and the Preamp serial connection:

./VolumioClient.py
./PreampClient.py

Example program

A more complete example program with logging is available (DjukePreamp.py), that can be run as a linux service (using DjukePreamp.service). These scripts can be found on the python folder of GIT

To install it as a service, go to the python folder and run:

sudo ./install-as-service.sh

This copies the relevant files to /usr/local/Djuke and runs it as a service when Volumio boots.

DjukePreamp.py is just an example, adjust it to your situation and enjoy!

Troubleshooting

If the example program does not run as expected, the first thing to check is the log information:

less /var/log/DjukePreamp.log
less /var/log/DjukePreamp-serial.log

The first file shows the output of the python script, the second one the serial output. Check for errors or unexpected behaviour there.

Last Updated on Sunday, 26 April 2020 08:55  

Important information!

From 1st January 2020, the Djuke webshop received a major upgrade and can now be found at: https://webshop.djuke.nl
Orders can only be handled from the new webshop. Not all products are yet transferred, so the old catalogus is left as a reference. Please let me know if you would like to order products that are not yet present in the new webshop.

 


List All Products


Advanced Search

Copyright © 2024 Djuke - DIY Audio. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.