# Soltec Trackers

### Soltec Tracker

The purpose of this plugin is to read data from Soltec Trackers via OPCUA.

### Usage

This plugin relies on the OPCUA plugin. Make sure you have been granted access to the OPCUA plugin. You can run a `discover` without a configuration file. In this case, all the variables in the Soltec OPCUA namespace are displayed in a hierarchical tree format. If the debug is run from the command line with a debug value of `-v`, the actual values for all the namespace nodes will also be displayed. The returned tree will look something like this:

```
        Name: Objects.Ardexa.SensorField_15 namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15
            Name: Objects.Ardexa.SensorField_15.WGF34 namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34
                Name: Objects.Ardexa.SensorField_15.WGF34.Ard125 namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125
                    Name: Objects.Ardexa.SensorField_15.WGF34.Ard125.Ard125.Addr namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125.Addr
                    Name: Objects.Ardexa.SensorField_15.WGF34.Ard125.Ard125.Rotation_Value namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125.Rotation_Value
                    Name: Objects.Ardexa.SensorField_15.WGF34.Ard125.Ard125.Power namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125.Power
                    Name: Objects.Ardexa.SensorField_15.WGF34.Ard125.Ard125.Alarm namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125.Alarm
                    Name: Objects.Ardexa.SensorField_15.WGF34.Ard125.Ard125.Last_10_Temps namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125.Last_10_Temps
```

This plugin has an attached file called `EXAMPLE_ONLY__DO_NOT_USE_THIS_FILENAME_IT_WILL_BE_OVERWRITTEN.txt`. It is important **YOU DO NOT USE THIS FILENAME. RENAME IT TO SUIT YOUR STATION**. Each Soltec installation will almost certainly require a configuration file to be be developed. You can either do this manually based on the included example, or send it to Ardexa for development. Ardexa has a tool associated with this plugin that can quickly construct a configuration file(s) based on a discovery of the Soltec namespaces. If you require Ardexa to develop the configuration file(s), send the output of all namespaces to Ardexa. The Soltec server needs an authentication file. A file must be included in the `auth_file` area which must contain 2 items of information as follows:

```
    username: {whatever}
    password: {whatever}
```

The Soltec OPCUA connection string usually has a a suffix associated with it. For example, the connection string may be something like: `"opc.tcp://192.168.1.10:12686/opcua`, where `12686` is the TCP port. The `/opcua` at the end is a `suffix`.

### Arguments

* `IP Address` .. something like: 192.168.1.4
* `configuration File full path` ... this is the config file discussed above.
* `--port` This is an optional entry denoting the TCP Port of the Soltec OPCUA server. It is defaulted to `4840`
* `--namespace_index`. This is an optional entry only available when using `discover`. It is the namespace for which to discover variables. It is defaulted to `0`
* `--auth_file` ... this is the authentication file discussed above.
* `--suffix`. This is the suffix, which is set to a default of \`\`
