Forum Home › Forums › Communicating with Devices › Problem with MQTT Client
Tagged: mqtt
- This topic has 14 replies, 2 voices, and was last updated 11 months, 1 week ago by Mikhail.
-
AuthorPosts
-
May 15, 2023 at 10:32 am #12600ArunRuchirParticipant
I have gone through all possible topics on this forum for MQTT configuration and have configured the MQTT client exactly as per that. Using the latest 6.0 MQTT drivers and they are visible in the driver list.
Unfortunately, I am not getting any data on the input side (Subscription). Neither I am able to send any data (Publish).
Some configuration details are
– MQTT client
– DrvDsMQTT is visible as an MQTT data driver but not getting used
– 2 channels configured for the subscription
– 1 channel configured for publishing.
Driver: DrvMqttClient 6.0.0.1
Status: Undefined
Session time : undefined
Command time : Undefined
Session (total/errors) : 0/0
request (total/errors) : 0/0
Current data – Value – —Please help.
- This topic was modified 11 months, 2 weeks ago by Mikhail.
May 15, 2023 at 11:44 am #12609MikhailModeratorHello,
To get data from MQTT broker, you need DrvMqttClient driver.
Could you provide links to the screenshots of the project settings and communication line log?May 16, 2023 at 4:50 am #12615ArunRuchirParticipantHi,
While DrvMqttclient is available in the Driver list, it’s not getting defined in data sources.
Please help.Thanks.
May 16, 2023 at 10:45 am #12617MikhailModeratorHi,
A screenshot of communication line log is missed. On the page “Line 4 Stats”, select “Line Log”.
May 17, 2023 at 3:51 pm #12634ArunRuchirParticipantHi,
Updated file with screenshot enclosed.
May 18, 2023 at 10:44 am #12637MikhailModeratorHi,
After the connection is established successfully, you will get new data when topics change, and the device status will change to normal. New data will be written in communication line log.May 19, 2023 at 5:22 am #12646ArunRuchirParticipantDear Mikhail,
As per your response, I believe my configuration is OK, but I am still not getting any MQTT message.To test the same, I did following
– Rapidscada server is running on my Laptop
– On the same Laptop, I created an MQTT Broker using MQTT Explorer. It got connected on 127.0.0.1
– I am also running MQTT-Fx and connecting to this broker.
– Now my devices are ArunM1- subscribing to topic TestM1
and ArunM2 subscribing to topic TestM2.When I publish a value on TestM1 or TestM2 topic using MQTT Explorer, I am able to subscribe and see these values in MQTT-fx but not coming in Rapidscada.
Screenshots are enclosed. Can you please help?
https://docs.google.com/presentation/d/1u9MJDspx_sv5EgmsYYDnEz6tExtMvluq/edit?usp=sharing&ouid=109046646427669848489&rtpof=true&sd=trueMay 19, 2023 at 9:11 am #12649MikhailModeratorHello,
Could you add a screenshots of Device 4 Properties – Options?
If you try the same on public broker broker.mqtt-dashboard.com, does it work or not?May 19, 2023 at 11:04 am #12651ArunRuchirParticipantDevice 4 Properties — Options screen shots enclosed.
Regards
ArunMay 19, 2023 at 2:56 pm #12652MikhailModeratorCan’t find a screenshot where the
Options
node is selected.May 19, 2023 at 3:51 pm #12654ArunRuchirParticipantPlease refer to slide nos 6 of my recent deck. I suppose I had shared it earlier.
If I am still missing, pls share any reference screen shot and I will reshare that part.
Thanks for your help. I am really looking forward to a solution to this.
Regards
ArunMay 19, 2023 at 5:25 pm #12655MikhailModeratorI suggest trying broker.mqtt-dashboard.com for testing.
May 20, 2023 at 5:37 am #12658ArunRuchirParticipantThanks, Mikhail,
It’s working now. The only problem was the Root topic. Once I deleted that, MQTT communication started.Thanks and regards
ArunMay 20, 2023 at 6:04 am #12659ArunRuchirParticipantHi Mikhail,
Can you please help me with the Command code for MQTT command? I think I am making some mistakes and it’s all going into error.
Invalid Command
May 22, 2023 at 7:28 am #12669MikhailModeratorHi,
I recommend use the same Tag Code and Topic parameters.
You don’t need to create commands under the Command node.
If a subscription is created and not read only, a value can be published. -
AuthorPosts
- You must be logged in to reply to this topic.