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

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

MQTT and Kepware server

NN_14462184
3-Newcomer

MQTT and Kepware server

At the moment I have a small problem when getting the data from MQTT.

I understood that Kepware can get the message from MQTT based on the JSON format, but when that format is not in the JSON, what should I do? 

For example, If my MQTT has a topic is "homeassistant/binary_sensor/IPC1" and the message of the topic is a string like 99-99-99-99 (not in the JSON format), how can I get the string 99-99-99-99 in Kepware? Any ideas?

here is the picture for more understanding of my situation

NN_14462184_0-1768363170944.png

 

ACCEPTED SOLUTION

Accepted Solutions
MKhatri
15-Moonstone
(To:NN_14462184)

Greeting!!

You’re right that Kepware’s MQTT Client driver is designed to parse JSON payloads into tags. But if the payload isn’t JSON (e.g., a plain string like 99-99-99-99),
you can still read it verbatim in a tag by using the driver’s special #Payload selector


Channel

Driver: MQTT Client
Configure the broker (host, port, TLS, credentials) as usual.

 

Device

Add a device under that channel (defaults are fine).

 

Tag

Add a new static tag:

Name: IPC1_RawPayload (any name you like)
Address: homeassistant/binary_sensor/IPC1#Payload
Data Type: String 

Regards,
Mohit

View solution in original post

2 REPLIES 2
MKhatri
15-Moonstone
(To:NN_14462184)

Greeting!!

You’re right that Kepware’s MQTT Client driver is designed to parse JSON payloads into tags. But if the payload isn’t JSON (e.g., a plain string like 99-99-99-99),
you can still read it verbatim in a tag by using the driver’s special #Payload selector


Channel

Driver: MQTT Client
Configure the broker (host, port, TLS, credentials) as usual.

 

Device

Add a device under that channel (defaults are fine).

 

Tag

Add a new static tag:

Name: IPC1_RawPayload (any name you like)
Address: homeassistant/binary_sensor/IPC1#Payload
Data Type: String 

Regards,
Mohit

Thank you, sir. This is what I am looking for. 

Announcements


Top Tags