Example - OPC-UA Ingestor

Example - OPC-UA Ingestor

This ingestor will start an OPC-UA listener that will poll 192.168.2.11 on port 16664 every 30 seconds with a read single int32 request for Node ID 'temp'. The output of the listener (int32) is then passed directly to the template translator via the passthrough handler. The translator then uses the template ('script' field) to generate an EdgeIQ Report.

Ingestor JSON:

{
  "name": "OPC-UA Ingestor - Temperature",
  "cloud_ingestor": false,
  "device_ids": [
    "5984ce31f1f179e7c826b556"
  ],

  "listener_type": "opcua",
  "listener": {
    "host": "192.168.2.11",
    "port": 16664,
    "poll_interval": 30,
    "timeout": 2,
    "params": {
      "request_type": "read_single_int32",
      "node_id": "temp"
    }
  },
  
  "handler_type": "passthrough",
  
  "translator": {
    "name": "OPC-UA Translator - Temperature",
    "cloud_translator": false,
    "type": "template",
    "script": "{\"device_id\":\"opcua-device-9466\", \"payload\":{\"temperature\": {{.output}}}}"
  }
}

Generated EdgeIQ Report JSON:

{
  "device_id": "opcua-device-9466",
  "payload": {
    "temperature": 71
  }
}