Connecting to UniPi via Mervis Proxy

In this tutorial, we will learn how to set the UniPi controller to use the Mervis Proxy and how to connect to the UniPi via this proxy.

In this tutorial, we will use Unipi Neuron L503.

If you followed the Prerequisites, your workspace should look like this:

Select the PLC in the Left panel and look for the Proxy Parameters section in the Properties panel.

Change the values in the section accordingly:

Since we changed the configuration of PLC, we need to upload it in order to take affect. Right click on the PLC in the Left Panel and in the context menu select the PLC Operation → PLC Setup → Upload configuration

An upload configuration dialog will appear. If you are on the same LAN as your controller, you can select UDP Broadcast, otherwise select the Use Deploy Parameters and confirm by clicking on OK.

Now we can switch into the debugging mode and check, if the connection to Mervis Proxy is working. Start Debugging and switch to the System status tab in the Main window. Look for the Proxy in the Services section. You should see the status changing between Idle and Connected, depending on the Keep-alive Period value.

To use the power of proxy connections, it is time to learn about Profiles. Profile are used in situations, where you need to switch between different settings of the Solution. In this tutorial, we need to switch between two connection parameters settings: first, when we are connecting to UniPi via local LAN and second, when we are connecting via proxy.

Every solution is automatically created with default profile, which you can see in the Left panel under the System option. To create new profile, right click on the default Profile and select Add Child Profile

A new profile called Profile will appear under the default one. Select it by clicking on it and move over to the Properties panel. Change to name of the profile to proxy.

And repeat the process for another profile and let's call it lan. You should have this workspace afterwards:

As you can see, the default Profile has colorized icon and the text is bold. This indicates the active profile. Any changes in the solution parameters will be stored into the active profile. To set another profile as active, double click on the profile name.

So double click on the proxy profile and it will become active. As you can see, the default profile is still active as well. This is due to the fact the proxy profile is a child profile of the default profile and therefor are active both.

Now we can change the connection parameters to use the proxy. Select the PLC in the Left panel and move over to the Properties panel. In the section PLC Connection Parameters change the Connection Type to Proxy.

In the section Connection parameters change the values accordingly:

  • URI: set the value to proxy.unipi.technology:12348
  • Proxy ID: fill the proxy ID which you obtained in your account on unipi.technology

Simply start the debugging session and the Mervis IDE will connect to the UniPi controller over the Mervis Proxy.

To change the connection parameters back to LAN settings simply set the lan profile active.