For SmartServer 3.6 and higher, see Defining Device Types (Release 3.3 and Prior).
For SmartServer 3.3 and prior, see Defining Device Types (Release 3.3 and Prior).
You will create device type definitions to enable the SmartServer to interact with and configure your edge devices. See Device Type Definition for a description of device types and how they are used. This page describes how to create, manage, and package device types, and consists of the following:
The Device Types widget provides the ability to create, view, and edit device types, as well as to import device types, and to export device type definition (DTD) files with a .dtd extension. A DTD file is a CSV file that lists the device type names, program identifier (ID), application image names, and graphics assets to be used as icons for specified device types.
You first have to import any XIF files (see Collecting or Creating Device Definitions), resource files, application image files, system image files, and graphics files that you plan to use. When an XIF file that does not already have an associated device type defined is imported, a default device type will be created with the device type name equal to the XIF file name, the protocol and program ID set from the XIF file, and the graphics file set to a default device icon.
Once imported, you will be able to create new device types in the Device Types widget, and since the referenced files are already available in the database, you will only have to type a device type name (all the other entries will be selections from pull-down lists).
You can create a device type package (DTP) file that is an archive file that contains assets, resources, and definitions for defining new device types using the Export feature on the Device Types widget.
Users with Administrator, Owner, Controller, or Tenant roles can use this widget to create, modify, and delete device types datapoints within the geozones where they have the Administrator, Owner, Controller, or Tenant roles.
Creating a Graphics File
You can specify a graphics file to customize the image displayed for a device type. You can supply the graphics file as a .JPG or .PNG. file. Files with a .JPG extension are interpreted as JPEG files, as defined by ISO/IEC 10918-1. Files with a .PNG extension are interpreted as Portable Network Graphics files, as defined by ISO/IEC 15948.
Creating a Device Type
You can create a device type using the Device Types widget. To do so, perform the following steps:
- Click the Create Device button ().
- Enter the device type parameters as appropriate, including:
- Device Type – a unique name for the device type
- Protocol – the communications protocol (BACnet, IAP, LON, Modbus)
XIF File – provides the ability to upload an XIF file plus a list of all available XIF files with the selected protocol in the SmartServer CMS database
Program ID – read-only field with the program ID of the selected XIF file
Default Application Image – provides the ability to upload an application image file plus a list of all available application image files with the selected protocol in the SmartServer CMS database. (For SmartServer IoT 2.5, this option is only available for LON devices.)
Automatic Application Image Load – indicates if the default application image must be loaded upon initial provisioning a device of the specified type. The default value is cleared. It is cleared and grayed out if a Default Application Image is not selected.
Default System Image – provides the ability to upload a system image file plus a list of all available system image files with the selected protocol in the database. (For SmartServer IoT 2.5, this option is only available for LON devices.)
Automatic System Image Load – indicates if the default system image must be loaded upon initial provisioning a device of the specified type. The default value is cleared. It is cleared and grayed out if a Default System Image is not selected.
Graphics File – provides the ability to upload a graphics file plus a list of all available graphics files in the SmartServer CMS database
Create Device Type settings
Create Device Type settings - Select a graphic file options - Click SAVE to create the new device type.
Viewing Device Types
You can set filters on the Device Types widget to view selected device type definitions. By default, the CMS lists all defined device types.
To set a filter, perform the following steps:
- Click the Set Filter button ().
The Set filters view appears. - Enter the search criteria. Click the down arrow to select the filter options (i.e., by name, segment controller, XIF file, driver, and/or program ID).
- Click the plus sign ( ) to add filters.
- Click APPLY FILTERS.
The results below show the name filter results for "5000".
The Device Types widget display includes:Device Type – the device type name
Protocol – the protocol specified by the device template
Device Count – the number of defined devices implementing the device template
Each heading has a Sort button (). When clicked, the device type list is sorted in forward or reverse order by the selected heading.
- The Reset Filter button () clears the filter settings.
Copying a Device Type
You can import a device type using the Device Types widget. To do so, perform the following steps:
- Click the Action button () and select the Copy action.
- Enter a new device type name, and select the XIF file, default application image file (for SmartServer IoT 2.5, LON device support only), default system image file (for SmartServer IoT 2.5, LON device support only), and graphic file as appropriate.
The Automatic Application/System Image Load checkbox indicates if the default application/system image must be loaded upon initial provisioning a device of the specified type. The default value is cleared. It is cleared and grayed out if a Default Application/System Image is not selected. - Click SAVE to copy device type.
Editing a Device Type
You can edit a device type using the Device Types widget. To do so, perform the following steps:
- Click the Action button () for the selected device type and select the Edit action.
- Edit the device type parameters as appropriate, including:
- Device Type
- XIF File
- Default Application Image
- Default System Image
- Graphic File
- Automatic Application/System Image Load checkbox
3. Click SAVE to save the edited device type.
Importing a Device Type
Device type files can be imported individually, or you can package files together into a zip file (DTP file) and import multiple files in one operation. The files that you import into the SmartServer CMS are stored in the CMS database.
Once data is imported, it is available from the CMS database where you imported it, and it is also available on another SmartServer IoT that has been restored from a database backup of your first SmartServer IoT so that you can provision a new SmartServer IoT with the same device type definitions. Alternatively, you can create a single DTP file that you import into new SmartServer IoTs as you deploy them, simplifying the process of defining the device types you commonly use for new installations.
Note: When creating CSV files using Excel, parameters and values must be placed into separate cells otherwise Excel places quotes around the text and the file will not compile. For example, putting #filetype,BACnet_xif into one cell causes Excel to put quotes around the text, which are not visible. In this case, #filetype should appear in one cell and BACnet_xif in the other.
Two methods are available to import the device types: 1) using the Device Types widget, and 2) using the Devices widget. The procedures that follow describe both of these routines.
Using the Device Types Widget
To import a device type using the Device Types widget, perform the following steps:
- Click the Import Device Types button ().
- Drag the file to be imported to the DROP FILE HERE area.
- Click IMPORT FILE.
Using the Devices Widget
To import a device type(s) using the Devices widget, perform the following steps:
- Open the Devices widget.
- Click the Action button () and select the Import Device Types action.
The following view appears. - Click the DROP FILE HERE area and select the file to be imported, or drag and drop the file into the DROP FILE HERE area.
- Click IMPORT FILE.
A confirmation dialog box appears for the device type import similar to the one shown below. - Click OK.
Exporting a Device Type
You can export your device type definitions to a device type definition (DTD) file from the Device Types widget. You can use this capability to export a set of device type definitions to any number of new SmartServers in a single operation per SmartServer.
To export a device type, perform the following steps:
- Click the Action button () and select the Export action.
- Enable or disable the Download as Package option. If you enable Download as Package when you click Export the CMS creates a device type definition (DTD) file with your selected device type definitions, creates a device logging and alarming (DLA) file with your DLA specifications, collects all of your other device type definition files including resource files, CON files, and graphics files, and packages them into a single zip archive called the device type package (DTP). If you do not enable Download as Package, the CMS creates the DTD file but does not package all the dependent files with it. You can use the DTP file to specify the same device type definitions on multiple SmartServers. You can collect all your device type definition files on one SmartServer, use it to create a DTP file, and then import the DTP file on your other SmartServers using the Import action that is available through the Device Types widget.
- Click DOWNLOAD ALL to export the device type.
Exporting Multiple Device Types
You can export multiple device type definitions to a device type definition (DTD) file from the Device Types widget. You can use this capability to export a set of device type definitions to any number of new SmartServers in a single operation per SmartServer.
To export multiple device types, perform the following steps:
- Click the checkmark for the device types you wish to export on the Device Types widget.
The checkmark changes from blue to yellow. - Click the Action button () and select the Export Selected Device Types action.
- Enable or disable the Download as package option.
The Export feature saves a DTP containing DTDs for the selected device types, and all dependent files if the Download as a package option is selected, or DTDs for the selected device types and all dependent files if the Download as a package option is not selected. - Click DOWNLOAD ALL to export the device types.
Removing a Device Type
You can remove a device type using the Device Types widget. To do so, perform the following steps:
- Click the Action button (
- Click OK in the confirmation dialog box to remove the selected device type.
Removing Multiple Device Types
You can remove multiple device types using the Device Types widget. To do so, perform the following steps:
- Click the checkmark for the device types you wish to remove from the Device Types widget.
The checkmark changes from blue to yellow. - Click the Action button () and select the Remove Selected Device Types action.
- Click OK in the confirmation dialog box to remove the selected device types.
Creating a Device Type Definition (DTD) File
Typically you create a device type definition as described above in the Creating a Device Type section, but you can export, view, and modify the definition as a CSV file as described here.
A device type definition (DTD) file is a CSV file that lists the device type names, program identifier (ID), application image names, and graphics assets to be used as icons for specified device types.
The following embedded metadata tags are usually in the first line of the DTD file, but can appear anywhere:#filetype,dtd
A DTD file is identified by its file name and categorized by the #filetype tag equal to dtd and its extension .DTD or .CSV (not case sensitive).
DTD File Parameters
A DTD file contains the following columns (headings and values are not case sensitive):
Parameter | Description |
---|---|
Device Type | Unique name for the device type. This is the name that will be shown to the user when defining the device in the CMS. (required parameter) |
Protocol | Communications protocol, e.g., LON, Modbus, BACnet. (required parameter) |
Program ID | Unique program ID used to find the XIF file. Upon import, if the program ID exists because of a previously imported XIF, the automatically created type is deleted. (required parameter) |
Default App | Filename for the default application image file. (optional parameter; does not apply to Modbus) |
Default Sys | Filename for the default system image file. (optional parameter; does not apply to Modbus) |
Auto App Load | Boolean indicating if the Default_App must be loaded upon initial provisioning a device of the specified type. Default value is false. (optional parameter; does not apply to Modbus) |
Auto Sys Load | Boolean indicating if the Default_Sys must be loaded upon initial provisioning a device of the specified type. Default value is false. (optional parameter; does not apply to Modbus) |
Graphics File | Name of the graphics file for the device type icon. (optional parameter) |
DTD File Example
The example below shows more than one device type being created for the same program ID to allow for different polling, logging, or alarming for two devices of the same type.
#filetype,dtd |
Creating a Device Type Package (DTP) File
You can create a device type package (DTP) file that is an archive file that contains assets, resources, and definitions for defining new device types. It provides the ability to package multiple files needed to define new device types and to import the entire DTP in a single step. A DTP file is identified by its file name and categorized by its extension .ZIP, .GZIP, .DTP, .DTP.ZIP, or .GDTP (not case sensitive).
The compression method is determined by the extension, with .ZIP and .DTP files in zip format, and .GZIP and .GDTP files in gzip format. Once imported, the SmartServer CMS extracts all the files in the archive and processes them based on the file import rules.
Note: Spaces are not supported in the zip file name or in the contained directory names.