Skip to main content

IoTDB-Collector User's Manual

About 1 min

IoTDB-Collector User's Manual

Dependencies

  • JDK >= 11

Deployments

  1. Download the IoTDB-Collector zip package and extract the zip package to get the IoTDB-Collector folder.
  2. Modify the IoTDB configuration information in the db.properties file in the IoTDB-Collector/conf folder.
dbIp = 127.0.0.1
dbPort = 6667
dbUser = root
dbPasswd = root
  1. In the IoTDB-Collector folder use . /bin/start.sh to start IoTDB-Collector.

Usage Example

Connect to OPC UA services and collect data

  1. Modify the opcua-points.json file under IoTDB-Collector/conf/opcua to configure the addresses of the points to be collected
{
  "protocol": "opcua",
  "point_refs": [
    {
      "name":"DEC21TT104_PV",
      "address":"ns=1;s=t|TT21104/PV.PV_Out#Value",
      "data_type":"float"
    },
    {
      "name":"DEC21TT104_PV_UN",
      "address":"ns=1;s=t|TT21104/PV.PV_Unit",
      "data_type":"int"
    },
    {
      "name": "DEC21HV415_Mon",
      "address": "ns=1;s=t|HV21415/V.Monitor",
      "data_type": "boolean"
    }
  ]
}
  1. Modify the opcua-tasks.json file under IoTDB-Collector/conf/opcua to configure the name and collection frequency of the IoTDB inbound database corresponding to the point location.
{
  "protocol":"opcua",
  "tasks":[
    {
      "group_id":"opcua1",
      "interval_us":1000000,
      "points":[
        {
          "name_ref":"DEC21TT104_PV",
          "db_name":"DEC21TT104_PV",
          "db_data_type":"FLOAT"
        },
        {
          "name_ref":"DEC21TT104_PV_UN",
          "db_name":"DEC21TT104_PV_UN",
          "db_data_type":"INT32"
        },
        {
          "name_ref":"DEC21HV415_Mon",
          "db_name":"DEC21HV415_Mon",
          "db_data_type":"BOOLEAN"
        }
      ]
    }
  ]
}
  1. Call the interface to start the acquisition program ( endpointUrl Configure the OPC UA connection address )
curl --request PUT 'http://127.0.0.1:8081/start/opcua' \
--header 'Authorization: Basic dG9tOjMyMTEz' \
--header 'Content-Type: application/json' \
--data '{
	"deviceId": "opcua",
	"deviceOwner": "opcua",
	"protocolName": "opcua",
	"deviceProperties": {
		"endpointUrl": "opc.tcp://192.168.0.1:4862",
		"authWay": "0",
		"username": "",
		"password": ""
	}
}'
  1. To see if IoTDB has data written to it
  1. Stop OPC UA data collection
curl --request DELETE 'http://127.0.0.1:8081/stop/opcua' \
--header 'Authorization: Basic dG9tOjMyMTEz' \

Copyright © 2023 The Apache Software Foundation.
Apache and the Apache feather logo are trademarks of The Apache Software Foundation

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

We use Google Analytics to collect anonymous, aggregated usage information.