An Internet of Things Agent accepting data from OPC UA devices. This IoT Agent is designed to be a bridge between the OPC Unified Architecture protocol and the NGSI interface of a context broker.
The intended level of complexity to support these operations should consider a limited human intervention (mainly during the setup of a new OPC UA endpoint), through the mean of a parametrization task (either manual or semi-automatic, using a text-based parametrization or a simple UI to support the configuration) so that no software coding is required to adapt the agent to different OPC UA devices.
It is based on the IoT Agent Node.js Library. Further general information about the FIWARE IoT Agents framework, its architecture and the common interaction model can be found in the library's GitHub repository.
This project is part of FIWARE. For more information check the FIWARE Catalogue entry for the IoT Agents.
📚 Documentation | 🎓 Academy | 🎯 Roadmap |
---|
The F4I OPC UA Agent is based on the reference implementation of the FIWARE Backend Device Management Generic Enabler, IDAS, delivered by Telefonica I+D. IDAS provides a collection of Agents - i.e., independent processes that are typically executed in the proximity of IoT devices and that are responsible for bridging a specific IoT protocol to the NGSI standard (e.g. the IDAS distribution includes off-the-shelf Agents for LwM2M and MQTT). To this end, IDAS links the NGSI southbound API of the FIWARE Orion Context Broker to the northbound API of the IoT application stack, by providing a software library (the IoT Agent Lib depicted in the previous figure) for developing custom Agents that may extend the bridging capabilities of IDAS to other protocols. The F4I IDAS OPC UA Agent makes use of this framework to integrate OPC UA-based devices in a publish-subscribe system based on the FIWARE Orion Context Broker.
Currently two options are available to install the Agent:
We suggest using a Docker-first approach in order to avoid issues related to your environment configuration. Moreover, using this approach you will be provided with all the needed components: OCB, Mongo instances and a sample OPC UA server.
A step-by-step tutorial is available here
Before launching the Agent you must install Orion Context Broker (Be aware to choose the correct version, please use orion if it's needed to test the Agent with NGSI v2 otherwise use orion-ld in case of NGSI-ld test.) and a OPC UA Server. After that you must tell the Agent how to interact with these components by using config.js file. Once configuration is complete you can execute these commands to run the Agent.
$ npm install
$ node bin/iotagent-opcua
Further Information about how to install the OPC UA IoT Agent can be found at the corresponding section of the Installation & Administration Guide.
Information about how to use the IoT Agent can be found in the User & Programmers Manual.
Administration services are reachable at port specified by api-port property (config.js).
Service | Description | |
---|---|---|
GET | /version |
Returns information about version, name and agent description |
Poll commands can be enabled switching polling property to true (config.js). Once enabled poll command, you can customize the polling Daemon Frequency and Expiration time still in the (config.js). The polling-commands-timer is referred to the feature developed, that consist in the execution of the older polling command periodically (if exists) ed delete it in case of success.
Apiary reference for the Configuration API can be found here More information about IoT Agents and their APIs can be found in the IoT Agent Library documentation.
For test purpose can create an OPC UA server using the code in the following GitHub repository
Firstly edit the config.js in order to set Northbound (NGSI) and Southbound (OPC UA) settings.
Further information about configuration properties can be found here
For checking current status of the Agent, send a request to /version service
(http://{agent-ip-address}:api-port/version
)
OPC UA Agent will automatically generate key pairs and certificates (persisted in iotagent-opcua/certificates
) to
establish a secure connection to the OPC UA Server.
Documentation about the OPC UA Administration API can be found here
The IoT Agent for OPC UA project is part of FIWARE and has been rated as follows:
The IoT Agent for OPC UA is licensed under Affero General Public License (GPL) version 3.
© 2021 Engineering Ingegneria Informatica S.p.A.
The following third-party libraries are used under license
- node-opcua - MIT - © 2014-2021 Etienne Rossignon
- iotagent-node-lib - AGPL © 2014-2021 Telefonica Investigación y Desarrollo
The full list of third-party libraries licenses can be found here
No problem in using a product licensed under AGPL 3.0. Issues with GPL (or AGPL) licenses are mostly related with the fact that different people assign different interpretations on the meaning of the term “derivate work” used in these licenses. Due to this, some people believe that there is a risk in just using software under GPL or AGPL licenses (even without modifying it).
For the avoidance of doubt, the owners of this software licensed under an AGPL 3.0 license wish to make a clarifying public statement as follows:
"Please note that software derived as a result of modifying the source code of this software in order to fix a bug or incorporate enhancements is considered a derivative work of the product. Software that merely uses or aggregates (i.e. links to) an otherwise unmodified version of existing software is not considered a derivative work, and therefore it does not need to be released as under the same license, or even released as open source."