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
Solved! Go to Solution.
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
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.
