Looking to send your ClearStream RFID data to a web server with a customized format?
Examples of the could include:
- Sending JSON to a web service API
- Posting GET parameters to a web page
- Formatting an Email and sending the output to an address
This can be accomplished using the 'Template' Destination Type when configuring your ClearStream devices. This destination allows a user to customize the tag and beacon data into a customized report, such as JSON, and send it to a custom end point.
To start, you will first need a template file. This is the file that is used to generate the data that is sent to the endpoint. The details of this file are described in detail in the user guide, but to get started quickly you can use the sample that is provided with the installer. This sample can be found on you PC here: \My Documents\ClearStream RFID\Templates\Samples
The samples can be used as-is or modified using any text editor. The file itself is an XML document that generates the output. The sample (JSON_Sample.rpt) generates a simple JSON array of tag data that can be sent to your end point.
Once you have your report file built or are using the sample you will need to set it up in your ClearStream configuration. Start by selecting 'Template' as the destination Type. Then using the Folder explorer button navigate to and select the Report file. When this is complete you will see the Field mappings appear in the Field mappings window. The field mappings are pulled from the report file and define what fields from your source device are sent to what fields in your generated report.
The next step is to configure an end point. The end point can be a web service URL or an SMTP server. Click on the End Points button to begin. To add an End Point, click on the Add Button. If you are planning on sending your data to a Web Service, or REST API type destination select URL from the drop-down that appears.
At this point, you will have a new End Point added. Finish by configuring the properties of your end point, such as URL, Method, and any user names or passwords that are required and click done.
Finally, you should be able to start your RFID reader or BLE Beacon gateway. All tag and beacon data will be converted into the format based on your selected Template file and sent to the destination.