MQTT Commands
The Smartreader Embedded app supports command processing over MQTT. In order to avoid command loops when the app or the reader is restarted, the command_id received is always compared to the last command received and ignored in case they are the same.
Supported Commands
The Smartreader currently supports the following MQTT commands:
start– begin the inventory operation.stop– halt the inventory operation.reboot– reboot the reader.mode– configure reader settings.get-gpo– read the current state of the reader's GPO pins.set-gpo– set the state of one or more GPO pins.status– request compact reader status information.status-detailed– request a more exhaustive status report.impinj_iot_device_interface– proxy a request to the Impinj IoT Device Interface API.retrieve-settings– fetch current Smartreader application settings.apply-settings– apply new configuration settings.upgrade– trigger firmware upgrade from a specified URL.rshell– execute an RShell command on the reader.Task commands for stored tasks:
createupdategetdelete
Start Command
Description: This command starts the inventory operation (preset)
Topic: Topic for Control Command
Payload:
Stop Command
Description: This command stops the inventory operation (preset)
Topic: Topic for Control Command
Payload:
Reboot Command
Description: This command reboots the reader
Topic: Topic for Control Command
Payload:
Mode Command
Description: This command configures the reader settings
Topic: Topic for Control Command
Payload:
GPO GET Command
Description: This command gets the current status of the reader´s GPOs
Topic: Topic for Control Command
Result topic: Topic for Control Command Response Publishing
GPO SET Command
Description: This command sets reader´s GPOs. Note that it is not needed to include all 3 GPOs on the payload.
Topic: Topic for Control Command
Result topic: Topic for Control Command Response Publishing
Status Command
Description: This command gets the status of the reader. There are two variations of this command. The default one, "status", returns a reduced and fast payload. A detailed one, "status-detailed" that returns a longer and detailed payload (but slower).
Topic: Topic for Management Command
Payload:
Status Event
Description: This event contains compact status information from the reader
Topic: Topic for Management Events
Payload:
Status Detailed Event
Description: This event contains detailed status information from the reader
Topic: Topic for Management Events
Payload:
Impinj IoT Device Interface Command
Description: This command interfaces with the Impinj IoT Device Interface over MQTT
See Impinj IoT Device Interface payload examples for additional request formats.
Topic: Topic for Management Command
Payload:
Retrieve Settings Command
Description: This command queries the current app settings
Topic: Topic for Management Command
Payload:
Apply Settings Command
Description: This command applies a new configuration to the app
Topic: Topic for Management Command
Payload:
Upgrade Command
Description: This command trigger the firmware upgrade process
Topic: Topic for Management Command
Payload:
RShell Command
Description: Executes an RShell command on the reader. The command string is provided in payload.data and the response returns the command output split into lines.
Topic: Topic for Management Command
Payload:
Example response:
Task Commands
Task management operations can also be performed via MQTT.
Topic format: smartreader/{deviceId}/api/v1/tasks/{action}
Where {action} is one of:
createupdategetdelete
The logicalPointId, taskId and documentId values are provided in the JSON payload as needed by each action. The logicalPointId can be omitted to query tasks for all logical points.
For the get action:
Without
taskId, the response contains tasks.With
taskIdand"progress": true, the response contains progress for the specified task.With
taskIdbut nodocumentId, the response contains all documents for the specified task.With both
taskIdanddocumentId, the response contains the specified document.
Last updated