A webserver that connects to a acr122u and exposes it over websocket
Project description
ACR122U Websocket
This project enables you to connect an usb ACR122U NFC card scanner to a computer and access it using Socket.IO.
Features
- Read UUID from nfc cards and send them over Socket.IO.
- Websocket messages to start and stop the polling for cards.
- Websocket messages to give a confirmation or error beep and light signal.
- Automatically reconnect to the reader when interrupted.
Installation
You can install this package from PyPI.
pip install acr122u-websocket
Usage
- Connect the ACR122U reader to the computer
- Run the app
python -m acr122u_websocket.app
API
You can connect to the webserver using Socket.IO. These are the available events:
polling
pollingStart or stop the polling.
Request
startto start the polling.stopto stop the polling.
Reply
no card reader connectedif no card reader is connected.polling startedif the polling has (already) started.polling stoppedif the polling has (already) stopped.invalid messageif the message is neitherstartnorstop.
status indicator
status indicatorSet the status indicator.
Request
confimto play the confirming status.errorto play the error status.
Reply
no card reader connectedif no card reader is connectedconfirm status setif the confirm beep and light have been showerror status setif the error beep and light have been showinvalid messageif the message is neitherconfirmnorerror
card scanned
card scannedBroadcasts when a card has been scanned
Broadcast
{"uuid": [..]}- An object containing the uuid in the form of a list of integers.
Example
See an example webpage at test.html.
This page is also served on http://localhost:8080/test.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file acr122u-websocket-1.1.4.tar.gz.
File metadata
- Download URL: acr122u-websocket-1.1.4.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91247579f5b6b5b1de35db4e3b8a5914a951a6287285580f327083084087ad8a
|
|
| MD5 |
86a79fd94089b62fcdf6bcfb37a54d90
|
|
| BLAKE2b-256 |
b7c2df05090eb908f6d3c48aea21c39b9a1dfc3f16a30842a29e7ba20d42e092
|
File details
Details for the file acr122u_websocket-1.1.4-py3-none-any.whl.
File metadata
- Download URL: acr122u_websocket-1.1.4-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba1ed1d05315f52b984d11384fe11fe28a23c5720eefc59bbf5e6fcf5fb946fe
|
|
| MD5 |
778ab469b7122a88335c06ca1c1102bd
|
|
| BLAKE2b-256 |
f0663c4bd4f00ebc2432f32a88d54634201fdeb1b115b47c7aa6d750efa94eee
|