How can I connect to the iQunet Server via iQunet-CloudLink?

Home > Resources > Knowledge Base > How can I connect to the iQunet Server via iQunet-CloudLink?

How can I connect to the iQunet Server via iQunet-CloudLink?

 

iQunet-CloudLink synchronizes the data of your local iQunet Edge Servers via a WebRTC tunnel. The synchronized data is now available from a single access point OPC UA server (cloudlink.iqunet.com). It is possible to request data of a single or of multiple iQunet Edge Servers.

iQunet-CloudLink also makes it possible to access the iQunet data, which is synchronized from the local iQunet Edge Servers, via a MySQL proxy instead of directly via OPC UA. The MySQL proxy thus acts as a translator (wrapper) from the OPC UA (Unified Architecture) Server to MySQL.

The access procedures to the OPC UA and MySQL frontends are described below.

 

 

Set up the iQunet Server for iQunet-CloudLink

Connect to your iQunet Server via WebRTC as explained in the “How can I connect to the iQunet Server?” section. Please ensure to provide an OPC UA username and password when adding the server to the iQunet Sensor Dashboard.

Configured credentials are valid for both OPC UA and MySQL.

Remark: it is not possible to use an OPC UA username that is already in use by yourself or by any other user connected to this Server.

 

 

 

Connect to the OPC UA frontend using UA Expert

Open UA Expert and click on Server -> Add.

 

 

Double click on “Double click to Add Server” and fill out “opc.tcp://cloudlink.iqunet.com:4840/​server-abcd1234” where server-abcd1234 is your Server ID. Click OK.

 

 

 

Select the added server in the server list. Double click on it twice and select the desired encryption method. Fill out the authentication details at the bottom (note: the “Store” checkbox must be checked to be able to fill out your password). Click OK to add the server to the project. If asked, accept the server’s certificate.

 

 

Right-click on the “FreeOpcUa Python Server” added to the project and click on “Connect” if the server is not connected automatically yet.

 

 

All sensors connected to this server will appear in the Address Space.

 

 

Click on the macId of the sensor to see all possible attributes of the sensor.

 

 

In UA Expert you can see what the OPC UA router you connected to above is doing, and if there are synchronization errors or not. Check the “SyncStatus” node (Root > Objects > Server > ServerStatus > SyncStatus) for the synchronization status (see figures below):

Synchronization status:

  • idle (synchronization ok),
  • syncing (synchronizing), or
  • error.

The synchronization of the address space only starts at the first connection (via OPC UA or MySQL) i.e., when a user connects to the MySQL or OPC UA frontend.  It is thus possible that the address space is still empty at the start and that a rebrowse of the “Objects” node (see figures below) is necessary after a few seconds or minutes (depending on the connection speed). The status of this synchronization is shown in the “SyncStatus” node.

 

 

 

 

After synchronization, the “SyncStatus” will change back and forth from “syncing” to “idle” every few seconds to extract the most recent data.

 

 

Connect to the MySQL frontend

Install a MySQL client

Remark: only the MySQL client part is necessary, not the whole server environment.

After installing MySQL, use the following query to make the connection to iQunet-CloudLink:

mysql -u<user> -p<password> -h cloudlink.iqunet.com -P 5595 –ssl-mode=REQUIRED

(For windows: mysql.exe -u<user> -p<password> -h cloudlink.iqunet.com -P 5595 –ssl-mode=REQUIRED)

Where:

  • h stands for the hostname,
  • P stands for the port,
  • u stands for your username, and
  • Password for your password.

 

 

Remark: use the UA Expert OPC UA client to check which data is available on iQunet-CloudLink for a specific iQunet Edge Server (see above).

After the iQunet Edge Server has been synchronized (to check via UA Expert), the next step is to extract data via MySQL.

Remark: MySQL is a database and SQL is the query language that is used to extract the data. The proxy only supports a limited set of SQL commands (see the list of supported SQL statements at https://connect.iqunet.com/queries) or check the iQunet-CloudLink manual for examples.