Forum Home › Forums › Communicating with Devices › How to setup MQTT in V6
Tagged: mqtt v6
- This topic has 5 replies, 2 voices, and was last updated 2 years, 2 months ago by
Mikhail.
-
AuthorPosts
-
August 1, 2023 at 5:28 am #13124
reha
ParticipantHi,
before asking help I tried to follow the forum messages and internet but unfortunately, I could not find a very simple/stepByStep example for MQTT Client setup for V6. The only document I could find was a youtube video but it uses older version of MQTT (KpMQTT driver for Rapid SCADA). Till now,
1) I could setup the client connection to my MQTT server with “best guess approach” . it looks working
2023-08-01 07:53:21 Start communication line [1] MQTTCommLine
2023-08-01 07:53:21 Connect to xxx.yyyy.zzz:1883
Connected successfully
2) I could not define the device properly
+—+——+——+——-+———+
[1] MQTTDevice
Driver : DrvMqttClient 6.0.0.3
Status : Undefined
Session time : Undefined
Command time : Undefined
3) At the device properties, I defined a root topic at OPTIONS section
4) I added a subscription under Subscriptions using wizards but I could not assign a name , now it shows “Unnamed subscription”So my questions:
1) is there any guide for MQTT Client setup for V6
2) is it normal that I cant assign name to Subscription (i.e. Unnamed Subscription)many thanks in advance, reha
August 1, 2023 at 8:49 am #13127Mikhail
ModeratorHi,
1) Not yet, we can help you on the forum. The most important is establishing a connection. You already done it.
2) It’s weird.
Root topic can be blank for testing.
This image contains a subscription example https://ibb.co/0X1g0Qs
How do you enter a subscription name?August 1, 2023 at 9:19 am #13132reha
ParticipantHi Michael,
thank you so much for your help..
1) I see, I may be able to contribute for this “when suceeded”
2) a) just clicked to “+” sign at top left,
b) it created new entry under the Subcsriptions category
c) new entry shown as “unnamed subscirption” and I could not find way to change the name
d) at right part of the panel, there are entries like “advanced parameters, Main Parameters, Protocol” .. and I have no idea what to enter for these parametersSo, in short, I could not find way to modify subscription name 🙁
August 1, 2023 at 9:22 am #13133reha
ParticipantHi again
now I realised, how to modify the name.. But still I need help for the rest of the fields.. So that I can adjust the other end (i.e. MQTT data).. thanks, rehaAugust 2, 2023 at 7:55 am #13150reha
ParticipantHi Mikhail,
thank you so much again, because your question (How do you enter a subscription name?) remind me to revisit the definition file and it worked. So, answer to my questions (may help to somebody like me)
1) when definitions are finished and uploaded and connection to MQTT server successful, Device status is still UNKNOWN. It doesnt mean something wrong. It only means that “no data received till that moment”. When 1st data received, Device status shown as NORMAL.
2) name of the issue with “Unnamed subscription”.. When subscription defined, following parameters may help..
— Display Name: is the field to update for subscription name
— TAG Code is the connection with data element
— TOPIC is the name of the topic to fetch the data
3) for testing, if you have mosquitto already installed, following command sends the test data:
mosquitto_pub -t ‘SCADA’ -m ’33’regards, reha
August 2, 2023 at 11:30 am #13157Mikhail
ModeratorHi,
Thank you for sharing your solution!
-
AuthorPosts
- You must be logged in to reply to this topic.