Actions

OPC-UA-Server

From Zenitel Wiki

ZCP IconPlatf.PNG

This article describes a Node-RED implementation (flow) for an OPC-UA server integration with the Zenitel Connect Pro Platform. The Node-RED flow makes it possible to connect OPC-UA clients to the ZCP.

For installation of Node-RED see the article: Node-Red - Installation


Installation

The following section describes the setup of the OPC-UA Server on ZCP VM (VM VirtualBox).

  1. Install the ZCP Virtual Machine (VM) image: Zenitel_Connect_VBox_x.y.z. The package is available from Jenkins. After a successful installation configure the ZCP system with stations.
  2. Install the Node-RED package for ZCP VM image: Zenitel_Connect_VM_x.y.z-node-red.swu. The package is available from Jenkins. Maybe you need to use FireFox for accessing the ZCP SW update page.
  3. Update the firewall in the ZCP. Port 1880 is used for accessing Node-RED GUI from a Browser. Port 53880 is use as the OPC-UA Server endpoint (Listening port). Port 4840 is used by OPC-UA Device Discovery.
  4. Connect to Node-RED GUI using a browser: <ZCP IP-address>:1880
  5. From the "Manage Palette" install:
    1. node-red-contrib-zenitel-opcua.
    2. node-red-contrib-zenitel-wamp-auth.
    3. node-red-dashboard.
  6. Download the OPC-UA Server implementation flow for WAMP from (https://github.com/Zenitel-AS/) and import the flow to Node-RED.


If the Node-RED package for ZCP is installed it will appear in the container status list accessible via the ZCP GUI.

ZCP Node-RED Package


The firewall of the ZCP should allow port 1880, 53880 and 4840. 1880 and 4840 are fixed while 53880 is user selectable. This port will in this setup be used as the OPC-UA endpoint (listening port).

Ports Opened for Node-RED OPC-UA


The picture below shows the necessary libraries for the OPC-UA Server

Libraries Installed from Palette



Configuration


When setting up an OPC-UA Client/Server system a OPC UA Discovery Server has to be installed too. The OPC-UA Discovery Server can conveniently be installed on the same host as the OPC-UA Server. OPC-UA Server needs to register at an OPC-UA Discover Server in order to make it visible to OPC-UA Clients. An OPC-UA Client may then ask the OPC-UA Discovery Server if any OPC-UA server is available on the desired port and the level of security supported by the OPC-UA server. The OPC-UA Discovery Server Node is available in the node-red-contrib-zenitel-opcua library.
For a .Net solution an OPC-UA Discovery Server may also be downloaded from the OPC Foundation Home Page. In that case the Node-RED OPC-UA Discovery Server should be disabled.

OPC-UA Discovery



Wamp Library Setup


Some of the WAMP library nodes need to be configured.
Double on the node "com.zenitel.calls"

Confifuration of com.zenitel.calls



Press the button with pencil icon for edit:

Confuguration of wamp.client.node



The first line is the IP-address of the ZCP. Change this if required. The protocol "wss" and port 8086 MUST not be changed.
The realm "zenitel" MUST not be changed.
Set user name and password as next. The user/password must be defined as a Link-User in ZCP.

Configuration of Event Subscription Handler


The second parameter of the "Event Subscription Handler" must be "msg.topic". Users of this node will handle the URL of the event which should be monitored.

OPC-UA Library Setup


The configuration OPC-UA library is shown below. Double click on the shown node and change the parameters. From here it is possible to configure the level of security that should be supported by the OPC-UA Server.

OPC-UA Server Configuration


The "Write Client" is used for updating the OPC-UA Server.

Write Client



The OpcUa-Client node is used for implementing subcription of changes of OPC-UA variables (nodes),

OPC-UA Handle Subscription



Connecting a OPC-UA Test Client


The free-ware OPC-UA client from UAExpert is used for testing connectivity of an OPC-UA client. It can be downloaded from "https://www.unified-automation.com/downloads.html". Connecting the client to a server is initiated by selecting the "Project" tab (or "Project" folder if the tab is not available) and right-click "Server" and select "Add".

UaExpert Start Up


Select "Custom Discovery" and "Add Server". Enter IP-address and port number for the OPC-UA Server endpoint and press "OK"

Add a Server


If the following pop-up windows is shown - just accept and press "Yes"

GetEndPoints Fails


Also, the following pop-up window should be closed by pressing "Yes".

Replace Hostname


Select signature and encryption for the connection.

Select Signature and Encryption


If the follwing pop-up window is shown press "OK".

Recently Used


Select the configured server and press the "Connect" button.

Connect Server


Set check mark in "Accept the server certificate ..." and press "Continue".

Certificate Validation


Close this pop-up window by pressing "Ignore".

Bad Certificate Host Name


Select "View" from the tool bar and "Address Space".

Select Address Space


The Zenitel Connect Pro folder is now available.

Zenitel Connect Pro Folder




Operation

This section describes how to used the OPC-UA Server to access the ZCP. The provided functionality is identical with the Zenitel Link interface and has the same structure as shown on the Swagger Page.

System

Selecting the System folder you will see the available functions.

System Folder Operations



To request and retrieve the System Platform Version you select the request (left-click) "GET System Platform Version" and drag it to the "Data Access View" tile, double click the "Value" column, set the "get_value" check mark and push the "Write" button.

Request System Platform Version


Click the "Software Version" in the "Address Space" tile and the ZCP response is available in the "Attribute" tile in the "Value" entry. The "Value" is the JSON string received from ZCP.

Read System Platform Version


The table shown below list the available function in the "System" folder, where to request the update and where to read the received data from the ZCP.

System Functions
Set Request in Retrieve Data from
GET Audio Messages Audio Messages
GET Device Account Device Accounts
GET Directory Directory
GET Groups Groups
GET Net Interfaces Net Interfaces
GET System Platform Software Version


Device


Device Functions
Set Request in Retrieve Data from
POST Key No Data



Call Handling


Call Handling Functions
Set Request in Retrieve Data from
DELETE Call Id No Data
DELETE Calls No Data
GET Call Legs Call Legs List
GET Call Queues Call Queues List
GET Calls Calls List
POST Calls No Data
POST Open Door No Data


Events


To monitor received events the "Event View" has to be added to the monitoring tile. Left click on "Document" from the menu bar and select "Add".

Add Document



In the pop-up window select document type "Event View" and press "Add".

Add Event View



A tile named "Event View" is now added to the UaExpert OPC-UA client. To Add the server to the Event Viewer - select "Server" from the "Address Space" tab and drag it to the "Event View" tab:

Add Server to Event View



To enable for instance TRACE Call event drag "TRACE Call" to the "Data Access View" and select "Value". Set the two input parameters "enabled" and "set_value" and push "Write"

Enable TRACE Calls



Make a call from one of the stations configured in the ZCP system. The call events in connection wilt he call will be listed in the "Events" tile. The "Message" column will show the JSON formatted call event as it has been received from ZCP.

Call Event Received



To display last received call event select CallEvent-AlarmText. The JSON formatted call event is displayed in "Attribute" tile in the entry "Value".

Call Event Alarm Text



The table below shows the available event that may be subscribed

Event Subscription
Set Request in Retrieve Data from
TRACE Call CallEvent
TRACE Call Leg CallLegEvent
TRACE Device Account DeviceAccountEvent
TRACE Device GPI Device_GPI_Event
TRACE Device GPO Device_GPO_Event
TRACE Open Door OpenDoorEvent


Terms and Abbreviations

OPC Open PLatform Communications
UA Unified Architecture
ZCP Zenitel Connect Pro
MediaWiki spam blocked by CleanTalk.