cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Using Influx to store Value Stream properties from Kepware in ThingWorx 8.4

Using Influx to store Value Stream properties from Kepware in ThingWorx 8.4

Objective

Use Influx as a database to store data coming from Kepware ThingWorx Industrial Connectivity server

 

Prerequisite

Configure ThingWorx connection to Kepware’s KEPServerEX  and bind tags that exist in KEPServerEX to things in the ThingWorx model as referenced in Industrial Connections Example

 

Configuration Steps

1. Create database in Influx for ThingWorx:

Connect:
   influx -precision rfc3339
> SHOW DATABASES

> CREATE DATABASE thingworx

 

2. Create Influx Persistence Provider

 

influx1.PNG

 

and configure

influx2.PNG

 

3. In the Industrial Thing where the Remote Properties are bounded define Value Stream

 

influx3.PNG

 

and make sure to have Persistence Provider set to Influx and is set to Active

 

influx6.PNG

 

4. In the Value Stream Properties and Alerts define the mappings using Manage Bindings to specify what properties are to be stored in this value stream

 

influx4.PNG

 

5. Save it and test it to make sure properties are stored in Influx:

> use thingworx

> show measurements

  name
  ----
  Channel1.Device1

> show field keys on thingworx from "Channel1.Device1"

> select Channel1_Device1_Tag2 from "Channel1.Device1"

  name: Channel1.Device1
  fieldKey fieldType
  -------- ---------
  Channel1_Device1_Tag10 integer
  Channel1_Device1_Tag11 integer
  Channel1_Device1_Tag12 integer
  Channel1_Device1_Tag13 integer
  Channel1_Device1_Tag14 integer
  Channel1_Device1_Tag15 integer
  Channel1_Device1_Tag16 integer
  Channel1_Device1_Tag17 integer
  Channel1_Device1_Tag18 integer
  Channel1_Device1_Tag19 integer
  Channel1_Device1_Tag2 integer
  Channel1_Device1_Tag20 integer
  Channel1_Device1_Tag21 integer
  Channel1_Device1_Tag3 integer
  Channel1_Device1_Tag4 integer
  Channel1_Device1_Tag5 integer
  Channel1_Device1_Tag6 integer
  Channel1_Device1_Tag7 integer
  Channel1_Device1_Tag8 integer
  Channel1_Device1_Tag9 integer

 

shows data stored in Channel1_Device1_Tag2:

>select Channel1_Device1_Tag2 from "Channel1.Device1"

  2019-02-20T16:26:13.699Z 8043
  2019-02-20T16:26:14.715Z 8044
  2019-02-20T16:26:15.728Z 8045
  2019-02-20T16:26:16.728Z 8046
  2019-02-20T16:26:17.727Z 8047
  2019-02-20T16:26:18.725Z 8048
  2019-02-20T16:26:19.724Z 8049
  2019-02-20T16:26:20.722Z 8050
  2019-02-20T16:26:21.723Z 8051
  2019-02-20T16:26:22.722Z 8052