The MQTT server is receiving the Info, just not passing it into tags

hi,
I have connected to the mosquitto broker successfully with MQTT Engine and have also created a new namespace custom but when i check the tag browser no tag in created. when i check the log in Provider Logs in TRACE i can see some error as given below.the message i .json format .i have enabled json payload when creating custom namespace

“internaljson 28Dec2020 00:59:07 [MQTT Engine] Saved redundancy version: VersionToken [stateId=052d06bc-0359-4715-af06-df9bd02a7f92, revision=2221, versionDetailsClass=null]”
can any one please help in this issue

@arjunrajas, welcome to the Ignition forums! Can you share more information on your custom namespace configuration?

One key in the example below may be the wildcard in the subscription. Without it, it will only subscribe to the specific topic[s] declared. Subscribing to Custom1/# in the configuration allows publishing to new root-level tags such as Custom1/foo in my example.

hi @kcollins1 DABAC1/Inverter/Periodic this is my topic which i have created in mosquitto
i have attached the namespace configuration screen image and the json which is coming from
mosquitto

That looks like it should work just fine. The tags will be created under [MQTT Engine]cms/DABAC1/Inverter/Periodic, and only when a new message is published to that topic. What versions of Ignition and MQTT Engine are you running?

I am using Ignition 8.0.16 and MQTT engine 4.0.5

Okay, make sure that you’re looking under the MQTT Engine provider for your tags, e.g.:
2020-12-28 at 2.20 PM

Past that, other things to check is whether your MQTT Server connection is healthy and whether the credentials you’re using have read access to that topic namespace. Is there anything else notable in the logs (you should be able to reset the log levels on that internaljson component)?

“credentials you’re using have read access to that topic namespace”. what is this where to check this ?

The main reason I ask about this is that some of the recent changes in the out-of-box-configuration of Mosquitto 2.0 affect authentication and host interface binding. What to check here is variable based on what you’ve done to configure Mosquitto. If you’re running it on the same machine as the gateway, then it will bind to localhost adapter (which is okay) and allow anonymous connections (any other configuration requires you to explicitly enable anonymous connections).

First thing I would check is the connection status of your MQTT Engine server definition:

You should also see confirmation of the connection (and not much else if everything is working properly) in the gateway logs:

Finally, if you enable Debug on com.cirruslink.mqtt.engine.gateway.json logger component, you’ll be able to see handling of the JSON payload when a message is published to your custom namespace (that you’ve configured in MQTT Engine):

Obviously if you’ve got other things going on in your logger, those might help point you in a good direction for additional troubleshooting. Also, you might cross-check your messages coming into your broker by independently subscribing with an MQTT test tool such as MQTT.fx.

Hope this helps!

There i no probem in the connection .but in “com.cirruslink.mqtt.engine.gateway.json”
i get some error which i have given below

when i expand i get error log as given in the below image

Ahhh, looks like it is indeed having trouble parsing the payload as valid JSON. Are you able to paste a full message payload example here (including that unrecognized token)? Just surround the contents with the three backticks (```) like below:

```json
[ “JSON CONTENT HERE” ]
```

This way it will render it nicely, like below:

[ "JSON CONTENT HERE" ]

thanks @kcollins1 the values r publishing as tags now thank you very mush on your support

1 Like