Documentation
Integrations / Connection guides / Kepware KEPServerEX
Kepware KEPServerEX
We integrate seamlessly with Kepware (part of PTC) its main product KEPServerEX. KEPServerEX can be used to connect (mainly over OPC) and control diverse automation devices and software applications.
Kepware IoT Gateway
The Kepware IoT Gateway can be configured to setup agents. These agents can be used to send data from tags configured within Kepware to Blockbax.
Prerequisites
To work with this built-in integration you will need:
- A Blockbax project
- KEPServerEX installed
Steps
To setup an agent do the following:
- Click on “Add Agent” under “IoT Gateway” or click on the “Add new agent button” in the toolbar
- Type in a
Name
for the “Agent” and set the “Agent type” toMQTT Client
and click on “Next” - Configure the MQTT Client Broker
- Set the URL to:
ssl://mqtt.blockbax.com:8883
- Set the topic to
v1/projects/<YOUR_PROJECT_ID>/integrations/351d7e1d-e057-4e43-b96d-1d5cc2df9b64/measurements
- Configure the rate
- Set the URL to:
- Click on “Next”
- Configure the MQTT Client Security
- Prefix the Client ID with the public ID of your access token, for example:
<YOUR_PUBLIC_ID>-KepwareAgent
- Configure the
username
to the public ID of your access token - Configure the
password
to the secret of your access token
- Prefix the Client ID with the public ID of your access token, for example:
- Click on “Finish”
After creating the agent we need to specify the message it should send to Blockbax:
- Double click on the Agent you have just created
- The ‘Property Editor’ panel will pop up, in the left side of panel select the ‘Message’ tab
- Click on the dropdown menu next to ‘Message Format’ and select ‘Advanced Template’
- Double click on ‘Template’ and substitute the code in the editor with the following code:
{
"autoCreateSubjects": "true",
"series" : [
{
|#each VALUES|
"ingestionId": "|TAGNAME|",
"measurements": [
{"date": "|TIMESTAMP|", "number": |VALUE| }
]} |#unless @last|,|/unless|
|/each|
]
}
If done correctly you will successfully have setup an Agent. Within the Agent you can configure items that you want to be read out and send to Blockbax.
- Go to your Agent
- Click on “Add IoT items…", or right click in the right window and select “New IoT items”
- Double click on a Item you want to read out
- Configure the “Scan rate”
- Configure the “Publish” setting to either
only send on change in data
orevery scan
- Click on “Ok”
Repeat step 7 - 12 for every item you want to read out and send to Blockbax. Blockbax maps the item tags to ingestion IDs. You can test if everything works by opening Blockbax and see if the data is coming in.