Many people are issued Proxcards at work and already carry them the majority of the time when entering or leaving their homes. This program will allow you to use your existing card interface with your home automation system (like HomeAssistant).
This script allows you to define a list of 'authorized' proxcards and fire an MQTT message to your broker with the scan result (access granted/denied + ID number).
The Proxcard Scanner used is a RFIDeas pcProx 125 kHz which basically simulates keyboard input. This is best coupled with a Raspberry Pi or nearby Linux box.
Once you plug the RFID reader to the Pi's USB, if you run the lsusb
command it should be listed there:
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 005: ID 0c27:3bfa RFIDeas, Inc pcProx Card Reader
Once your device is recognized, you can run the script:
$ python proxcard_auth.py
Configure these settings within proxcard_auth.py
MQTT_HOST = '127.0.0.1'
MQTT_PORT = 1883
MQTT_USER = 'mqtt_user'
MQTT_PASSWORD = 'mqtt_pass'
MQTT_CLIENT_ID = 'badge-scanner-01'
MQTT_TOPIC_PREFIX = 'home/badge-scan'
Configure these IDs within roster.yaml (this will be the six digit ID of your proxcard, usually written on the back. You can also find this by running proxcard_auth.py and looking at the output.
- 111111 # User 1
- 222222 # User 2
- 333333 # User 3
- Copy proxcard-scanner.service to
/etc/systemd/system/
- Run (as root)
systemctl enable proxcard-scanner.service
- Run (as root)
systemctl start proxcard-scanner.service