Skip to main content
1-Visitor
March 22, 2019
Solved

Re: Manufacturing Apps reading data from MQTT

  • March 22, 2019
  • 1 reply
  • 2004 views

Hi @SebB ,

 

Per this topic:

 

We're currently using KepServerEX for the MQTT connection. 

 

In Kepware we have data tag in which one string item is in the format as shown below.

 

{
 "customer": "ABC",
 "site": "ABC",
 "department": "ABC",
 "assettype": "A",
 "asset": "A01",
 "description": "Make or Model",
 "tags": [
 
 {
 "component": "PLC",
 "tag": "MachineOn",
 "value": 1,
 "unit": "1/0-Running/Stopped"
 },
 {
 "component": "PLC",
 "tag": "Length",
 "value": 11.99,
 "unit": "km"
 },
 {
 "component": "PLC",
 "tag": "Temperature",
 "value": 45,
 "unit": "C"
 }
 
 ]
}

Since its in this json format i'm unable to use the OOTB Configuration App to directly map Machine status and other properties to the Asset. I've written a Subscription service to parse and map the corresponding properties.

 

Is there any better workaround for this. Can this heavy lifting part done at kepware side itself.

 

Regards,

saran 

Best answer by SebB

Hey @SaranKarthick 

 

you should be able to get the values out to the JSON string by using the Tag addresses in Kepware.

I never tried it by my self but in the documentation of the MQTT client for Kepware is a example that looks similar what you try to do. https://www.kepware.com/getattachment/b44c89ac-0b3b-4a22-bdd2-fa7873b38f31/mqtt-client-manual.pdf

On page 17, 18 and 19 are examples.

 

Seb

1 reply

SebB13-AquamarineAnswer
13-Aquamarine
March 26, 2019

Hey @SaranKarthick 

 

you should be able to get the values out to the JSON string by using the Tag addresses in Kepware.

I never tried it by my self but in the documentation of the MQTT client for Kepware is a example that looks similar what you try to do. https://www.kepware.com/getattachment/b44c89ac-0b3b-4a22-bdd2-fa7873b38f31/mqtt-client-manual.pdf

On page 17, 18 and 19 are examples.

 

Seb

1-Visitor
March 27, 2019

Hi @SebB ,

 

I'm now able to get the values out of json as expected. The guide was very useful. 

 

Thanks and Regards,

Saran