Geir

Exor JMobile MQTT problem

2 posts in this topic

Hi,have anybody managed to put data from a MQTT source on a JMobile touchscreen?  I have managed to get the HMI to send data from the PLC to the MQTT broker, but not the other way. Under Tags I have made a couple of Variables:prot2  QT04_Fukt TT03_Temp of type string [8], under MQTT I have most likely the correct IP and port since I can send data. In the "Data(sub) tab the topic is esp32/mqtt/data Payload [ { "tagName": "${tagName}", "value": "${value}" } ]  The data going through the broker looks like this: Client mosq-a3kUbQ8rf0VD4TIZuw received PUBLISH (d0, q0, r0, m0, 'esp32/mqtt/data/ [{"tagName": "QT04_Fukt", "value": 29 },{"tagName": "TT03_Temp", "value": 25 }]', ... (5 bytes))

According to the online help things should look like this

To match an incoming message like:

[ { "tagName": "Tag1", "value": 1 }, { "tagName": "Tag2", "value": 2 } ]

you can use pattern:

[ { "tagName": "${tagName}", "value": "${value}" } ]

Is this supposed to parse the JSON input, or do I have to maka any other links to the JMobile tags?

Geir

Share this post


Link to post
Share on other sites

Found out the problem was with the source data, had to move a comma in the testdata the esp32 was generating, it looked OK in mosquitto_sub but the Exor could not parse it....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now