Skip to main content

Ignition-IoTDB Connector

...About 5 min

Ignition-IoTDB Connector

1、Product Overview

  1. Introduction to Ignition

Ignition is a web-based monitoring and data acquisition tool (SCADA) - an open and scalable universal platform. Ignition allows you to more easily control, track, display, and analyze all data of your enterprise, enhancing business capabilities. For more introduction details, please refer to Ignition官网open in new window

  1. Introduction to the Ignition-IoTDB Connector

    The ignition-IoTDB Connector is divided into two modules: the ignition-IoTDB Connector,Ignition-IoTDB With JDBC。 Among them:

    • Ignition-IoTDB Connector: Provides the ability to store data collected by Ignition into IoTDB, and also supports data reading in Components. It injects script interfaces such as system. iotdb. insertandsystem. iotdb. queryto facilitate programming in Ignition
    • Ignition-IoTDB With JDBC: Ignition-IoTDB With JDBC can be used in theTransaction Groupsmodule and is not applicable to theTag Historianmodule. It can be used for custom writing and querying.

    The specific relationship and content between the two modules and ignition are shown in the following figure.

2、Installation Requirements

Preparation ContentVersion Requirements
IoTDBVersion 1.3.1 and above are required to be installed, please refer to IoTDB for installation Deployment Guidanceopen in new window
IgnitionRequirement: 8.1 version (8.1.37 and above) of version 8.1 must be installed. Please refer to the Ignition official website for installation Installation Guidanceopen in new window(Other versions are compatible, please contact the business department for more information)
Ignition-IoTDB Connector modulePlease contact Business to obtain
Ignition-IoTDB With JDBC moduleDownload address:https://repo1.maven.org/maven2/org/apache/iotdb/iotdb-jdbc/open in new window

3、Instruction Manual For Ignition-IoTDB Connector

1、Introduce

The Ignition-IoTDB Connector module can store data in a database connection associated with the historical database provider. The data is directly stored in a table in the SQL database based on its data type, as well as a millisecond timestamp. Store data only when making changes based on the value pattern and dead zone settings on each label, thus avoiding duplicate and unnecessary data storage.

The Ignition-IoTDB Connector provides the ability to store the data collected by Ignition into IoTDB.

2、Installation Steps

Step 1: Enter the Configuration - System - Modules module and click on the Install or Upgrade a Module button at the bottom

Step 2: Select the obtained modl, select the file and upload it, click Install, and trust the relevant certificate.

Step 3: After installation is completed, you can see the following content

Step 4: Enter the Configuration - Tags - History module and click on Create new Historical Tag Provider below

Step 5: Select IoTDB and fill in the configuration information

The configuration content is as follows:

NameDescriptionDefault ValueNotes
Main
Provider NameProvider Name-
EnabledtrueThe provider can only be used when it is true
DescriptionDescription-
IoTDB Settings
Host NameThe address of the target IoTDB instance-
Port NumberThe port of the target IoTDB instance6667
UsernameThe username of the target IoTDB-
PasswordPassword for target IoTDB-
Database NameThe database name to be stored, starting with root, such as root db-
Pool SizeSize of SessionPool50Can be configured as needed
Store and Forward SettingsJust keep it as default

3、Instructions

Configure Historical Data Storage

  • After configuring the Provider, you can use the IoTDB Tag Historian in the Designer, just like using other Providers. Right click on the corresponding Tag and select Edit Tag (s) , then select the History category in the Tag Editor

  • Set History Disabled to true, select Storage Provider as the Provider created in the previous step, configure other parameters as needed, click OK, and then save the project. At this point, the data will be continuously stored in the 'IoTDB' instance according to the set content.

Read Data

  • You can also directly select the tags stored in IoTDB under the Data tab of the Report

  • You can also directly browse relevant data in Components

Script module: This function can interact with IoTDB

  1. system.iotdb.insert:
  • Script Description: Write data to an IoTDB instance

  • Script Definition:

    system.iotdb.insert(historian, deviceId, timestamps, measurementNames, measurementValues)

  • Parameter:

    • str historian:The name of the corresponding IoTDB Tag Historian Provider
    • str deviceId:The deviceId written, excluding the configured database, such as Sine
    • long[] timestamps:List of timestamps for written data points
    • str[] measurementNames:List of names for written physical quantities
    • str[][] measurementValues:The written data point data corresponds to the timestamp list and physical quantity name list
  • Return Value: None

  • Available Range:Client, Designer, Gateway

  • Usage example:

    system.iotdb.insert("IoTDB", "Sine", [system.date.now()],["measure1","measure2"],[["val1","val2"]])
    
  1. system.iotdb.query:
  • Script Description:Query the data written to the IoTDB instance

  • Script Definition:

    system.iotdb.query(historian, sql)

  • Parameter:

    • str historian:The name of the corresponding IoTDB Tag Historian Provider
    • str sql:SQL statement to be queried
  • Return Value:
    Query Results:List<Map<String, Object>>

  • Available Range:Client, Designer, Gateway

  • Usage example:

system.iotdb.query("IoTDB", "select * from root.db.Sine where time > 1709563427247")

4、Ignition-IoTDB With JDBC

1、Introduce

Ignition-IoTDB With JDBC provides a JDBC driver that allows users to connect and query the Ignition IoTDB database using standard JDBC APIs

2、Installation Steps

Step 1: Enter the Configuration - Databases -Drivers module and create the Translator

Step 2: Enter the Configuration - Databases - Drivers module, create a JDBC Driver , select the Translator configured in the previous step, and upload the downloaded IoTDB JDBC. Set the Classname to org. apache. iotdb. jdbc.IoTDBDriver

Step 3: Enter the Configuration - Databases - Connections module, create a new Connections , select theIoTDB Driver created in the previous step for JDBC Driver, configure the relevant information, and save it to use

3、Instructions

Data Writing

Select the previously created Connection from the Data Source in the Transaction Groups

  • Table name needs to be set as the complete device path starting from root
  • Uncheck Automatically create table
  • Store timestame to configure as time

Do not select other options, set the fields, and after enabled , the data will be installed and stored in the corresponding IoTDB

Query

  • Select Data Source in the Database Query Browser and select the previously created Connection to write an SQL statement to query the data in IoTDB

Copyright © 2024 The Apache Software Foundation.
Apache IoTDB, IoTDB, Apache, the Apache feather logo, and the Apache IoTDB project logo are either registered trademarks or trademarks of The Apache Software Foundation in all countries

Have a question? Connect with us on QQ, WeChat, or Slack. Join the community now.