$SCRDR over MQTT

Reader Event topic

The SpringCore device publishes its $SCRDR Messages in the springcard/springcore/{$id}/rdr/evt topic.

Note: the springcard/springcore header may be changed by configuration; the {$id} portion maps to the Device ID which also depends on the configuration and defaults to the device's Serial Number.

Format

This topic uses JSON-formatted text messages. The format is inspired by the SMART_READER_TAG object in SpringCard Companion, but with some differences.

Field name Type Status Description Remark
"Interface" string option Source interface - "13.56" for NFC/RFID HF
- "900" for RFID UHF
- "bluetooth" for Bluetooth
"Protocol" string option Protocol of the found tag Possibles values for the NFC/RFID HF interface are:
- "NFC-A"
- "NFC-B"
- "NFC-C"
- "NFC-F"
- "NFC-EPC"
- "Inside-Pico"
- "NFC-T1T"
- "EM_4134"
- "ST-SR"
- "ASK-CTS"
- "Innovatron"
Possibles values for the RFID UHF interface are:
- "UHF-EPC"
Possibles values for the Bluetooth interface are:
- "BLE"
- "iBeacon"
- "Eddystone"
- "SpringBlue"
- "OrangePackId"
"Rssi" integer option RSSI of reception
"Template" integer option Which template of the smart reader does the tag match?
"State" string option Is the tag inserted or removed? - "Insert/Remove"
- "Insert"
- "Remove"
"TagId" string always Protocol-level identifier of the tag (UID, PUPI, DIV, ... depending on the actual protocol)
"TagData" string option If the tag matches one of the template, the data fetched from the tag by the template engine
"TagDetails" string option If the tag matches one of the template, more details regarding the tag or its data (type, source, etc)
"Uptime" string option Same defition as the "Uptime" field in the Status topic
"DateTime" string option Same defition as the "DateTime" field in the Status topic Not transmitted if the device does not have a RTC

Example

{
	"Sequence": 78,
	"Interface": "13.56",
	"Protocol": "Innovatron",
	"Template": 2,
	"TagId": "262BA1B0",
	"TagData": "00000000262BA1B0",
	"Uptime": "143:2003.470"
}

Note: for the ease of reading, the above JSON message is shown with spaces and line-feeds added. Due to the limitations of the MQTT protocol, all line-feeds, spaces and tabs are removed from the actual JSON string sent by the device.

Reader Command topic

The SpringCore device subscribes to the springcard/springcore/{$id}/rdr/cmd topic and expects to receive $SCCMD Messages.

Note: the springcard/springcore header may be changed by configuration; the {$id} portion maps to the Device ID which also depends on the configuration and defaults to the device's Serial Number.

Format

This topic uses JSON-formatted text messages.

Field name Type Status Description Remark
"Sequence" integer or string option Ask the SpringCore device to play a UI sequence If the field is a string, the value is supposed to be hex-encoded (Byte)
"Relay" boolean, integer or string option Ask the SpringCore device to drive its output relay See below
"Relays" array of booleans, integers, strings or null option Ask the SpringCore device to drive its output relays See below

Relay and Relays values

The understanding of the command depends on the type of the field in the JSON object.

  • If the field has the boolean type, then value true sets the relay (active position) and value false resets the relay (idle position),
  • If the field has the integer type, then value 0 resets the relay (idle position); value -1 sets the relay forever (permanent active position). Any positive value is understood as a duration in seconds. The relay is set for the specified time and reset afterwards,
  • If the field has the string type, then values "reset" and "false" resets the relay (idle position); values "set" and "true" sets the relay forever (permanent active position). Any other value is processed as an hexadecimal number and understood as a duration in seconds. The relay is set for the specified time and reset afterwards.
  • If the field has the null type, then the current entry is discarded.