RDM6300 NFC/RFID

Component/Hub

The rdm6300 component allows you to use RDM6300 NFC/RFID controllers (datasheet, iTead) with ESPHome. This component is a global hub that establishes the connection to the RDM6300 via UART and translates the received data. Using the RDM6300 binary sensors you can then create individual binary sensors that track if an NFC/RFID tag is currently detected by the RDM6300.

../../_images/rdm6300-full.jpg

See Setting Up Tags for information on how to setup individual binary sensors for this component.

As the communication with the RDM6300 is done using UART, you need to have an UART bus in your configuration with the rx_pin connected to the data pin of the RDM6300 and with the baud rate set to 9600

# Example configuration entry
uart:
  rx_pin: D0
  baud_rate: 9600

rdm6300:

binary_sensor:
  - platform: rdm6300
    uid: 7616525
    name: "RDM6300 NFC Tag"

Configuration variables:

  • uart_id (Optional, ID): Manually specify the ID of the UART Component if you want to use multiple UART buses.
  • on_tag (Optional, Automation): An automation to perform when a tag is read. See on_tag.
  • id (Optional, ID): Manually specify the ID for this component.

on_tag

This automation will be triggered when the RDM6300 module responds with a tag.

The parameter x this trigger provides is of type uint32_t and is the tag UID as a 32-bit unsigned integer.

rdm6300:
  # ...
  on_tag:
    then:
      - mqtt.publish:
          topic: rdm6300/tag
          payload: !lambda 'return uint32_to_string(x);'

NFC/RFID Tag

The rdm6300 binary sensor platform lets you track if an NFC/RFID tag with a given unique id (uid) is currently being detected by the RDM6300 or not.

# Example configuration entry
uart:
  rx_pin: D0
  baud_rate: 9600

rdm6300:

binary_sensor:
  - platform: rdm6300
    uid: 7616525
    name: "RDM6300 NFC Tag"

Configuration variables:

  • uid (Required, integer): The unique ID of the NFC/RFID tag.
  • name (Required, string): The name of the binary sensor.
  • id (Optional, ID): Manually specify the ID used for code generation.
  • All other options from Binary Sensor.

Setting Up Tags

To set up binary sensors for specific NFC tags you first have to know their unique IDs. To obtain this id, first set up a simple RDM6300 configuration without any binary sensors like above.

When your code is running and you approach the RDM6300 with an NFC Tag, you should see a message like this:

Found new tag with ID '7616525'

Then copy this id and create a binary_sensor entry as in the configuration example. Repeat this process for each tag.

../../_images/rdm6300-ui.png