starting software configuration

This commit is contained in:
2019-02-09 09:41:21 +01:00
parent 3e60e872bf
commit 0d9723d784
5 changed files with 95 additions and 3 deletions
+2 -2
View File
@@ -15,8 +15,8 @@ logging.info('Initializing')
# Configuration # Configuration
MUSIC_BASE_DIRECTORY = "mnt/NAS/" MUSIC_BASE_DIRECTORY = "mnt/NAS/"
SOUND_SCANNING = "mnt/INTERNAL/sounds/scanning.mp3" SOUND_SCANNING = "mnt/INTERNAL/qudio/sounds/scanning.mp3"
SOUND_SCAN_FAIL = "mnt/INTERNAL/sounds/fail-05.mp3" SOUND_SCAN_FAIL = "mnt/INTERNAL/qudio/sounds/fail-05.mp3"
QR_SCANNER_TIMEOUT = 4 QR_SCANNER_TIMEOUT = 4
# photo sensor on PIN 5 # photo sensor on PIN 5
Binary file not shown.
+40
View File
@@ -0,0 +1,40 @@
from socketIO_client import SocketIO, LoggingNamespace
import threading
import time
is_playing = False # for toggling play/pause (stores the current status from the pushState events)
socketIO = SocketIO('localhost', 3000)
def play_callback(channel):
global is_playing
if is_playing:
logging.info("PAUSE")
socketIO.emit('pause')
else:
logging.info("PLAY")
socketIO.emit('play')
def events_thread():
socketIO.wait()
try:
socketIO.on('pushState', on_pushState)
socketIO.emit('replaceAndPlay', {'service':'mpd','uri':'mnt/INTERNAL/qudio/sounds/armstrong.mp3'})
time.sleep(3.5)
t1 = threading.Thread(target=play_callback)
t1.start()
t1.join()
time.sleep(3)
t1 = threading.Thread(target=play_callback)
t1.start()
t1.join()
# Exit when Ctrl-C is pressed
except KeyboardInterrupt:
logging.info('Shutdown')
+1 -1
View File
@@ -144,7 +144,7 @@ h2, h3, h4 {
<li><a href="images/IMG_20190122_091612.jpg" data-fancybox="part" data-caption="TCRT5000 sensor module">TCRT5000 reflective sensor module</a></li> <li><a href="images/IMG_20190122_091612.jpg" data-fancybox="part" data-caption="TCRT5000 sensor module">TCRT5000 reflective sensor module</a></li>
<li>The ultra-cheap <a href="images/IMG_20190122_082801.jpg" data-fancybox="part" data-caption="USB webcam">USB webcam</a> that can be found on ebay, aliexpress and the like (just sort for price). Some versions come with a small cable reel. This fits perfectly in the holder at the bottom of the case.</li> <li>The ultra-cheap <a href="images/IMG_20190122_082801.jpg" data-fancybox="part" data-caption="USB webcam">USB webcam</a> that can be found on ebay, aliexpress and the like (just sort for price). Some versions come with a small cable reel. This fits perfectly in the holder at the bottom of the case.</li>
<li><a href="images/IMG_20190122_091508.jpg" data-fancybox="part" data-caption="Micro USB adapter that goes directly into the plug">USB A to micro USB adapter</a> that connects the webcam to the Raspberry Pi's micro USB port</li> <li><a href="images/IMG_20190122_091508.jpg" data-fancybox="part" data-caption="Micro USB adapter that goes directly into the plug">USB A to micro USB adapter</a> that connects the webcam to the Raspberry Pi's micro USB port</li>
<li><a href="images/IMG_20190123_110730.jpg" data-fancybox="part" data-caption="30-pin Apple dock adapter to micro USB and 3.5 mm audio">30-pin Apple dock adapter to micro USB and 3.5 mm audio</a></li> <li><a href="images/IMG_20190123_110730.jpg" data-fancybox="part" data-caption="30-pin Apple dock adapter to micro USB and 3.5 mm audio">30-pin Apple dock adapter to micro USB and 3.5 mm audio. Search for '30-pin micro-usb adapter audio'.</a></li>
<li><a href="images/IMG_20190122_093929.jpg" data-fancybox="part" data-caption="3 mm white LED (with optional 220 &#8486; resistor)">White LED (preferably diffused) for illumination of the QR cards with a proper resistor</a></li> <li><a href="images/IMG_20190122_093929.jpg" data-fancybox="part" data-caption="3 mm white LED (with optional 220 &#8486; resistor)">White LED (preferably diffused) for illumination of the QR cards with a proper resistor</a></li>
<li>3 <a href="images/IMG_20190122_082511.jpg" data-fancybox="part" data-caption="Push buttons with 12 mm caps">push buttons with 12 mm caps</a></li> <li>3 <a href="images/IMG_20190122_082511.jpg" data-fancybox="part" data-caption="Push buttons with 12 mm caps">push buttons with 12 mm caps</a></li>
<li>Jumper cables: 6x 10 cm M-F or F-F for the buttons, 5x 10 cm F-F for the audio module, 5x 20 cm F-F for the sensor and the LED</li> <li>Jumper cables: 6x 10 cm M-F or F-F for the buttons, 5x 10 cm F-F for the audio module, 5x 20 cm F-F for the sensor and the LED</li>
+52
View File
@@ -15,6 +15,58 @@
## Ersteinrichtung ## Ersteinrichtung
Zien:
* volumio installiert
* Externe Stromversorgung
* Assistent durchlaufen, WLAN verbunden, heruntergefahren
* SD-Karte in Laptop
* touch ssh
* mkdir /volumio_data2/dyn/data/INTERNAL/qudio
* copy qudio.py + sounds + test nach /volumio_data2/dyn/data/INTERNAL/qudio
* interne Musik auch nach /INTERNAL
* Neustart + Rescan
* ssh volumio@qudio.local
* Activate software mixer
* sudo apt-get update
* sudo apt-get install fswebcam zbar-tools
* lsusb && ls /dev/video*
* fswebcam -r 320x240 -d /dev/video0 -v /data/backgrounds/webcam-test.jpg
* http://192.168.178.31/backgrounds/webcam-test.jpg
* zbarcam --quiet --nodisplay --raw -Sdisable -Sqrcode.enable --prescale=320x240 /dev/video0
* uname -a && cat /etc/os-release
## Python 3.6 minimum
https://www.scivision.co/compile-install-python-beta-raspberry-pi/
sudo apt-get install libffi-dev libbz2-dev liblzma-dev libsqlite3-dev libncurses5-dev libgdbm-dev zlib1g-dev libreadline-dev libssl-dev tk-dev build-essential libncursesw5-dev libc6-dev openssl git
https://gist.github.com/dschep/24aa61672a2092246eaca2824400d37f | https://gist.github.com/SeppPenner/6a5a30ebc8f79936fa136c524417761d
cd ~
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
tar xf Python-3.7.2.tar.xz
cd Python-3.7.2
./configure
make
sudo make altinstall --> Problem mit OpenSSL
python3.7 --> quit()
sudo easy_install-3.6 -U pip # https://stackoverflow.com/a/34580922/3761783 --> OpenSSL fehlt!
sudo pip3.7 install --upgrade pip
sudo pip3.7 install socketio-client
sudo pip3.7 install RPi.GPIO
python3.7 test.py
hat nicht funktioniert:
* apt-get install python3 python3-pip # https://github.com/edmw/volumio-diy/blob/master/README.md#install-volumio-hid
* sudo easy_install3 pip
* pip3 install socketIO-client
* pip3 install aiohttp
----------------------------------------
* volumio installiert * volumio installiert
* Ausgabe über "Generic I2S DAC" * Ausgabe über "Generic I2S DAC"
* Netzlaufwerk verbinden * Netzlaufwerk verbinden