flyte / mqtt-io

Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
MIT License
461 stars 157 forks source link

PN532 NFC/RFID reader implementation #269

Closed vytautassurvila closed 1 year ago

vytautassurvila commented 2 years ago

Implementation via nfcpy. Solves #64

Sample configuration:

stream_modules:
  - name: nfc-scanner
    module: pn532
    device: ttyUSB0
    read_interval: 0.5

Note that streams does not support homeassistant discovery. One can workaround it with following homeassistant automation:

- alias: doorbell_mqqt_tag_scan_to_tag_scanned_event
  trigger:
    platform: mqtt
    topic: doorbell/stream/nfc-scanner
  action:
    event: tag_scanned
    event_data:
      tag_id: "{{ trigger.payload }}"