SQL Server - Adding Templates to Bulk Upload Menu

SQL Server - Adding Templates to Bulk Upload Menu

The steps to add a Device Template to the bulk upload menu on OpendataEE are:

1) Move the completed template into the appropriate directory. The default root device template directory is: C:\Program Files\Modius\OpendataEE\WebApp\opendataEE\devicetemplates\ . There is a subdirectory for each manufacturer. If a new manufacturer is added, create a subdirectory with the name of the manufacturer.

2) Change the file extension of the template from .tpl to .zip.

Note: BEWARE hidden file extensions.
If file extensions are hidden you may end up with a file named <filename>.zip.zip since the second .zip will be hidden to you but not the system.
It is recommended to go into Folder Options -> View and uncheck "Hide extensions for known file types".
The template will fail to work with bulk upload until the name is corrected. Once the name is corrected SQL server may automatically continue with the bulk upload.
Verify SQL Server is not going to continue processing the job before trying bulk upload again or you will end up with duplicate devices.

3) Add reference information about the template to the database. There is a Stored Procedure in the database called EG.SAVE_DEVICE_TEMPLATE.
Invoke the stored proceedure by modifying the code below:

Edit the text BETWEEN the apostrophe's for each line before executing. Null values can remain = null.

The ManufactureName needs to be exact spelling and case sensitive.  

exec EG.SAVE_DEVICE_TEMPLATE
@DeviceCode = 'Device Name in All Caps',
@DeviceName = 'Printable Device Name',
@DeviceDescr = null,
@TemplateCode = 'Device Template Name in All Caps',
@TemplateName = 'Printable Device Template Name',
@TemplateDescr = 'A verbose Printable Device Template Name',
@ManufactureName = 'Manufacturer Name in all Caps',
@ModelName = 'Printable Model Name',
@ModelNumber = null,
@PartNumber = null,
@ProtocolName = 'MODBUS', -- or 'SNMP'
@TemplateURI = 'devicetemplates/<manufacturer name>/<template_file_name.zip'
go
    • Related Articles

    • SQL Server - Testing database connections

      One of the past challenges with troubleshooting SQL database connections has been with having a tool to connect to the SQL database - determining if the port is available on the target server and the service is running. Starting in Windows 10, this ...
    • SQL Server - Changing Database Location / Server

      When changing database location / server you will need to update the following files and tables. In the Opendata file structure: database.properties - contains database connection info - Located: C:\Program ...
    • About OpenData Device Templates

      Each device has a set of attributes that can be monitored. OpenData comes with templates for monitoring the attributes for many manufacturers’ devices. Templates are the easiest and fastest way to start monitoring your devices. Modius templates ...
    • SQL Server - Manual Device Deletion

      If you need to remove a device from the dashboard and it is not possible to use the Delete button on the Administration > Devices page, you can do it through SQL Management Studio. Marking a Device as Deleted In Management Studio run the following ...
    • SQL Server - Resetting the Dashboard Admin User Password

      If the Admin user password is changed from default and lost you can reset it through SQL server. Reset Admin password to EE dashboard login 1) Open SQL Management Studio and run the following query. select * from eg.sysuser, 2) Look for the ...