Closed flo2305 closed 5 years ago
Hi @pgx3d
currently Phoniebox uses the evdev version 0.7.0. I fixed it to 0.7.0
after I had trouble with RFID reader(s) approx 12 months ago with the latest evdev version.
I think it should be possible to replace evdev within a running system. Possibly you can do some tests and post the results here.
Hi everyone, just an idea: Have you already checked the state of the DIP switches to see if the default output format has changed with the newer version of the KKmoon RF Reader? The switches are located here: https://www.google.de/search?q=KMG1231892222604EF+manual&tbm=isch&source=iu&ictx=1&fir=5qeHU3LPgniQQM%253A%252CFPqf_btY86_C8M%252C_&usg=AI4_-kQK69ETCEH-p6NTAEWI8VpfLN1xog&sa=X&ved=2ahUKEwigovSy5YDeAhVL_KQKHUw3AiUQ9QEwCXoECAUQCg#imgrc=5qeHU3LPgniQQM:
Cheers.
The dip switches were my 1st thought aswell.i have the HID 413d:2107. But my version doesn't have the dip switches.uts done by plugin it in and out twice within a second and than leave it connect.tgan it starts beeping and every beeping is a new setting.to see it should be connected to a PC with open document.
@MiczFlor
will try tonight/tomorrow
( welche Version läuft bei dir? Das steht im File settings/version. Ich muss mich noch mal am Kinn kratzen und nachdenken. Wenn's dir nichts ausmacht, dann mach doch noch mal einen Install mit dem one line scrip - und lösche vorher den gesamten RPi-Jukebox-RFID Ordner Wenn du vorher was anderes probieren möchtest, das aber nicht gehen sollte, dann entferne im scripts Ordner alle Datein, die mit .pyc enden und versuche es dann noch mal. )
Tschüss
PS: wenn das ding läuft, biete ich mich als 1st level supporter an, aus nostalgischen gründen ^^
inhalte des RPi Jukebox Ordners entfernt,Installiert via onelinescript
Fehler während installation:
Collecting evdev==0.7.0 Could not find a version that satisfies the requirement evdev==0.7.0 (from versions: ) No matching distribution found for evdev==0.7.0
Collecting youtube_dl Could not find a version that satisfies the requirement youtube_dl (from versions: ) No matching distribution found for youtube_dl
If you are using an USB RFID reader, connect it to your RPi.
(In case your RFID reader required soldering, consult the manual.)
Have you connected your USB Reader? [Y/n] y
Traceback (most recent call last):
File "RegisterDevice.py", line 4, in
Was ich danach noch probiert habe war eine Datei devicename.txt anzulegen und nochmal das Kartenlesegerät zu registrieren.
pi@raspberrypi:~/RPi-Jukebox-RFID/scripts $ touch deviceName.txt
pi@raspberrypi:~/RPi-Jukebox-RFID/scripts $ ls
daemon_rfid_reader.py idle-watchdog.sh MFRC522.py RegisterDevice.py userscripts
deviceName.txt inc.readArgsFromCommandLine.sh playlist_recursive_by_folder.php resume_play.sh
gpio-buttons.py inc.writeFolderConfig.sh playout_controls.sh rfid_trigger_play.sh
helperscripts installscripts Reader.py shuffle_play.sh
pi@raspberrypi:~/RPi-Jukebox-RFID/scripts $ python RegisterDevice.py
Traceback (most recent call last):
File "RegisterDevice.py", line 4, in
pi@raspberrypi:~/RPi-Jukebox-RFID $ cat settings/version 1.1.6 pi@raspberrypi:~/RPi-Jukebox-RFID $
Hi @mariposastern can you try to run this in your terminal?
sudo pip install "evdev == 0.7.0"
And then try to register the device?
pi@raspberrypi:~ $ sudo pip install "evdev == 0.7.0" Collecting evdev==0.7.0 Could not find a version that satisfies the requirement evdev==0.7.0 (from versions: ) No matching distribution found for evdev==0.7.0
-computer says no-
@mariposastern weird... You are online with your pi? You can:
ping phoniebox.de
Sorry, this is a ridiculous question, I just can't think of anything else...
=D cute ^^
I guess my python installation is cracked. I used "noobs" raspbian image srtuff and one line script and updated everything and in between of these things something is cracked.
anyway: next clean installation, installing os manually and wont use the installtion script. will need more time but its for my daughter <3
thank you flor
Hi, I had the problem that my reader was listed twice:
python RegisterDevice.py
Choose the reader from list
0 HID 413d:2107
1 HID 413d:2107
>>> from evdev import list_devices
>>> list_devices()
['/dev/input/event1', '/dev/input/event0']
The problem was, that only event0 works, but Reader.py chooses event1, because it's the first one in the list with the devices name. So I kind of fixed it by removing the break statement in Reader.py:
for device in devices:
if device.name == deviceName:
self.dev = device
#break
I have no Idea, why the device is listed twice. But now it works and that is fine.
@maehjam , great work-arround. It works like a charm now! Thanks!
Hi,
I just wanted to report that I purchased (edit: one month ago) the KKMOON RFID reader (13,56mhz) which was formerly linked in the manual. I tried to get it running with build 1.14 and failed. However, I tried again with 1.17 some days ago and everything seems working alright.
Thanks for this project. I am slightly surprised how smooth it went in the end. Especially having in mind my lack of experience and knowledge with Linux projects.
Best Paluty
Hm...for me 1.1.8-rc1 did not work with just purchased KKMOON Reader. I think I found the problem and created a fix for that. How should I proceed? Shall I just dump the file or can I push my branch?
Update: I generated a pull request for my solution.
The code has moved on. I am closing this, assuming the later code solved it. :) All the best, micz
Hi, Kann es sein dass es wieder nicht mehr geht?
Hi, ich sehe nicht, dass meine vorgeschlagenen Änderungen schon auf dem Master sind.. Hat es bei Dir mal funktioniert?
Hi, Kann es sein dass es wieder nicht mehr geht?
Hi, ich sehe nicht, dass meine vorgeschlagenen Änderungen schon auf dem Master sind.. Hat es bei Dir mal funktioniert?
Hab mir die Woche erst das Setup installiert und dachte wenn das Thema geschlossen wurde vor 10 Tagen, dass es nun funktionieren würde. Leider funktioniert es bei mir aktuell nicht.
Hab mir die Woche erst das Setup installiert und dachte wenn das Thema geschlossen wurde vor 10 Tagen, dass es nun funktionieren würde. Leider funktioniert es bei mir aktuell nicht.
Ich habe schon lange nicht mehr gepulled und getestet. Kennst Du Dich mit Programmierung etwas aus? Kannst Du die Änderungen die ich vorgeschlagen habe selber einbringen?
Hi @cgnmause @aeskimo Danke für den Hinweis. Habt ihr dieses Dokument gelesen? https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/RFID-Reader-Special Es ist schwer irgendwas zum Problem zu sagen ohne zu wissen welche Version ihr am Laufen habt und welchen Card Reader. Hier Infos zum bug reporting https://github.com/MiczFlor/RPi-Jukebox-RFID#reporting-bugs Beste Grüße, micz
Hallo Zusammen,
ich bin schon länger dabei die RPi-Jukebox einzurichten. Ich habe eine USB-Soundkarte mit Boxen und ein USB-RFID-Leser. Beim ersten versuch hatte ich das Problem, dass der Sound nicht funktioniert. Ein paar Tage später und nach einer neuinstallation hatte ich das bereits beschriebene Problem, dass ich 2 Einträge für den RFID-Leser hatte. Nachdem ich das "Break" aus der Register-Datei entfernt hatte, hat es auch funktioniert. Allerdings hat der Sound nicht mehr funktioniert. Nachdem ich dann ein paar Wochen später wieder angefangen habe, habe ich wieder Formatiert und neu eingerichtet. Jetzt funktioniert der Sound wieder aber der RFID-Reader nicht.
Ich habe mal auf Dektop umstellt und den RFID-Leser getestet. Dort kommt das Signal auch an. Er Zeigt mir ein kleines Fenster, wo dann die Zahl reingeschrieben wird und anschließend verschwindet es.
Versuche ich den Reader zu registrieren, so erscheint folgendes:
pi@raspberrypi:~/RPi-Jukebox-RFID/scripts $ python RegisterDevice.py Choose the reader from list 0 HOLTEK Wireless USB Device 1 HOLTEK Wireless USB Device 2 C-Media Electronics Inc. USB PnP Sound Device 3 HID 413d:2107 4 HID 413d:2107
Angeschlossen sind eine Bluetoothtastatur mit Trackball, eine USB-Soundkarte und der Reader
Weder bei 3 noch bei 4 erstellt er den gewünschten Ordner unter Audiofolders. Woran könnte das liegen?
Wähle ich die 3 aus und führe: /home/pi/RPi-Jukebox-RFID/scripts/helperscripts/Analytics_AfterInstallScript.sh
aus, so kommt folgendes:
PHONIEBOX INFO version: 1.1.8-rc3 edition: plusSpotify Audio_iFace_Name: PCM Audio_Folders_Path: /home/pi/RPi-Jukebox-RFID/shared/audiofolders Audio_Volume_Change_Step: 3 Max_Volume_Limit: 100 Idle_Time_Before_Shutdown: 0 Second_Swipe: RESTART Playlists_Folders_Path: /home/pi/RPi-Jukebox-RFID/playlists *** ShowCover: ON
*** CONF FILES DEFAULT
/etc/samba/smb.conf -rw-r--r-- 1 root root 9,5K Dez 9 07:04 /etc/samba/smb.conf path=/home/pi/RPi-Jukebox-RFID/shared path=/home/pi/RPi-Jukebox-RFID/shared/audiofolders /etc/lighttpd/lighttpd.conf -rw-r--r-- 1 root root 1,1K Dez 9 06:50 /etc/lighttpd/lighttpd.conf /etc/lighttpd/conf-available/15-fastcgi-php.conf -rw-r--r-- 1 root root 398 Dez 9 06:50 /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/php/7.0/fpm/php.ini -rw-r--r-- 1 root root 70K Dez 9 07:14 /etc/php/7.0/fpm/php.ini /etc/sudoers -r--r----- 1 root root 784 Dez 9 06:50 /etc/sudoers /etc/systemd/system/phoniebox* -rw-r--r-- 1 root root 313 Dez 9 06:50 /etc/systemd/system/phoniebox-rfid-reader.service -rw-r--r-- 1 root root 340 Dez 9 06:50 /etc/systemd/system/phoniebox-startup-sound.service -rw-r--r-- 1 root root 272 Dez 9 06:50 /etc/systemd/system/phoniebox-gpio-buttons.service -rw-r--r-- 1 root root 291 Dez 9 06:50 /etc/systemd/system/phoniebox-idle-watchdog.service *** /etc/mpd.conf -rw-r----- 1 mpd audio 14K Dez 9 07:17 /etc/mpd.conf music_directory "/home/pi/RPi-Jukebox-RFID/shared/audiofolders"
*** /etc/dhcpcd.conf -rw-rw-r-- 1 root netdev 1,7K Sep 10 10:31 /etc/dhcpcd.conf
option domain_name_servers, domain_name, domain_search, host_name
*** /etc/wpa_supplicant/wpa_supplicant.conf -rw------- 1 root root 133 Dez 9 07:35 /etc/wpa_supplicant/wpa_supplicant.conf
*** +Spotify Edition
/etc/locale.gen -rw-r--r-- 1 root root 8,9K Dez 13 11:13 /etc/locale.gen /etc/locale.gen -rw-r--r-- 1 root root 8,9K Dez 13 11:13 /etc/locale.gen /etc/mopidy/mopidy.conf -rw-r----- 1 mopidy root 1,1K Dez 9 06:51 /etc/mopidy/mopidy.conf username = 1122011251 ~/.config/mopidy/mopidy.conf -rw-r--r-- 1 root root 3,3K Dez 9 06:51 /home/pi/.config/mopidy/mopidy.conf
username = 1122011251
Bei der 4 erscheint dann dies:
PHONIEBOX INFO version: 1.1.8-rc3 edition: plusSpotify Audio_iFace_Name: PCM Audio_Folders_Path: /home/pi/RPi-Jukebox-RFID/shared/audiofolders Audio_Volume_Change_Step: 3 Max_Volume_Limit: 100 Idle_Time_Before_Shutdown: 0 Second_Swipe: RESTART Playlists_Folders_Path: /home/pi/RPi-Jukebox-RFID/playlists *** ShowCover: ON
*** CONF FILES DEFAULT
/etc/samba/smb.conf -rw-r--r-- 1 root root 9,5K Dez 9 07:04 /etc/samba/smb.conf path=/home/pi/RPi-Jukebox-RFID/shared path=/home/pi/RPi-Jukebox-RFID/shared/audiofolders /etc/lighttpd/lighttpd.conf -rw-r--r-- 1 root root 1,1K Dez 9 06:50 /etc/lighttpd/lighttpd.conf /etc/lighttpd/conf-available/15-fastcgi-php.conf -rw-r--r-- 1 root root 398 Dez 9 06:50 /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/php/7.0/fpm/php.ini -rw-r--r-- 1 root root 70K Dez 9 07:14 /etc/php/7.0/fpm/php.ini /etc/sudoers -r--r----- 1 root root 784 Dez 9 06:50 /etc/sudoers /etc/systemd/system/phoniebox* -rw-r--r-- 1 root root 313 Dez 9 06:50 /etc/systemd/system/phoniebox-rfid-reader.service -rw-r--r-- 1 root root 340 Dez 9 06:50 /etc/systemd/system/phoniebox-startup-sound.service -rw-r--r-- 1 root root 272 Dez 9 06:50 /etc/systemd/system/phoniebox-gpio-buttons.service -rw-r--r-- 1 root root 291 Dez 9 06:50 /etc/systemd/system/phoniebox-idle-watchdog.service *** /etc/mpd.conf -rw-r----- 1 mpd audio 14K Dez 9 07:17 /etc/mpd.conf music_directory "/home/pi/RPi-Jukebox-RFID/shared/audiofolders"
*** /etc/dhcpcd.conf -rw-rw-r-- 1 root netdev 1,7K Sep 10 10:31 /etc/dhcpcd.conf
option domain_name_servers, domain_name, domain_search, host_name
*** /etc/wpa_supplicant/wpa_supplicant.conf -rw------- 1 root root 133 Dez 9 07:35 /etc/wpa_supplicant/wpa_supplicant.conf
*** +Spotify Edition
/etc/locale.gen -rw-r--r-- 1 root root 8,9K Dez 13 11:13 /etc/locale.gen /etc/locale.gen -rw-r--r-- 1 root root 8,9K Dez 13 11:13 /etc/locale.gen /etc/mopidy/mopidy.conf -rw-r----- 1 mopidy root 1,1K Dez 9 06:51 /etc/mopidy/mopidy.conf username = 1122011251 ~/.config/mopidy/mopidy.conf -rw-r--r-- 1 root root 3,3K Dez 9 06:51 /home/pi/.config/mopidy/mopidy.conf
username = 1122011251
@Bauzi1984 : Schau Dir doch mal bitte meinen pull request an, d.h. ich habe eine kleine Änderung am Reader.py gemacht. Damit müsste es funktionieren. Viele Grüße Christoph
tut mir leid, ich bin für die Jukebox neu bei github. Wo finde ich denn den pull request? Das was ich gefunden hatte funktioniert leider nicht:
pi@raspberrypi:~ $ git clone https://github.com/MiczFlor/RPi-Jukebox-RFID.git
fatal: Zielpfad 'RPi-Jukebox-RFID' existiert bereits und ist kein leeres Verzeichnis.
pi@raspberrypi:~ $ git request-pull https://github.com/MiczFlor/RPi-Jukebox-RFID.git
fatal: Kein Git-Repository (oder irgendein Elternverzeichnis): .git
@Bauzi1984 : Nee. schau mal hier: https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/327/files bzw. hier: https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/6e7ec83c52b1470aa40d6ac1e66c0e472bf1b153/scripts/Reader.py
Ich hoffe das hilft.
Leider nicht. Gibt es irgendein Logfile, in dem ich mehr Infos bekomme?
@Bauzi1984 Ich befürchte nicht wirklich. Hast Du die Datei Reader.py ausgetauscht? Was hast Du für einen Leser?
ich hatte den Quelltext in der Reader.py durch den Quelltext aus deinem zweiten Link ersetzt. KKmoon IC Kartenlesegerät 14443A https://www.amazon.de/gp/product/B011XI2DE8
ich hab evtl. was...
ich hab mal "ps -e" eingegeben um mir die aktiven Prozesse anzugucken. Da war aber nichts dabei, was ich mit dem RFID-Reader in verbindung bringe. Täusche ich mich da?
PID TTY TIME CMD
1 ? 00:00:02 systemd
2 ? 00:00:00 kthreadd
3 ? 00:00:00 kworker/0:0
4 ? 00:00:00 kworker/0:0H
5 ? 00:00:00 kworker/u8:0
6 ? 00:00:00 mm_percpu_wq
7 ? 00:00:00 ksoftirqd/0
8 ? 00:00:00 rcu_sched
9 ? 00:00:00 rcu_bh
10 ? 00:00:00 migration/0
11 ? 00:00:00 cpuhp/0
12 ? 00:00:00 cpuhp/1
13 ? 00:00:00 migration/1
14 ? 00:00:00 ksoftirqd/1
15 ? 00:00:00 kworker/1:0
16 ? 00:00:00 kworker/1:0H
17 ? 00:00:00 cpuhp/2
18 ? 00:00:00 migration/2
19 ? 00:00:00 ksoftirqd/2
20 ? 00:00:00 kworker/2:0
21 ? 00:00:00 kworker/2:0H
22 ? 00:00:00 cpuhp/3
23 ? 00:00:00 migration/3
24 ? 00:00:00 ksoftirqd/3
25 ? 00:00:00 kworker/3:0
26 ? 00:00:00 kworker/3:0H
27 ? 00:00:00 kdevtmpfs
28 ? 00:00:00 netns
29 ? 00:00:00 kworker/0:1
30 ? 00:00:00 kworker/1:1
31 ? 00:00:00 kworker/2:1
32 ? 00:00:00 kworker/3:1
33 ? 00:00:00 khungtaskd
34 ? 00:00:00 oom_reaper
35 ? 00:00:00 writeback
36 ? 00:00:00 kcompactd0
37 ? 00:00:00 crypto
38 ? 00:00:00 kblockd
39 ? 00:00:00 watchdogd
40 ? 00:00:00 rpciod
41 ? 00:00:00 xprtiod
42 ? 00:00:00 kworker/u8:1
44 ? 00:00:00 kswapd0
45 ? 00:00:00 nfsiod
55 ? 00:00:00 kthrotld
56 ? 00:00:00 iscsi_eh
57 ? 00:00:00 dwc_otg
58 ? 00:00:00 DWC Notificatio
59 ? 00:00:00 kworker/0:2
60 ? 00:00:00 vchiq-slot/0
61 ? 00:00:00 vchiq-recy/0
62 ? 00:00:00 vchiq-sync/0
63 ? 00:00:00 vchiq-keep/0
64 ? 00:00:00 SMIO
65 ? 00:00:00 irq/92-mmc1
66 ? 00:00:00 kworker/0:3
67 ? 00:00:00 kworker/0:4
68 ? 00:00:00 mmcqd/0
69 ? 00:00:00 jbd2/mmcblk0p2-
70 ? 00:00:00 ext4-rsv-conver
71 ? 00:00:00 ipv6_addrconf
87 ? 00:00:00 kworker/1:1H
94 ? 00:00:00 systemd-journal
102 ? 00:00:00 kworker/u8:2
121 ? 00:00:00 kworker/2:2
125 ? 00:00:00 kworker/3:2
127 ? 00:00:00 systemd-udevd
149 ? 00:00:00 kworker/1:2
230 ? 00:00:00 cfg80211
233 ? 00:00:00 brcmf_wq/mmc1:0
235 ? 00:00:00 brcmf_wdog/mmc1
280 ? 00:00:00 systemd-timesyn
333 ? 00:00:00 atd
337 ? 00:00:00 cron
339 ? 00:00:00 rsyslogd
344 ? 00:00:00 thd
349 ? 00:00:00 dbus-daemon
378 ? 00:00:00 dhcpcd
384 ? 00:00:00 kworker/u8:3
397 ? 00:00:00 avahi-daemon
399 ? 00:00:00 systemd-logind
414 ? 00:00:00 avahi-daemon
416 ? 00:00:00 kworker/3:3
420 ? 00:00:00 wpa_supplicant
434 ? 00:00:00 kworker/2:1H
460 ? 00:00:00 php-fpm7.0
464 ? 00:00:02 gpio-buttons.py
493 ? 00:00:06 mopidy
503 ? 00:00:00 lightdm
510 ? 00:00:00 kworker/0:1H
512 ? 00:00:00 kworker/3:1H
521 tty1 00:00:00 agetty
581 ? 00:00:00 sshd
809 tty7 00:00:00 Xorg
835 ? 00:00:00 php-fpm7.0
836 ? 00:00:00 php-fpm7.0
838 ? 00:00:00 lighttpd
856 ? 00:00:00 nmbd
891 ? 00:00:00 exim4
912 ? 00:00:00 kworker/u9:0
913 ? 00:00:00 hciattach
915 ? 00:00:00 kworker/u9:1
916 ? 00:00:00 kworker/u9:2
917 ? 00:00:00 bluetoothd
920 ? 00:00:00 bluealsa
934 ? 00:00:00 krfcommd
949 ? 00:00:00 lightdm
959 ? 00:00:00 systemd
962 ? 00:00:00 (sd-pam)
1024 ? 00:00:00 lxsession
1033 ? 00:00:00 dbus-daemon
1131 ? 00:00:00 ssh-agent
1138 ? 00:00:00 gvfsd
1143 ? 00:00:00 gvfsd-fuse
1160 ? 00:00:00 openbox
1164 ? 00:00:00 lxpolkit
1166 ? 00:00:01 lxpanel
1168 ? 00:00:01 pcmanfm
1175 ? 00:00:00 ssh-agent
1182 ? 00:00:00 polkitd
1199 ? 00:00:00 smbd
1201 ? 00:00:00 smbd-notifyd
1202 ? 00:00:00 cleanupd
1206 ? 00:00:00 lpqd
1211 ? 00:00:00 menu-cached
1215 ? 00:00:00 gvfs-udisks2-vo
1218 ? 00:00:00 udisksd
1225 ? 00:00:00 gvfs-mtp-volume
1234 ? 00:00:00 gvfs-gphoto2-vo
1235 ? 00:00:00 sh
dachte da müsste was stehen, wenn ich in meiner "crontab" folgende Zeilen habe:
@reboot mpg123 /home/pi/RPi-Jukebox-RFID/misc/startupsound.mp3 @reboot python2 /home/pi/RPi-Jukebox-RFID/scripts/daemon_rfid_reader.py
jetzt habe ich mal "python2 /home/pi/RPi-Jukebox-RFID/scripts/daemon_rfid_reader.py" ausgeführt und erhalte folgende Meldung:
python2 /home/pi/RPi-Jukebox-RFID/scripts/daemon_rfid_reader.py
Traceback (most recent call last):
File "/home/pi/RPi-Jukebox-RFID/scripts/daemon_rfid_reader.py", line 3, in
kann das mein Problem sein? Hatte mit dem Onlinescript installiert
@Bauzi1984 Kannst Du mal dein Reader.py posten? Stimmen die Einrückungen?
`# Forked from Francisco Sahli's https://github.com/fsahli/music-cards/blob/master/Reader.py
import string
import os.path import sys
from evdev import InputDevice, categorize, ecodes, list_devices, ecodes from select import select class Reader:
def is_Keyboard(self, device):
device_key_list = device.capabilities()[ecodes.EV_KEY]
if self.mandatory_keys.issubset(device_key_list) and self.reserved_key.isdisjoint(device_key_list):
return True
else:
return False
def __init__(self):
path = os.path.dirname(os.path.realpath(__file__))
self.keys = "X^1234567890XXXXqwertzuiopXXXXasdfghjklXXXXXyxcvbnmXXXXXXXXXXXXXXXXXXXXXXX"
self.mandatory_keys = {i for i in range(ecodes.KEY_ESC, ecodes.KEY_D)}
self.reserved_key = {0}
if not os.path.isfile(path + '/deviceName.txt'):
sys.exit('Please run RegisterDevice.py first')
else:
with open(path + '/deviceName.txt','r') as f:
deviceName = f.read()
devices = [InputDevice(fn) for fn in list_devices()]
for device in devices:
if device.name == deviceName and self.is_Keyboard(device):
self.dev = device
break
try:
self.dev
except:
sys.exit('Could not find the device %s\n. Make sure is connected' % deviceName)
def readCard(self):
stri=''
key = ''
while key != 'KEY_ENTER':
r,w,x = select([self.dev], [], [])
for event in self.dev.read():
if event.type==1 and event.value==1:
stri+=self.keys[ event.code ]
#print( keys[ event.code ] )
key = ecodes.KEY[ event.code ]
return stri[:-1] `
@Bauzi1984: Das letzte return gehört zu der Methode readCard, es muss also soweit eingerückt werden wie das letze while, also:
def readCard(self):
stri=''
key = ''
while key != 'KEY_ENTER':
r,w,x = select([self.dev], [], [])
for event in self.dev.read():
if event.type==1 and event.value==1:
stri+=self.keys[ event.code ]
#print( keys[ event.code ] )
key = ecodes.KEY[ event.code ]
return stri[:-1]
Ich hoffe das ist es :-). Sonst suchen wir weiter.
Super, Danke!!! jetzt hat er unter shortcuts eine Datei mit der KartenID angelegt. Audiofolders ist zwar noch ohne Ordner, aber da versuch ich jetzt erstmal weiter :)
Freut mich!
Hi :-)
This is such a cool project! I really appreciate all the work that went into it. In addition also the documentation is great! I just installed the phoniebox on my Raspi Zero W (headless) + Hifiberry mini AMP Everything works, except the RFID part. Unfortunately, it turns out that the recommended RFID reader (Neuftech) does not work for me (It keeps being disabled in the web interface) (https://www.amazon.de/gp/product/B018OYOR3E/ref=oh_aui_detailpage_o01_s03?ie=UTF8&psc=1) I only have one device connected and RegisterDevice.py would thus only show one entry: 0 HXGCoLtd After registration this entry also shows up in deviceNames.txt: HXGCoLtd
Any ideas what I could do to fix this?
Many thanks!
Andreas
Hi @aschindler82,
I do not have the Neuftech reader but maybe we can trace the problem. Can you find out if the constructor of the Reader.py will find a valid device. If so the following allocation in the if statement should be executed:
for device in devices:
if device.name == deviceName:
self.dev = device
break
If not, can you list which devices are found (device.name)?
Christoph
@cgnmause: thanks for your help! When I import evdev and run list_devices() on the command line I get one device: ['/dev/input/event0']
I would guess I also could insert a print(device.name) command in the constructor of the Reader class. However, I am not sure what params I would need to create an instance of the class ...
Does this help already?
@aschindler82 just to gather more insights...can you insert the print(device.name)
@aschindler82 I assume you speak german. Check this link: https://forum-raspberrypi.de/attachment/14607-anleitung-jukebox-kinder-jessy-pdf/
You seem to have a similar set up. The interesting point is that the device is being listed as HXGCoLtd HIDKeys
@cgnmause thanks for the link! :-) In fact, I did some further research. Actually, I think the reader is working. At least if I instantiate the Reader class from the command line and run the readCard method I get an ID when I swipe over it:
from Reader import Reader
r = Reader() r.readCard() '0000244258' r.readCard() '0000244258' r.readCard() '0000392604'
However, the device still is disabled in the web interface. It seems that the script cannot be called via the webserver or so ...
EDIT: It seems that I am missing a few services:
** /etc/systemd/system/phoniebox ls: cannot access '/etc/systemd/system/phoniebox-rfid-reader.service': No such file or directory ls: cannot access '/etc/systemd/system/phoniebox-startup-sound.service': No such file or directory ls: cannot access '/etc/systemd/system/phoniebox-gpio-buttons.service': No such file or directory ls: cannot access '/etc/systemd/system/phoniebox-idle-watchdog.service': No such file or directory
Does anyone know how I can install them? Did I miss sth during the installation?
Best
Andreas
@aschindler82:
I am sorry for not answering but I was kind of busy today.
I will have a look at the code tomorrow and try to find out what I did.
But are you sure that the output you see is not coming from the reader itself? As for my reader it is registered as a "keyboard" and writes the scanned ids to the console if one is open.
Or have you added a print in the Reader.py?
Gesendet: Freitag, 21. Dezember 2018 um 11:14 Uhr
Von: aschindler82 notifications@github.com An: MiczFlor/RPi-Jukebox-RFID RPi-Jukebox-RFID@noreply.github.com Cc: cgnmause c.mause@web.de, Mention mention@noreply.github.com Betreff: Re: [MiczFlor/RPi-Jukebox-RFID] RFID Reader funktioniert nicht (#231)
@cgnmause thanks for the link! :-) In fact, I did some further research. Actually, I think the reader is working. At least if I instantiate the Reader class from the command line and run the readCard method I gett an ID when I swipe over it:
from Reader import Reader
r = Reader() r.readCard() '0000244258' r.readCard() '0000244258' r.readCard() '0000392604'
However, the device still is disabled in the web interface. It seems that the script cannot be called via the webserver or so ...
Best
Andreas
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Bei mir hat es nun auch mit der https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/6e7ec83c52b1470aa40d6ac1e66c0e472bf1b153/scripts/Reader.py funktioniert
@Bauzi1984 : Nee. schau mal hier: https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/327/files bzw. hier: https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/6e7ec83c52b1470aa40d6ac1e66c0e472bf1b153/scripts/Reader.py
Ich hoffe das hilft.
@cgnmause : Mir hat's geholfen. Vielen Dank dafür!! (Habe auch folgenden RFID-Reader: https://www.amazon.de/gp/product/B011XI2DE8/ref=oh_aui_detailpage_o01_s01?ie=UTF8&psc=1)
Gerne. Bin froh, dass der Reader funktioniert.
Gesendet: Samstag, 22. Dezember 2018 um 18:22 Uhr Von: Zapatito notifications@github.com An: MiczFlor/RPi-Jukebox-RFID RPi-Jukebox-RFID@noreply.github.com Cc: cgnmause c.mause@web.de, Mention mention@noreply.github.com Betreff: Re: [MiczFlor/RPi-Jukebox-RFID] RFID Reader funktioniert nicht (#231)
@Bauzi1984 : Nee. schau mal hier: https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/327/files bzw. hier: https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/6e7ec83c52b1470aa40d6ac1e66c0e472bf1b153/scripts/Reader.py
Ich hoffe das hilft.
@cgnmause : Mir hat's geholfen. Vielen Dank dafür!! (Habe auch folgenden RFID-Reader: https://www.amazon.de/gp/product/B011XI2DE8/ref=oh_aui_detailpage_o01_s01?ie=UTF8&psc=1)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Hallo Liebe Freunde
ich habe mich ebenfalls dazu entschlossen eine Phoniebox für meine Kinder zu bauen und damit komme ich zu folgenen Problemen:
Ich habe eine Raspberry Pi 3 B+
USB Reader EM4100 sowie die richtigen Karten
Ich besitze den USB EM4100 Card Reader dieser wird im Terminal von Raspbian 100 % erkannt und die Nummer auf dem Terminal wiedergegeben jedoch nicht auf der Webapp der Phoniebox.
Dort ist der Reader immer "Disable" und wenn ich Ihn aktiviere ist er nur bis zum nächsten Laden "Enable"
Ich finde den Fehler einfach nicht.
auch kann auch die hochgeladene Musik nicht über meine die Bluetooth Box hören.
Vielleicht kann mir jemand weiterhelfen?
Beste Grüße
Update bei der Installation mit dieser Fehlermeldung:
If you are using an USB RFID reader, connect it to your RPi.
(In case your RFID reader required soldering, consult the manual.)
Have you connected your USB Reader? [Y/n] Y
Traceback (most recent call last):
File "RegisterDevice.py", line 4, in
from Reader import get_devices
File "/home/pi/RPi-Jukebox-RFID/scripts/Reader.py", line 32
def init(self):
^
IndentationError: unexpected indent
chown: Zugriff auf '/home/pi/RPi-Jukebox-RFID/scripts/deviceName.txt' nicht möglich: Datei oder Verzeichnis nicht gefunden
chmod: Zugriff auf '/home/pi/RPi-Jukebox-RFID/scripts/deviceName.txt' nicht möglich: Datei oder Verzeichnis nicht gefunden
Update:
nachdem ich jetzt händisch die deviceName.txtx angelegt hatte bei der Installation habe ich diesen Fehler:
File "/home/pi/RPi-Jukebox-RFID/scripts/Reader.py", line 32
def init(self):
ich weiß wirklich nicht mehr weiter. Es wird kein USB Reader eingetragen.
Hi @Ghostsl84 Probiere bitte noch mal die aktuellste Version des "one line install" scripts. (Machst du mit oder ohne Spotify?). In der letzten Version mit einigen Änderungen hatte sich ein Fehler eingeschlichen, den ich erst gestern behoben habe (so weit ich das testen konnte): https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/412
Guten Abend,
Vielen vielen vielen Dank. Jetzt klappt alles wunderbar und es wird alles erkannt. Habe jetzt nur noch das Problem, dass ich die Musik über Bluetooth nicht abspielen kann und ich ebenfalls nicht weiß warum.
Besten Dank Ghostsl84
@cgnmause Sorry for the late reply. I didn't have my laptop with me over christmas. Indeed, it's working now! My problem was that I installed the phoniebox software manually without using the installer script. This way I somehow missed the step of installing the phoniebox service daemons. After having taken care of that it runs like a charm!
Thanks for your help!
Best
Andreas
Hallo, wirklich ein tolles Projekt und genau das, nach dem ich gesucht habe! Leider habe ich immer noch Probleme meinen RFID-Reader zu verbinden.
Installiere ich die aktuelle Version (29.12) des Online Installers mit Spotify habe ich auch das Problem, dass mir der Reader zwei mal als "HID 413d:2107" angezeigt wird. In der Web App wird der Reader als aktiv angezeigt.
Ersetze ich jetzt die Datei Reader.py mit Reader.py.kkmoonRFIDreader ändert sich nichts bis darauf, dass der Reader in der Web App immer als nicht aktiv angezeigt wird. Eingetragen wird der Reader immer als "HID 413d:2107". Das ist mein erstes Projekt mit dem Raspberry Pi und daher kenne ich mich noch nicht besonders gut aus. Hoffe hier gibt es auch noch eine Lösung.
Auf der Internetseite
https://www.iphone-ticker.de/wochenend-projekt-kontaktlose-musikbox-fuer-kinder-123063/
ist auch immer noch der KKmoon RFID-Reader verlinkt. Vielleicht könnte man hier einen Hinweis geben, um den Link zu ändern.
Grüße, Serjoscha
Hi @Ghostsl84 Probiere bitte noch mal die aktuellste Version des "one line install" scripts. (Machst du mit oder ohne Spotify?). In der letzten Version mit einigen Änderungen hatte sich ein Fehler eingeschlichen, den ich erst gestern behoben habe (so weit ich das testen konnte):
412
Hi all, hi @MiczFlor
I had the same issues like @cgnmause, @aschindler82, @Ghostsl84, etc.
The KKmoon IC Kartenlesegerät with the double entry
2 HID 413d:2107 3 HID 413d:2107
My system infos:
**System**
OS Distribution Raspbian
Description Raspbian GNU/Linux 9.6 (stretch)
Release 9.6
Codename stretch
**Phoniebox Setup**
Version 1.1.9-rc4
Edition Classic edition (barebones)
Just before Christmas I had a working system with the reader and through the workaround of commenting out the "break" in the Reader.py-file. Then suddenly I could not get any reader input in the app/web interface any more.
I tried updating the jukebox and now also reinstalling (via "one line install" script) the whole system, but I can't get the readers input into the Jukebox-WebUI any more. It beeps and I do get the input on the local terminal though.
Does anyone have any input/idea? Or do I really have to switch to the Neuftech-Reader?
Re-installing Phoniebox with the bash install script "bash install script" solved the problem for me. Before I had the same problem as described by many here. My RFID reader is https://www.amazon.it/gp/product/B018OYOR3E/ref=ppx_yo_dt_b_asin_title_o00__o00_s00?ie=UTF8&psc=1
Hi,
super Projekt von dir, bin begeistert.
Habe jedoch das Problem, dass der USB RFID Reader bei mir keine ID's an die Webapp weitergibt. Im Terminal zeigt er beim Scannen die zugehörige Nummer an, die WebApp reagiert allerdings nicht.
Beim Registrieren mit RegisterDevice.py zeigt er mir den Reader auch immer doppelt an.
Choose the reader from list 0 kpd 1 kpd 2 Logitech Keyboard 3 Logitech USB-PS/2 Optical Mouse
Viele Grüße Florian