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
HI @flo2305
so gerne ich könnte, leider kann ich dir nicht wirklich helfen, was die Hardware angeht.
Eine Sache solltest du aber nachschauen: in der web app unter "Settings" kann man unten auf der Seite den RFID Reader an bzw. ausschalten (genauer gesagt den systemd dazu). Ist da der Reader "ON"?
Hi, ich hab das gleiche Problem. Der RFID Reader ist in der Webapp eingeschaltet und wenn ich eine Karte registrieren will, wird die Nummer nur im Terminal angezeigt aber nicht in der Webapp.
Eingeschaltet ist er in der WebApp.
Wenn ich den Befehl
./rfid_trigger_play.sh -i=
eingebe und dann die Karte scanne funktioniert alles.
Aber das ganze sollte ja von allein funktionieren sobald ich einfach nur die Karte scanne.
Hi @flo2305 @mensch-meier
kann sein, dass sich mit dem letzten merge ein Fehler eingeschlichen hat. Deshalb habe ich meinen develop branch mit master gemerged. Versucht bitte mal, ob ein git pull das Problem behebt.
https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/233
Hi @MiczFlor,
ok, dass versuche ich.
Bin leider noch nicht so tief im Thema, wie würde der git pull Befehl komplett aussehen?
Geh ins Terminal und gib das auf der Kommandozeile ein.
~
cd /home/pi/RPi-Jukebox-RFID
git checkout master
git fetch origin
git reset --hard origin/master
git pull
sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/shared
sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/shared
sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/htdocs
sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/htdocs
sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/settings
sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/settings
~
Hallo bei mir dasselbe Problem, der pull hat nichts gebracht (Bereits aktuell).
ls -la /dev/input/by-id/

es ist nur der Reader angeschlossen (welcher auch fleissig piept wenn ein chip in die nähe kommt)
python2 RegisterDevice.py

Egal ob 0 oder 1 steht in deviceName.txt
HID 413d:2107
passt das hier?
Was passiert, wenn man manuell kpd in das File deviceName.txt schreibt?
(Was ist das denn für ein Reader, habt ihr dafür einen Link?)
Den Reader habe ich von einer Einkaufsliste bei Amazon bestellt (https://www.amazon.de/gp/product/B011XI2DE8)
kpd scheint keine Änderung zu bewirken. Ich finde unter /dev/ auch kein ttyUSB sondern nur ein uhid.

lsusb sagt auch nichts:

und dmesg gibt mir nur das:

Gibt es eine Möglichkeit die Eingabe des Readers direkt ins Terminal zu schreiben?
mit ./rfid_trigger_play.sh -i= erhalte ich einen Fehler ( Zeile 277: [: Zu viele Argumente.)
Bisher konnte ich den Reader nur unter Windows testen da geht er.
Also ich habe den verlinkten RFID Reader von Amazon erworben, damit kein Erfolg.
Pull war bei mir auch erfolglos.
Allerdings funktioniert es bei mir jetzt mit einem anderen Reader, einer mit 13,56 MHz.
Somit aber leider auch die bereits erworbenen 125 kHz Karten nutzlos...
Ich hatte für die Phoniebox jeweils bereits die Schritt für Schritt-Installation gemacht und später das automatische Skript gestartet. Bei der manuellen Installation hat der Reader noch IDs der Karten im Terminal angezegit, bei der automatischen Installation werden nun nicht mehr die IDs angezegit, wenn ich die Karte an den Reader halte.
Hi. Super Projekt!
Habe hier leider ein ähnliches Problem. Installation und Setup alles i.o. Weboberfläche läuft ebenfalls und Musik ist zu hören :) Es hapert an der Übernahme der RFID-Eingabe. Im Terminal sehe ich die Nummer des RFID-Tags. Wie bei kris711 macht auch die Wahl des Eingabegeräts keinen Unterschied. Vielleicht hilft es noch zu erwähnen das die Datei "_latestID.txt_", bzw. "settings/Latest_RFID" nicht geschrieben wird.
Ich habe gerade von @keinkurt einen pull request in den develop branch gemerged:
https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/235
wer sich mit git genug auskennt, das mal durchzutesten, den/die würde ich gerne dazu einladen das zu tun.
Und wegen der Hardware, habt ihr alle den Reader gekauft, der von der README.md Seite verlinkt ist? KKmoon IC Kartenlesegerät Berührungslose 14443A Kartenleser Card Reader mit USB Schnittstelle 5pcs Karten + 5pcs Schlüsselanhänger 13.56MHZ RFID Energieklasse A. Vielleicht hat sich da die Hardware geändert, seit ich das verlinkt habe. Hat jemand einen anderen Link zu einem Reader der geht?
Ich benutze diesen Reader ohne Probleme
https://www.amazon.de/gp/product/B018OYOR3E/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
MfG
Alarius
Ich hatte zuerst auch den aus der README.md, hat bekanntlich nicht funktionieren.
Dieser hier läuft problemlos:
Neuftech USB RFID Reader ID Kartenlesegerät Kartenleser Kontaktlos Card Reader für EM4100 https://www.amazon.de/dp/B018OYOR3E/ref=cm_sw_r_cp_api_G3qTBb7JRYHMV
OK dann versuchen wir es nochmal mit einem anderen Reader! Falls das Problem damit behoben wird könnte man ja den link vielleicht in den Manuals ändern :)
Ich habe den Link im README file geändert. Denkt ihr das ist ok so?
RFID Card Reader (USB): Neuftech USB RFID Reader ID Kartenlesegerät Important notice: the hardware of the reader that I had linked here for a long times seems to have changed and suddenly created problems with the Phoniebox installation. The reader listed now has worked and was recommended by two Phoniebox makers (2018 Oct 4). I can not guarantee that this will not change and invite you to give RFID Reader feedback in this thread.
Ich würde eventuell noch auf die genutzte Frequenz von 125 kHz hinweisen.
Karten vom anderen Reader (13,56 Mhz) sind nicht kompatibel.
Ich hatte im Vorfeld bereits 100 Karten bestellt... Leider jetzt nicht mehr nutzbar.
Halluuu,
das mit den CArdreadern scheint ja shcon ein Thema für sich..
ich habe mir den https://www.amazon.de/gp/product/B011XI2DE8/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=1638&creative=6742&creativeASIN=B011XI2DE8&linkCode=as2&tag=diebarnfeld-21 gekauft und habe den selben fehler wie alle hier im Board.
Habe aber auf den Fotos bei amazon gesehen, dass man hinten auf der Platine etwas umstellen kann, ich berichte wenn ich hier erfolge erziele....
wenn jemand hier mehr plan hat :), höre ich auch gerne zu ^^
+Update: reader beept, also erkennt er die karte, nur überträgt er wohl nicht....
grützi
Christian
@flo2305 Als was wird das Gerät bei Dir erkannt? Ich habe mir das Ding auch mal bestellt. leider ähnlich schlechtes Ergebnis:

In der deviceName.txt steht nun das (gibt nur nuch 0 als Auswahl):

@MiczFlor Ja bin auf #235 - kein Unterschied
Bei mir wird das neue Gerät erkannt und es hat sofort funktioniert.
Bei mir leider nicht -.-
@flo2305 Kannst Du mir den Inhalt der deviceName.txt nennen?
Du findest die Datei hier: /home/pi/RPi-Jukebox-RFID/scripts/
File: deviceName.txt
HXGCoLtd HIDKeys
Hab auch den https://www.amazon.de/gp/product/B011XI2DE8/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=1638&creative=6742&creativeASIN=B011XI2DE8&linkCode=as2&tag=diebarnfeld-21 gekauft.bei mir funktioniert es aber nur sporadisch ohne das ich nachvollziehen kann wieso, meist nach mehrmaligem Umstecken.
Hab den Reader auseinander genommen und auf der Platine steht eine Anleitung geschrieben.man soll am PC ein schreibprogramm öffnen und dann das Lesegerät 2mal für ne Sekunde anstecken.beim 3ten Mal Pieps 3mal und im schreibprogramm läuft die Sequenz mit verschiedenen Einstellungen...hilft aber auch nicht...
Hi all, Hallo an alle hier im Thread,
I merged the following stuff to master: #240
There is a new way now loading the RFID reader device if and when a card is used. I could only test it on my USB reader(s) and it works. Please update to the latest version, see here for details: upgrade
AND PLEASE: check in the web app under "Settings" at the bottom of the page, if you reader is switched on.
(ich übersetze das jetzt nicht, wir können aber gerne weiter auch in Deutsch hier posten)
Please tell me if this works for you and then also post
Hi @MiczFlor,
leider kein Erfolg. Zunächst Deine Fragen:
Was mir bei der #240 auffällt:

Um Probleme auszschliessen habe ich meinen Pi frisch aufgesetzt - diesmal die full Version.
Ausser RPi-Jukebox-RFID habe ich nichts weiter installiert.
In der grafischen Oberfläche funktionieren die Reader:

Kann ich irgendwas tun, um dir beim debuggen zu helfen?
Vielleicht hilfreich.... error.log vom Webserver:

Die Dateien Latest_Folder_Played und latestID.txt waren auch ewig oft drin, da sie nicht vorhanden waren. Habe Sie nun manuell angelegt und damit zumindest weniger Fehler im Log.
Ich habe seit heute das gleiche Problem. Das System wurde ebenfalls komplett neu aufgesetzt.


So I updated (git pull with additional commands seen in README.md) my test-SD from 1.0.0 where everything worked great to 1.1.4 and now the RFID-reader always seems to unregister (to be seen in settings - it switches to OFF after some seconds) and it really doesn't work anymore.
So it seems it's not the hardware, so I would suggest not just to buy new readers, but perhaps revert to and older master version on git. Perhaps Micz could guide to a git command to a perhaps working version. I'll just put in my kids SD on 1.0.0 to verify the reader is not the problem, will report back.
[Update] Also was zu erwarten war, die 1.0.0. geht wunderbar mit dem Neuftech Reader (siehe den von @black-dahila oder @kris711 und anderen hier) . Dies nur als Hinweis für alle die einen git rollback hinbekommen.
Das komische ist, dass gestern noch alles einwandfrei funktioniert hat (komplette Neuinstallation). Wenn ich das richtig sehe, würde seitdem aber kaum was geändert.
HI @black-dahila @gizmo21
was sich verändert hat ist nicht unwesentlich und hat genau mit den RFID Lesegeräten zu tun. Allerdings gab es die Probleme schon vorher. Aber ich denke mit dem letzten merge ist was aus dem Ruder geraten: https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/240
Wie gesagt, davor gab es auch schon Probleme, da hatte sich aber ewig nichts am Reader code geändert.
Ich überleg mal, wie man das am besten wieder auf einen stabilen Stand bringen kann UND die Neuerungen besser testen kann UND diese dann leicht auf die laufenden Geräte einspielen kann.
Hi @MiczFlor
Erstmal danke für Mühe und die schnelle Antwort. Das ist echt ein Super Projekt.
Ich habe die Änderungen, die mit dem RFID-Reader zu hat, jetzt auch entdeckt. Die habe ich vorhin wohl übersehen.
Ich benutze übrigens den neu-verlinkten Reader und bis jetzt hatte ich da nie Probleme mit.
Schönen Sonntag noch.
I will write this in English, so everybody who managed to read through the documentation can also get this. And I assume the partly German discussion will also understand the following:
In order to step back a few commits to a time where the reader did (or might have) worked, please do the following.
https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/231#issuecomment-428241167
NOTE: do this if you are sure that your setup did work once and does not work anymore. Only then. There have been reports that some more recently purchased readers don't work. The RFID reader linked on the front page has been reported to work.
The revert process here is constructed in a way that you can jump ahead again, if and when this problem is fixed.
So, enough talking, if you want to revert to an older code base, this has worked on my test Phoniebox.
Firstly, jump back to the tag v1.1.3 (if you want to go back even further, you can try other tags, listed here).
NOTE Actually, this is old, I keep it here as learning material, Don't jump back to 1.1.3 but ahead to 1.1.6
https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/231#issuecomment-428241167
git reset --hard "v1.1.3"
git checkout master
Now you can register the device by typing the following:
~
cd /home/pi/RPi-Jukebox-RFID/scripts/
rm /home/pi/RPi-Jukebox-RFID/scripts/deviceName.txt
python2 RegisterDevice.py
~
And see the results:
~
cat /home/pi/RPi-Jukebox-RFID/scripts/deviceName.txt
~
Now, let's make sure the correct daemon is installed and running:
~
sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/rfid-reader.service.stretch-default.sample /etc/systemd/system/rfid-reader.service
sudo chown root:root /etc/systemd/system/rfid-reader.service
sudo chmod 644 /etc/systemd/system/rfid-reader.service
sudo systemctl enable rfid-reader
~
And please reboot to be sure.
~
sudo reboot
~
Now see if the rfid-reader daemon is running. Firstly, go to the web app and check at the bottom of the page. Secondly, in the terminal you can type:
~
sudo systemctl status rfid-reader.service
~
Which should return something like this:
~
● rfid-reader.service - RFID-Reader Service
Loaded: loaded (/etc/systemd/system/rfid-reader.service; enabled; vendor pres
Active: active (running) since Sun 2018-10-07 17:32:18 UTC; 46min ago
Main PID: 399 (python2)
CGroup: /system.slice/rfid-reader.service
└─399 /usr/bin/python2 /home/pi/RPi-Jukebox-RFID/scripts/daemon_rfid_
~
Just for you to know, you don't need to do this now. Live and learn: you can stop and start the Phoniebox rfid-reader daemon by typing the following:
~
sudo systemctl stop rfid-reader.service
sudo systemctl start rfid-reader.service
~
Now the big test. Swipe a card and then see if it was noticed by the Phoniebox by typing (after the swipe):
~
cat /home/pi/RPi-Jukebox-RFID/shared/latestID.txt
~
Which should return something like this:
~
Card ID '0007698255' was used at '2018-10-07.18:22:00'.
This ID was used for the first time.
The shortcut points to audiofolder '0007698255'.
~
If this is the case, the card reader works, is recognized AND pipes the ID to the Phoniebox script(s).
Having reverted to an older version might mean that some stuff is not as luxurious or even a bit buggy. But at least you don't have the big bug that brought us all to this thread.
Yeehawww - ok I ignored your tipp not do go back if my setup never worked before - but I switched to 1.0.0 and it works for the first time now.
Afterwards switched to 1.1.3 and it keeps working fine.
Hi everybody,
to put an end to the RFID reader registration problem, I did something I am not proud of :) I reverted part of the code to the older python script for registration. But because other stuff had progressed, I did not want to keep this out. So there is now the 1.1.6 release that should work just like the 1.1.3 revert that I proposed a bit earlier here.
If somebody has a box in the making and would be happy to reinstall using the one line script, please do so - and tell us if it still works. If it does, I will close this thread - and if need be we start another.
You can also update a running version of the Phoniebox with the commands listed here:
https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/master/docs/UPGRADE.md#upgrade-from-version-111-to-116
Are the commands for 1.1.4 to 1.1.6 the same as 1.1.1 to 1.1.6 mentioned above, or just a simple pull or ontop even special treatment for the readers-config?
The commands from 1.1.1 to 1.1.6.
It‘s important to replace the rfid systemd script. A simple git pull doesn‘t cut that cake :)
went back to v. 1.1.3 or any other version,
tried to register rfid reader
now with that output..
cd /home/pi/RPi-Jukebox-RFID/scripts/
rm /home/pi/RPi-Jukebox-RFID/scripts/deviceName.txt
python2 RegisterDevice.py
pi@raspberrypi:~/RPi-Jukebox-RFID/scripts $ python2 RegisterDevice.py
Traceback (most recent call last):
File "RegisterDevice.py", line 4, in
from evdev import InputDevice, list_devices
ImportError: No module named evdev
@mariposastern
please try this:
~
cd /home/pi/RPi-Jukebox-RFID
git checkout master
git fetch origin
git reset --hard origin/master
git pull
sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/shared
sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/shared
sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/htdocs
sudo chmod -R 775 /home/pi/RPi-Jukebox-RFID/htdocs
sudo chown -R pi:www-data /home/pi/RPi-Jukebox-RFID/settings
sudo chmod -R 777 /home/pi/RPi-Jukebox-RFID/settings
sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/rfid-reader.service.stretch-default.sample /etc/systemd/system/rfid-reader.service
sudo chown root:root /etc/systemd/system/rfid-reader.service
sudo chmod 644 /etc/systemd/system/rfid-reader.service
sudo systemctl enable rfid-reader
~
pi@raspberrypi:~/RPi-Jukebox-RFID/scripts $ python2 RegisterDevice.py
Traceback (most recent call last):
File "RegisterDevice.py", line 4, in
from evdev import InputDevice, list_devices
ImportError: No module named evdev
same results. if you need anything else?
raspi 1,
clean raspbian installation
used 1 line install script
Gruß
Christian =D
Hi
Ich habe leider gerade diese Woche den 13.56er Leser gekauft aus deinem Link.
Bei mir wird auch nur HID 413d:2107 aufgeführt.
Habe verschiedene Pis und Installationen getestet. Auch das aus dem vorletzten Post.
Leider ohne Erfolg.
Grüsse
Manuel
Hi @pgx3d
welche Version läuft bei dir? Das steht im File settings/version.
Versuch auch bitte mal diesen Schritt:
https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/231#issuecomment-428241167
Hi @mariposastern
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.
Hi @MiczFlor
Ich habe #231 probiert und auch nochmals alles gelöscht und neu installiert.
Version 1.1.6 mit Pi3.
Leider immer noch das gleiche Problem.
Ich würde ja einen 125 KHz Reader kaufen, aber da ich möchte gerne die von der Migros (CH) angebotenen Storybox-Figuren weiter verwenden.
(Danke für deine Bemühungen und dem tollen Projekt!)
Hi @all,
Neuftech reader works fine,
reader HID 413d:2107 seems to have a hardware problem (mine is a M301 V4 - SODIAL 13.56mhz reader!).
Check with linux command "cat < /dev/hidraw0" what the readers are sending.
kr
j
Hi @jonach66
my output is '#! &" $(
Hi @pgx3d,
IMHO this is exactly the problem, a proper reader should send nice numbers to the keyboard input. My conclusion is, that this is a hardware, not a software problem.
I think you have 2 options:
Remark: my HID 413d:2107 (hardware Version M301 - V4 - no DIP switches) works ok on a windows machine, not on linux at all (tried on 3 different linux systems)
kr
j
hi @jonach66
The funny thing is that mine worked on the linux desktop without a fault.
I have to look for a Neuftech with 13.56 MHz.
Thx for the infos.
BR
Manuel
Hi @jonach66 @pgx3d
my hunch is that the reader does work, the output is read ok by the operating system when trying it - the way the numbers show up in the terminal when you swipe. Phoniebox requires this output to be kind of routed through the software evdev https://python-evdev.readthedocs.io/en/latest/ so that the output of the reader is not simply "typed" in, but routed to the Phoniebox daemon that is waiting for input from the reader. And somewhere in this process, there is an incompatibility.
So who is to blame :) ??? One might say the reader developers, because they seem to somehow not live up to the standards that other reader provide. Or, I don't know, the evdev developers for not accounting for new standards that might have come along. Or Phoniebox for not providing a good list for compatible hardware (my link went out of date, I didn't keep buying and checking, of course) or Phoniebox for not finding a software other than evdev to make that connection.
The answer is, of course, it's a bit of everything. And that is part of the tinkering we do here in the Phoniebox open source world. The most I do learn in projects like this is trying to understand and fix errors - that I didn't see coming.
What I mean to say: it's unfortunate but part of the process. There are no guarantees, there is only expericence and life long learning :)
Hi @pgx3d,
just to be clear, I have the Neuftech 125khz reader up an running!
Which evdev version installed?
Hi @MiczFlor,
evdev is a good hint, maybe an older evdev version could do the job for the HID 413d:2107!? Will check over the weekend...
You are right, maybe I was to fast to blame the hardware!
kr
j
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
from evdev import InputDevice, list_devices
ImportError: No module named evdev
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
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
from evdev import InputDevice, list_devices
ImportError: No module named evdev
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
1245 ? 00:00:00 gvfs-afc-volume
1260 ? 00:00:00 gvfs-goa-volume
1298 ? 00:00:00 gvfsd-trash
1362 ? 00:00:00 sshd
1372 ? 00:00:00 sshd
1375 pts/0 00:00:00 bash
1394 pts/0 00:00:00 ps
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
from Reader import Reader
File "/home/pi/RPi-Jukebox-RFID/scripts/Reader.py", line 50
return stri[:-1]
SyntaxError: 'return' outside function
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.pyIch 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
Hello,
I recently bought the NEUFTECH RFID USB Reader over Amazon https://www.amazon.de/gp/product/B018OYOR3E/
Using RegisterDevice.py and checking the deviceNames.txt I can see the device called "HXGCoLtd" and not "HXGCoLtd HIDKeys".
This difference was also mentioned by @aschindler82 bevore. Don't know if this difference is important.
I installed the phoniebox on a RPi 2 using the one line install script without spotify and Raspbian 2018-03-13-raspbian-stretch.
The reader does work when I want to teach a new card using the web interface - but if I swipe the card over the reader, then the reader makes a sound but the phoniebox does not start to play. I can see the correct id of the card in the terminal window when I swipe the card.
I already checked the phoniebox-rfid-reader.service. It is installed, loaded and active.
Does anybody have an idea how to get the rfid reader working?
I also checked the state of the rfid read in the web app - it is enabled. And (like i said bevore) I was able to teach new rfid cards
I reinstalled the phoniebox from scratch yesterday. Now the reader works perfectls.
I did not find out the root cause....
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?
I switched to the Neuftech-Reader.
Thank you c-m0s! I have the KKMoon, too. And it started working through the WebApp after I commented out "break" in /home/pi/RPi-Jukebox-RFID/scripts/Reader.py, re-registered with "python2 RegisterDevice.py" and rebooted. The device name in deviceName.txt remained the same: "HID 413d:2107"
Anyway - I will give a fresh install a try soon with "one line install".
Thanks MiczFlor, this is a great project!
@TomBourine , can i ask for your help. i'm struggling with a kkmoon Reader.
when i use Reader.kkmoon.py ( rename as Reader.py) and reboot, the RFID reader service do not start...
Mar 14 15:08:33 raspberrypi systemd[1]: phoniebox-rfid-reader.service: Failed with result 'exit-code'.
Mar 14 15:08:33 raspberrypi systemd[1]: phoniebox-rfid-reader.service: Service hold-off time over, scheduling restart.
Mar 14 15:08:33 raspberrypi systemd[1]: Stopped Phoniebox RFID-Reader Service.
Mar 14 15:08:33 raspberrypi systemd[1]: phoniebox-rfid-reader.service: Start request repeated too quickly.
Mar 14 15:08:33 raspberrypi systemd[1]: Failed to start Phoniebox RFID-Reader Service.
Mar 14 15:08:33 raspberrypi systemd[1]: phoniebox-rfid-reader.service: Unit entered failed state.
Mar 14 15:08:33 raspberrypi systemd[1]: phoniebox-rfid-reader.service: Failed with result 'exit-code'.
python daemon_rfid_reader.py
/home/pi/RPi-Jukebox-RFID/scripts
Traceback (most recent call last):
File "daemon_rfid_reader.py", line 16, in
cardid = reader.reader.readCard()
AttributeError: Reader instance has no attribute 'reader'
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 :)
did you get it working with kkmoon reader ?
i got it working modifying the original Reader.py
i have a kkmoon REader. the one that show 2 devices with the same VID/PID when you launch RegisterDevice.py
using the Reader.kkmoon.py gave me an error and the Rfid service does not launch.
i modified the original Reader.py
devices = get_devices()
for device in devices:
#if device.name == deviceName:
#i only have one usb device connecter ( the reader )
device=InputDevice("/dev/input/event0")
self.dev = device
# break
try:
self.dev
Hallo
Ich benutze ebenfalls den Kartenleser der 2 Devices ausgibt.
https://www.amazon.de/dp/B011XI2DE8
Gibt es hierzu bereits eine Lösung?
Ich habe schon diverses getestet aber leider war alles erfolglos.
Umsteigen würde ich nur ungern, da ich die Karten noch an einem Arduino weiterhin nutzen möchte.
hola desevent 7.
yep, i found a solution ( sorry to switch in english but easier for me )
As i wrote before, you have to modify the file : Reader.py
instead of letting the program look for the device, we are going to force
the device with this : device=InputDevice("/dev/input/event0")
i use event0 because it's what i got from the ommand line : ls -la
/dev/input/by-id/
if ou have several usb devices plugged in, your eventX might be event1 or 2.
devices = get_devices()
for device in devices:
and try to modify it this way :
device=InputDevice("/dev/input/event0")
self.dev = device
try:
be careful of putting 0,1 or 2 depending on the result of " ls -la
/dev/input/by-id/"
SAVE
REBOOT
ENJOY
Le ven. 19 avr. 2019 à 17:35, desevent7 notifications@github.com a écrit :
Hallo
Ich benutze ebenfalls den Kartenleser der 2 Devices ausgibt.
https://www.amazon.de/dp/B011XI2DE8
Gibt es hierzu bereits eine Lösung?
Ich habe schon diverses getestet aber leider war alles erfolglos.
Umsteigen würde ich nur ungern, da ich die Karten noch an einem Arduino
weiterhin nutzen möchte.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/231#issuecomment-484933728,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALSPV7QGLJ6ENIPV3FBSXATPRHRFRANCNFSM4FYHSG5Q
.
--
Pura Vida
Hi
Thanks for your help, but i dont know which part i excactly must write
Can you sent/attach the hole Reader.py.
my device ist device0
here the file Reader.py
use WinScP to transfer the file to Script folder
Le sam. 20 avr. 2019 à 18:09, desevent7 notifications@github.com a écrit :
Hi
Thanks for your help, but i dont know which part i excactly must write
Can you sent/attach the hole Reader.py.
my device ist device0—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/231#issuecomment-485139101,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALSPV7RDLWVEWW4C5UFOCGDPRM54ZANCNFSM4FYHSG5Q
.
--
Pura Vida
import string
import os.path
import sys
from evdev import InputDevice, categorize, ecodes, list_devices
from select import select
def get_devices():
return [InputDevice(fn) for fn in list_devices()]
class Reader:
reader = None
def __init__(self):
self.reader = self
path = os.path.dirname(os.path.realpath(__file__))
self.keys = "X^1234567890XXXXqwertzuiopXXXXasdfghjklXXXXXyxcvbnmXXXXXXXXXXXXXXXXXXXXXXX"
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 = get_devices()
for device in devices:
#if device.name == deviceName:
device=InputDevice("/dev/input/event0")
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]
Thank you. It seems to work.
Now the Card ID is visible in the web browser.
Perfect ! It Will work.
Le dim. 28 avr. 2019 à 10:00, desevent7 notifications@github.com a écrit :
Thank you. It seems to work.
Now the Card ID is visible in the web browser.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/231#issuecomment-487355461,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALSPV7VPVATYAOMDUZNJS3TPSVKTJANCNFSM4FYHSG5Q
.
Hello everyone,
I've started created my Jukebox and I faced the same issue as described in the thread: no card RFID ID displayed in the web app (even though the HW card reader is correctly configured and Card ID is correctly displayed in the terminal).
I managed to fix this bug on my own. Here is the steps I've done.

i checked the permissions / owner of the folder "shared" and realized it wasn't correctly set:

I fixed it by executing: "sudo chown pi:www-data shared/":

after this, the latestID.txt file was created in the shared/ folder and I could see the RFID ID in the web app.
Hope that helps anyone having similar issue.
Most helpful comment
Hello,
I recently bought the NEUFTECH RFID USB Reader over Amazon https://www.amazon.de/gp/product/B018OYOR3E/
Using RegisterDevice.py and checking the deviceNames.txt I can see the device called "HXGCoLtd" and not "HXGCoLtd HIDKeys".
This difference was also mentioned by @aschindler82 bevore. Don't know if this difference is important.
I installed the phoniebox on a RPi 2 using the one line install script without spotify and Raspbian 2018-03-13-raspbian-stretch.
The reader does work when I want to teach a new card using the web interface - but if I swipe the card over the reader, then the reader makes a sound but the phoniebox does not start to play. I can see the correct id of the card in the terminal window when I swipe the card.
I already checked the phoniebox-rfid-reader.service. It is installed, loaded and active.
Does anybody have an idea how to get the rfid reader working?
I also checked the state of the rfid read in the web app - it is enabled. And (like i said bevore) I was able to teach new rfid cards
I reinstalled the phoniebox from scratch yesterday. Now the reader works perfectls.
I did not find out the root cause....