RPi-Jukebox-RFID: High CPU load by daemon_rfid_reader.py and MFRC522

Hi, I’m using the MFRC522 Module with the scripts from @keinkurt: https://github.com/keinkurt/RPi-Jukebox-RFID/tree/MFRC255/scripts on a Raspberry Pi Zero W I just recognize that the daemon generates a pretty high CPU load between 50–80%: pi 486 **80.4** 1.7 11608 7624 ? Rs 20:47 17:29 /usr/bin/python2 /home/pi/RPi-Jukebox-RFID/scripts/daemon_rfid_reader.py This is much more then mpd, which make about 7–10%

Maybe communicate with the reader less often?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you for merging this so quickly and thank you for testing. Unfortunately I cannot verify USB readers - not having one and going for the seemingly cheaper RC-522 module was the reason for me to work on this anyway 😃

Btw, the CPU usage improvements are great due to the new use of pi-rc522 and wait_for_tag() !

All the credit goes to you @varac for pointing us in the right direction.

One caveat to be mentioned here: The connection layout for the RC-522 that you find all over the internet is not sufficient to make this work. You have to connect the RC-522 IRQ pin with GPIO25 to make this work as described here: pi-rc522

@cubertt See how to solve the Reader' object has no attribute 'readCard' error in this commit, l. 14.