14.5. Receiving Side

On the receiving side of this example we will accept a tunnelling connection from the sending DataHub instance, and write values to an InfluxDB database on this computer. The stored values on both InfluxDB databases (sending and receiving sides) will be identical.

Preliminaries

As with the sending side, you will need to:

  1. Ensure that the DataHub instance is installed and running on the computer where you want to receive the data.

  2. Go to the InfluxDB option and check the boxes for InfluxDB and Chronograf, and click Apply.

There is no need to run DataPid on this side.

Tunnel/Mirror

To receive the data from the sending DataHub instance you will need to ensure that Tunnel/Mirror Master is configured.

  1. In the Tunnel/Mirror option go to the Tunnel/Mirror Master section and make sure that the Accept plain-text connections box is checked.

  2. Leave the default service/port number at 4502.

  3. Click Apply.

External Historian

  1. In the External Historian option click the Add button.

  2. In the Edit Historian Connection window, configure the local InfluxDB connection as follows:

    If you have previously installed InfluxDB independently of the DataHub program installation, then you'll need to use your existing InfluxDB URL. And if you don't have a user name or password for InfluxDB, you can leave those fields blank.

    When finished, click OK and Apply. You have now created an InfluxDB database on the receiving side, and are remotely collecting a history of values for the DataPid:PID1.Mv point.

  3. As on the sending side, you can check Chronograf on this side to view updates to the InflluxDB database.

    In Chronograf, go to Dashboards and click + Create Dashboard, then + Add Data. Choose DataHubDB2.Influx2, in DataPoints choose pointname then PID1.Mv, and under Fields select value.

    The trend line for the Mv point should fill in with data from the sending side.

You can test the store and forward feature as follows:

  1. In the DataHub Tunnel/Mirror Master option uncheck the Accept plain-text connections box and click Apply.

    This simulates a network break.

  2. Look at your trend in Chronograf. You should see the data stop updating on the receiving side.

  3. After 10 or 15 seconds, recheck the Accept plain-text connections box and click Apply. The lost data should get filled in, and updates continue normally.