Skip to main content

ACR122U Websocket

PyPI - Version PyPI - License PyPI - Downloads PyPI - Python Version PyPI - Wheel

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

  1. Connect the ACR122U reader to the computer
  2. Run the app
    python -m acr122u_websocket.app
    

API

You can connect to the webserver using Socket.IO. These are the available events:

polling

Start or stop the polling.

Request

  • start to start the polling.
  • stop to stop the polling.

Reply

  • no card reader connected if no card reader is connected.
  • polling started if the polling has (already) started.
  • polling stopped if the polling has (already) stopped.
  • invalid message if the message is neither start nor stop.

status indicator

Set the status indicator.

Request

  • confim to play the confirming status.
  • error to play the error status.

Reply

  • no card reader connected if no card reader is connected
  • confirm status set if the confirm beep and light have been show
  • error status set if the error beep and light have been show
  • invalid message if the message is neither confirm nor error

card scanned

Broadcasts 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.

Metadata

Release files for acr122u-websocket 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for acr122u-websocket 1.1.4
File Size Uploaded Provenance
acr122u-websocket-1.1.4.tar.gz 19.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for acr122u-websocket 1.1.4
File Interpreter ABI Platform
acr122u_websocket-1.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 39.0 kB

Release files / acr122u-websocket-1.1.4.tar.gz

Download URL acr122u-websocket-1.1.4.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
91247579f5b6b5b1de35db4e3b8a5914a951a6287285580f327083084087ad8a
BLAKE2b-256 checksum
How to use checksums
b7c2df05090eb908f6d3c48aea21c39b9a1dfc3f16a30842a29e7ba20d42e092
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / acr122u_websocket-1.1.4-py3-none-any.whl

Download URL acr122u_websocket-1.1.4-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba1ed1d05315f52b984d11384fe11fe28a23c5720eefc59bbf5e6fcf5fb946fe
BLAKE2b-256 checksum
How to use checksums
f0663c4bd4f00ebc2432f32a88d54634201fdeb1b115b47c7aa6d750efa94eee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Security for acr122u-websocket 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page