nfc#

class platypush.backend.nfc.NfcBackend(device='usb', *args, **kwargs)[source]#

Bases: Backend

Backend to detect NFC card events from a compatible reader.

Triggers:

Requires:

  • nfcpy >= 1.0 (pip install 'nfcpy>=1.0')

  • ndef (pip install ndeflib)

Run the following to check if your device is compatible with nfcpy and the right permissions are set:

python -m nfc
__init__(device='usb', *args, **kwargs)[source]#
Parameters:

device

Address or ID of the device to be opened. Examples:

  • ’usb:003:009’ opens device 9 on bus 3

  • ’usb:003’ opens the first available device on bus 3

  • ’usb’ opens the first available USB device (default)

run()[source]#

Starts the backend thread. To be implemented in the derived classes if the loop method isn’t defined.