diff --git a/code/piplayer2.py b/code/piplayer2.py index dc7f51a..0ee4a5c 100644 --- a/code/piplayer2.py +++ b/code/piplayer2.py @@ -17,7 +17,7 @@ SOUND_PLAYBACK_ERROR = "/home/pi/piplayer2/sounds/error.mp3" QR_SCANNER_TIMEOUT = 3 -logging.basicConfig(level=logging.DEBUG, format='%(asctime)s.%(msecs)d %(levelname)s - %(message)s') +logging.basicConfig(level=logging.INFO, format='%(asctime)s.%(msecs)d %(levelname)s - %(message)s') logging.info('Initializing') GPIO.setmode(GPIO.BCM) @@ -101,7 +101,7 @@ try: try: qr_code = zbarcam.stdout.readline().rstrip() qr_code = qr_code.decode("utf-8") # python3 - logging.debug("QR Code: {}".format(qr_code)) + logging.info("QR Code: {}".format(qr_code)) if (not qr_code.startswith("http://")): # create full path @@ -149,15 +149,15 @@ try: subprocess.check_call(["mocp", "-p"]) except subprocess.CalledProcessError as e: - logging.debug("Error starting playback, mocp returned {}".format(e.returncode)) - logging.debug(e.output) + logging.error("Error starting playback, mocp returned {}".format(e.returncode)) + logging.error(e.output) subprocess.call(["mocp", "-l", SOUND_PLAYBACK_ERROR]) except FileNotFoundError as e: - logging.debug("Could not open directory {}".format(directory)) + logging.error("Could not open directory {}".format(directory)) subprocess.call(["mocp", "-l", SOUND_PLAYBACK_ERROR]) else: - logging.debug('Timeout on zbarcam') + logging.warning('Timeout on zbarcam') subprocess.call(["mocp", "-l", SOUND_SCAN_FAIL]) zbarcam.terminate() diff --git a/installation.txt b/installation.txt index 226854b..585b980 100644 --- a/installation.txt +++ b/installation.txt @@ -111,7 +111,20 @@ irsend LIST JBLIIIP "" ## Der Befehl muss 2x schnell hintereinander gesendet werden. Offensichtlich muss die Konfiguration noch verbessert werden. irsend SEND_ONCE JBLIIIP KEY_MUTE +# autostart for piplayer with log output redirection +# (siehe http://raspberrypi.stackexchange.com/questions/8169/run-startup-application-as-a-specific-user) +sudo nano /etc/rc.local +# ... +# su pi -c 'python3 /home/pi/piplayer2/piplayer2.py >> /home/pi/piplayer2/piplayer2.log 2>&1 &' +# exit 0 +sudo reboot + +# check if running after restart +ps -ef | grep python + +# Tests mit QR-Code-Karten +tail -f /home/pi/piplayer2/piplayer2.log diff --git a/misc/QR-Karten - Vorlage.odt b/misc/QR-Karten - Vorlage.odt new file mode 100644 index 0000000..fef6b10 Binary files /dev/null and b/misc/QR-Karten - Vorlage.odt differ diff --git a/misc/Schablone.svg b/misc/Schablone.svg new file mode 100644 index 0000000..e598187 --- /dev/null +++ b/misc/Schablone.svg @@ -0,0 +1,240 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + 30 + 30 + 5,60612 + 35 + 45 + 45 + 14,5 + Ø99 + + + + + + diff --git a/misc/Sizes.odt b/misc/Sizes.odt new file mode 100644 index 0000000..e8ecc5d Binary files /dev/null and b/misc/Sizes.odt differ diff --git a/misc/ct.16.21.152-154.pdf b/misc/ct.16.21.152-154.pdf new file mode 100644 index 0000000..b534ed8 Binary files /dev/null and b/misc/ct.16.21.152-154.pdf differ diff --git a/notes.md b/notes.md index e507947..f1d4da7 100644 --- a/notes.md +++ b/notes.md @@ -28,5 +28,6 @@ - Buttons per Acryl-Transfer beschriften? ch.16.05.110-115.pdf - Beim Zusammenbau Kamera vor dem Verkleben testen - +## Sonstiges +- Backup SD Card