Create a Dashboard Using the SmartWorks Connector
This connector enables you to retrieve the data stored in AnythingDB.
Important: To visualize data stored at the Raw History section in
AnythingDB, or the data stored in a Category, you will first need to create an
App. If not, skip Step 1 and begin at Step 2.
-
Click Access Control > Apps and create a new App by following these steps.
Note: The Application Client ID and Secret ID is required in configuring the New Workbook in Real time Visualization module. Be sure to capture and save this information.Note: The App should have Data or Thing as Scopes (depending if you want to get the data stored at the raw history section or the data in a Category) and the type set as Client Credentials.
- Click Real Time Visualization > Workbooks.
-
Select a folder to work in. By default a root folder with your username has
been created. Right click to see the different operations you can perform.
Figure 1. - Click New Workbook.
-
Enter a name for the Workbook and click Create.
Figure 2. -
Create a Data Table by clicking the + icon.
Data tables define the queries and source data repository definitions, in order to retrieve data.
Figure 3. -
Under Data Table Settings, enter a title and click the check mark to save it.
Enter a description, if desired.
Figure 4. -
With Data Sources highlighted, under File/URL, select SmartWorks
IoT.
Figure 5. -
Enter the following:
- Client ID: from the app created in Step 1
- Client Secret: from the app created in Step 1
- Grant Type: type of app created in Step 1. Here we use client_credentials.
- Scope: from the app created. Choose Thing if you want to retrieve the Thing status of a Category, and data if you want to retrieve the data stored at the Raw History section.
- URL: to make the request.
- If you want to retrieve the Things status of a Category: https://api.swx.altairone.com/spaces/YourSpaceID/categories/YourCategoryName/things-status
- If you want to retrieve the data stored at the raw history section for different Things: https://api.swx.altairone.com/spaces/YourSpaceID/data/?source[]=FirstThingUID&source[]=SecondThingUID
- Record path: Choose data to retrieve the Thing status of a Category the data stored at the Raw History section.
Figure 6. -
Click Generate Columns, and then click
Refresh Preview.
The columns are populated and the requested data is displayed.
- Click Save.
-
Click Back to return to the Edit Dashboard view.
Figure 7. -
On the blank canvas (right half section), sketch a simple square by clicking
and dragging on the blank interface.
This enables the Visualization menu.
-
Select the Visualization mode and configure it using the Visualization
settings.
Detailed information regarding Data Tables is available from the Panopticon Designer documentation.