Device Type Definition

You will create device type definitions to enable the SmartServer to interact with and configure your edge devices.  You will specify the following to create a device type definition:

  • Device type name – a name you select to identify the device type
  • Protocol – the communications protocol used by the device; the protocol may be BACnet, LON, Modbus, or IAP, or a custom protocol that you define
  • Device interface (also called the XIF) – defines the program ID, network inputs, and network outputs for the device; you can define multiple device types that use the same device interface to specify different behaviors for the same device interface
  • Device type configuration – system-specific configuration for a device interface that you specify

Device Interface

The device interface defines the program ID, network inputs, and network outputs for a device.  The device interface is typically defined by the device manufacturer.  The way you specify the device interface depends on the communications protocol used by the device.  For example, BACnet, LON, and Modbus devices all have a different method used to specify device types.  In every case, the device interface specifies the program ID for a device, and the blocks and datapoints available on the device.  For example, the following figure illustrates a device interface (XIF) definition for a room controller device that contains a WallUnit and AirQuality block.

You specify the device interface with a protocol-specific device interface (XIF) file.  For BACnet devices, the SmartServer can automatically create a BACnet XIF file from the device, you can download a XIF file from the SmartServer repository, or you can create a custom XIF file.  For LON devices, the XIF file is typically created by the LON device manufacturer using a LON application development tool.  If you have a LON device that does not have a XIF file, you can create one from the device using the NodeUtil LON device utility.  For EnOcean, LoRaWAN, and Modbus devices, you can download a XIF file from the SmartServer repository, or you can create the XIF file.  For any of the protocols, the XIF definition can refer to resource definitions included with the SmartServer, or you can create custom resources for your devices.  The following figure adds the source of XIF and resource definitions to the example above.

Program ID Definition

The program ID is a 64-bit number that uniquely identifies a device interface.  It is used to find resource definitions for a device interface.  The program ID is typically shown as 16 hex characters, optionally with colon (":") or dash ("-") separators between every two hex digits.  Below are a few example program IDs using colon separators between every two hex digits:

  • BACnet/IP-LAN Example: 9B:00:F5:05:01:04:FB:03
  • BACnet MS/TP Example: 9B:00:F5:05:01:04:FC:03
  • LON FT Example: 9F:FF:FF:05:01:84:04:60
  • LON/IP-70 Example: 9F:FF:FF:05:01:84:85:60
  • LON PL-20 Example: 9F:FF:FF:05:01:84:11:60
  • Modbus RTU Example: 9B:00:96:05:40:04:DB:01
  • Modbus TCP Example: 9B:00:96:05:40:04:DC:01

Creating a program ID is a standard part of the development process for LON devices.  BACnet and Modbus devices typically do not have pre-defined program IDs.  The easiest way to create a program ID is to use the LonMark Standard Program ID Calculator included with the IzoT Resource Editor.  To create a program ID for a device interface using the Standard Program ID Calculator, follow these steps:

  1. Download and install the IzoT Resource Editor on a Windows computer.

  2. Open the LonWorks bin folder on your computer.  The default location for the LonWorks bin folder is C:\Program Files (x86)\LonWorks\Bin on 64-bit versions of Windows and is C:\Program Files\LonWorks\Bin on 32-bit versions of Windows.

  3. Start the SPIDCalculator application in your LonWorks bin folder.  The following window appears – the program ID is highlighted in the figure:



  4. Enter the program ID components as follows:
    1. Manufacturer – a 20-bit unique identifier for the device manufacturer.  The top four bits specify the format of the remaining 20 bits as follows:
      • BACnet International vendors: hex B followed by the BACnet Manufacturer Number.  For example, Contemporary Controls is BACnet Manufacturer Number 245 which is hex F5, so for Contemporary Controls the M fields are B:00:F5.
      • EnOcean Alliance vendors: hex A followed by 00 in the next two M fields then the EnOcean Alliance Manufacturer ID in the last two M fields.  See EnOcean Alliance Manufacturer IDs.
      • LonMark International vendors (for LON and IAP devices): hex 0 followed by the LonMark Manufacturer ID in the next four M fields.  To enter by name, click the arrow in the Manufacturer box to select the manufacturer name. 
      • LoRaWAN vendors: hex D followed by the LoRa Alliance Vendor ID in the next four M fields.
      • ODVA vendors (for CIP devices): hex C followed by the ODVA vendor ID in the next four M fields.
      • Unknown manufacturer: hex E – for discovered devices where the manufacturer cannot be determined by the discovery process.  The next four M fields are set to a random value by the discovery process.
      • Unspecified manufacturer: hex F – if you are manually assigning a manufacturer ID and you do not know or have the manufacturer ID, enter an F in the first M field in the program ID and then enter any random four hex digits in the next four M fields.  Hex digits are the numbers 0 through 9 and the letter A through F.  You can use any combination of hex digits when the first M is set to F.  Many examples use all Fs, for example: F:FF:FF.
    2. Category – specifies a filter for the Device Class box.  Click the arrow in the Category box and select one that matches your application, select I/O for most I/O devices as in the figure above, or select All to see all device classes.
    3. Device Class – specifies a classification for your device.  Click the arrow in the Device Class box and select one that matches your application, or select I/O for a generic I/O device.  The top two bits of the device class are set to binary 11 for discovered devices where the device class cannot be determined by the discovery process.  The next 14 bits are set to a random value by the discovery process.
    4. Usage – specifies a usage category for your device.  Click the arrow in the Usage box and select one that matches you application, or select Industrial/Commercial for any industrial or commercial device.  The top two bits of the usage field are set to binary 01 for discovered devices where the usage cannot be determined by the discovery process.  The next 6 bits are set to a random value by the discovery process.
    5. Channel Type – specifies the physical communications interface for the device.  For a LON device, click the arrow in the Channel Type box and select one of the LON channels types such as TP/FT-10 for a twisted pair free topology (FT) channel, PL-20C for a CENELEC compatible power line channel, PL-20N for a non-CENELEC compatible power line channel, or IP-70 for a LON/IP-LAN channel.  For a BACnet, Modbus, or LoRaWAN channel, enter one of the following channel types under TT in the Program ID box:
      1. Modbus RTU: DB
      2. Modbus TCP: DC
      3. EnOcean: E0
      4. LoRaWAN: E1
      5. EtherNet/IP: EB
      6. DeviceNet: EC
      7. BACnet/IP: FB
      8. BACnet MS/TP: FC
    6. Model Number – specifies a unique identifier for a device interface definition when combined with the other fields of the program ID.  For example, if a there are two versions of a device interface from a manufacturer with the same device class, usage, and channel type, the program IDs for the two device interfaces must have different model numbers.  The SmartServer only uses the program ID model number to differentiate program IDs for otherwise similar devices.  The value does not have to correspond to the manufacturer's model number for the device.  If you are creating a new program ID, set the model number to any value from 0 to hex FF.  The SmartServer device discovery process sets the model number to a random value greater than or equal to zero and less than or equal to hex FF.
    7. Standard Development Program ID – specifies that the device is LonMark certified if the box is clear.  Always enable this box for any device that is not LonMark certified.  A LonMark certified device will have 8 in the F field in the program ID, and a non LonMark certified device will have a 9 in the F field.
    8. Has Changeable Interface – leave this cleared for all devices except for LON devices that implement a changeable interface.
    9. Usage Field Values Defined by Functional Profile – leave this cleared for all devices except for LON devices based on profiles that define custom usage field values.

  5. Copy your specified program ID from the Program ID box at the bottom.  The colons are optional.

Device Type Configuration

You can configure the behavior of a device type, and you can define multiple device types that use the same device interface.  This enables you to create system-specific configuration for a device interface.  You can define the configuration for a device type by datapoint, where the device interface defines the datapoints available for a device type.  The following table lists attributes for a datapoint that you can configure per device type.

Datapoint AttributeDescription

MonitoringMonitoring

  • Enable or disable automatic monitoring of the datapoint value
  • Specify frequency of automatic data requests to the edge device
  • Specify frequency and conditions for reporting datapoint value updates

PresetsPresets

  • Define quick-access values such as Off, Low, Medium, High, and On

Data LocalizationData Localization

  • Convert units such as degrees Celsius to degrees Fahrenheit

LoggingLogging

  • Enable or disable datapoint value logging
  • Specify frequency and conditions of data log updates
  • Specify how long data is retained in the data log

AlarmingAlarming

  • Define warning and error thresholds for generating alarms
  • Specify high and low limits

ConnectionConnection

  • Connect output datapoint updates to one or more input datapoints

Data FlowData Flow

  • Define sequences of operation

Web FlowWeb Flow

  • Create custom browser-based user interfaces

The SmartServer device type model provides the following advantages over systems that do not use flexible device types:

  • Eliminates duplication of effort–you can easily replicate a particular device configuration without repeating all of your device configuration steps
  • Reduces the time required to integrate devices using different protocols
  • Simplifies implementation of standard services like monitoring, logging, alarming, and scheduling
  • Speeds site integration and deployment
  • Makes your integrators more efficient and productive