Anomaly Detection > Implementing Anomaly Detection > Prepare ThingWorx for Anomaly Detection
Prepare ThingWorx for Anomaly Detection
Before configuring ThingWorx for Anomaly Detection, be sure you have completed all of the prerequisites.
Depending on the environment where Anomaly Detection is in use, you might need to prepare ThingWorx by configuring communication with an edge device. To configure ThingWorx to receive data from an edge device, follow the steps below.
1. In ThingWorx Composer, ensure that the Alert Processing Subsystem is configured to point to the ThingWorx Analytics Server. Depending on the options you selected during your Analytics Server installation, this configuration might have been completed automatically.
Navigate to SYSTEM > Subsystems.
Open the Alert Processing Subsystem.
From the menu at the top, select Configuration to open the subsystem’s Configuration page.
In the AnalyticsGateway field, confirm that the appropriate Analytics Server name is displayed. If not, enter the name of the Analytics Server you are running.
Example: analyticsServer321
Click Save.
2. Create a new Value Stream that will store data from your edge device.
This step is optional and only necessary if you want to display the incoming values in a mashup, such as the sample Anomaly Dashboard Mashup.
Click New at the top of the Composer window and select the Value Streams option. A Choose Template dialog box opens.
In the Value Stream option, click OK.
Enter a Name for the new Value Stream.
Click Save.
3. Create a new remote Thing that will represent the edge device that you want to monitor.
For simulation or test purposes, you can create a generic Thing instead of a remote Thing and configure the incoming data to be sent at a continuous interval.
Click New at the top of the Composer window and select the Thing option.
Enter a Name for the new Thing.
In Base Thing Template, select a template that reflects the edge device you want to monitor, such as RemoteThing.
In Value Stream, if you plan to display the incoming values in a mashup, select the name of the value stream you created above (Step 2).
Click Save.
The following video demonstrates how to create a specific type of remote Thing (an industrial gateway) and connect it to a KEPServer using simulated data.
4. Configure your edge device to communicate with the remote Thing you created above. You will need the following information to configure your device:
The host URL and port where your ThingWorx instance is running. For example localhost and 8080.
The name of the remote Thing you created above (Step 3).
An Application Key.
If you need to create a new key:
Click New at the top of the Composer window and select the Application Keys option.
Enter a Name for the new key.
Select a User Name Reference for the new key (such as Superuser or System).
Click Save.
Make sure your device has successfully connected to the remote Thing before continuing. If the connection is successful, the isConnected property under Remote Thing will show a check mark in the Value column.
Remote Thing Is Connected
5. Add properties to the remote Thing and bind them to the corresponding properties on the edge device:
Click Add next to My Properties. A New Property panel opens on the right.
In the panel, enter the Name and Base Type of the property.
Click Logged to maintain a history of the property values.
In the Binding field, select the Remotely bound option.
In the Remote Property Name field, click the drop down arrow and select from the properties available on your edge device. (If you are working in a Thing Template or Thing Shape, there is no drop down to select properties. You will have to enter the property name in a text field.)
In the Push Type field, select the Always Pushed option.
Click to save the property and close the panel.
Follow the same procedure to add and bind additional properties.
Click Save to save the updated remote Thing.
Click Refresh. If the properties are bound successfully and data from the edge device is changing, you will see the numbers in the Values column of your bound properties update.
Refresh Bound Properties
You are now ready to create an anomaly alert so that you can monitor data from the edge device. See Creating an Anomaly Alert.
Was this helpful?