Device
Add, edit, enable, disable, and delete transaction devices in the Device tab. Set the connection type of the transactions device, define filter conditions for the transaction information, pair the camera, and choose the style of On-Screen Display.
Add device
To add a transaction device:
- Click add. An Add Transaction Device Wizard window will appear.
- Enter a name to identify this device in the Name field.
- Select a transaction source from the Transactions source drop-down menu. The transaction source is one way to identify the device, and does not affect the actual operation.
- Select one of the following connection types from the Connection type drop-down menu:
- TCP: Enter the network information of the source in the IP address and Port field.
- Serial port: Make sure that all settings are consistent with the connection source.
- Surveillance Station WebAPI: Enter the IP address and port to check connection status. Although these are not mandatory fields, incorrect settings may lead to disconnection and other problems. For more information, please see the section on Surveillance Station WebAPI below.
- Click Next to continue with the setting of data definition. If you select Surveillance Station WebAPI as the connection type, you will be directed to the display settings.
- Select the correct encoding method, click Start Collecting Raw Data and enter the data on the device side. The received data is displayed in the Raw data field.
- Please set the rules for the start and end of the transaction.
- You can add a filter rule by clicking on the button at the top right corner. You can ignore characters, or replace characters with line break or with other characters.
- The results of filtered data will be displayed directly in the filtered data field. And the corresponding data will be marked in the original data.
- Click Next to continue with display settings.
- Select whether or not you want to set up a paired camera for this device from Paired Camera.
- In On-Screen Display, transaction data can be set to be displayed in live view and video clips.
- Click Finish to complete the setting.
Limitations:
- The device name is case sensitive. 1 to 32 Unicode characters are allowed, excluding the following symbols:
! " # $ % & ' ( ) * + , / : ; < = > ? @ [ ] \ ^ ` { } | ~
- If you do not have the encoding you are using in the encoding list, you can also enter it manually.
- For filter conditions, if you want to filter control characters, please use "<" and ">" to enclose the characters.
- When setting up a paired camera, you can see the camera and transaction data in live view and relevant recording clips.
Edit device
To edit a transaction device:
- Select the device you want to modify, then click Edit. You can also double-click on the device to change the settings.
- Set up User Defined events in the Advanced page. This can be used in Action Rule, Live View alerts, and Notification.
- Click Finish to save changes.
Enable or disable the device
The new device must be enabled before managing all supported actions.
To enable or disable a device:
- Select the device you want to enable or disable, And Enable or Disable from the Enable drop-down menu.
Note:
- Disabling the device will not delete its settings.
Delete device
- Select the device you want to delete, then click Delete.
- You will see a confirmation window. Once you have chosen to keep the transactions of the device, click Yes to continue.
Note:
- When deleting a device, if you choose to delete all transactions, the locked transactions will also be permanently removed from Surveillance Station.
Surveillance Station Web API
Surveillance Station Web API provides you with a more convenient way to connect your device, send Web API requests in a format that conforms to the specification, and record your transaction data.
Standard format to send Web API requests:
- API:
SYNO.SurveillanceStation.Transactions provides the following four types of methods (Begin, Complete, Cancel, and AppendData) to record transaction information:
Begin:
Notifies Surveillance Station to start recording a transaction. Includes the following parameters:
- device_name: String type; the name of the transaction device on Surveillance Station.
- session_id: String type; the ID of the transaction session.
- timeout: Integer type; transaction time limit (seconds). Exceeding the transaction time limit automatically ends the transaction.
Complete:
Notifies Surveillance Station to end the transaction and that the transaction is completed. Includes the following parameters:
- device_name: String type; the name of the transaction device on Surveillance Station.
- session_id: String type; the ID of the transaction session.
Cancel:
Notifies Surveillance Station to end a transaction and that the transaction is canceled. Includes the following parameters:
- device_name: String type; the name of the transaction device on Surveillance Station.
- session_id: String type; the ID of the transaction session.
AppendData:
Notifies Surveillance Station to record the contents of a transaction. Includes the following parameters:
- device_name: String type; the name of the transaction device on Surveillance Station.
- session_id: String type; the ID of the transaction session.
- content: String type; contents of a transaction. Each incoming data is a separate line, however \ n can be used for line breaks in the incoming data.
- Basic request format:
http://{IP}:{Port}/webapi/entry.cgi?api=SYNO.SurveillanceStation.Transactions.Transaction&method="{method}"&version=1&device_name="{device name}"&session_id="{session id}"
Examples of Web API requests:
- Starting the transaction:
http://{IP}:{Port}/webapi/entry.cgi?api=SYNO.SurveillanceStation.Transactions.Transaction&method="Begin"&version=1&device_name="POS01"&session_id="1"&timeout=300
- Recording the transaction:
http://{IP}:{Port}/webapi/entry.cgi?api=SYNO.SurveillanceStation.Transactions.Transaction&method="AppendData"&version=1&device_name="POS01"&session_id="1"&content="Start\n2017/01/01"
- Recording the transaction:
http://{IP}:{Port}/webapi/entry.cgi?api=SYNO.SurveillanceStation.Transactions.Transaction&method="AppendData"&version=1&device_name="POS01"&session_id="1"&content="Pen $40\nBook $300"
- Recording the transaction:
http://{IP}:{Port}/webapi/entry.cgi?api=SYNO.SurveillanceStation.Transactions.Transaction&method="AppendData"&version=1&device_name="POS01"&session_id="1"&content="Total $340\nEnd"
- Ending the transaction:
http://{IP}:{Port}/webapi/entry.cgi?api=SYNO.SurveillanceStation.Transactions.Transaction&method="Complete"&version=1&device_name="POS01"&session_id="1"
Note:
- You need to log in a session before sending Surveillance Station WebAPI requests. For detailed login methods, please refer to the Web API Document.
- Session_id is used to distinguish between different transaction events. The same device_name and session_id will be treated as the same record. If the same parameter is sent again, the Begin method will be ignored until the transaction has completed, canceled, or exceeded transaction time limit. After that, session_id can be reused.
- After the start of the transaction, if the time limit is exceeded before receiving the Complete or Cancel methods, the transaction record will be saved and marked as Incomplete.