Forum Home › Forums › Communicating with Devices › Send a Command through MQTT
Tagged: mqtt
- This topic has 8 replies, 2 voices, and was last updated 6 years, 2 months ago by rick-pit.
-
AuthorPosts
-
January 6, 2018 at 8:15 pm #3027rick-pitParticipant
Hi, im configuring MQTT plugin and i can receive data succesfully. My next step is be able to turn ON-OFF something connected thought MQTT subscribe to a specific topic in this case “/output/508”.
I upload pictures of my current configuration:
https://ibb.co/kSuFpw
https://ibb.co/gKD89w
https://ibb.co/cMZtbb
https://ibb.co/jgCeGb
https://ibb.co/mXi89w
https://ibb.co/bs889w
https://ibb.co/nLd89w
https://ibb.co/jcdVNG
https://ibb.co/cwBjhGWith this i dont have any output in the configured Publish Topic after execute command (i asume this is the expected behaviour, if is not that help me to understand with information about configure a command) The only info i receive through the output channel of the switch (dynamic picture with ON/OFF images) are the same value received through the input channel (i can display the right image after receive value on the input channel). Maybe i missunderstood something but i cant find information about it to make validations of my settings.
Please help me.
ScadaCommSvc Log
——————————————————————————–
——————————————————————————–
2018-01-05 15:13:49 <WIN-7-R><SYSTEM><ACT> ScadaCommService 5.1.0.1 is started
2018-01-05 15:13:49 <WIN-7-R><SYSTEM><ACT> Load device library: KpModbus.dll
2018-01-05 15:13:49 <WIN-7-R><SYSTEM><ACT> Load device library: KpOpc.dll
2018-01-05 15:13:49 <WIN-7-R><SYSTEM><ACT> Load device library: KpSms.dll
2018-01-05 15:13:49 <WIN-7-R><SYSTEM><ACT> Load device library: KpEmail.dll
2018-01-05 15:13:49 <WIN-7-R><SYSTEM><ACT> Load device library: KpSnmp.dll
2018-01-05 15:13:49 <WIN-7-R><SYSTEM><ACT> Load device library: KpMQTT.dll
2018-01-05 15:13:50 <WIN-7-R><SYSTEM><ACT> Connect to SCADA-Server “localhost”
2018-01-05 15:13:50 <WIN-7-R><SYSTEM><ACT> Start communication lines
2018-01-05 15:13:50 <WIN-7-R><SYSTEM><ACT> Start receiving commands
2018-01-05 15:15:08 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=1
2018-01-05 15:15:12 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=1
2018-01-05 15:15:13 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=1
2018-01-05 15:15:20 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=508
2018-01-05 15:15:24 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=508
2018-01-05 15:15:41 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=1
2018-01-05 15:41:29 <WIN-7-R><SYSTEM><ACT> The command is received from SCADA-Server: type=Standard, device=61, number=3
2018-01-05 15:45:49 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=1
2018-01-06 15:50:57 <WIN-7-R><SYSTEM><ACT> The command is received from SCADA-Server: type=Standard, device=61, number=3
2018-01-06 16:59:57 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=1
2018-01-06 17:00:05 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=1
2018-01-06 17:11:00 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=1
2018-01-06 17:11:04 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=2
2018-01-06 17:11:07 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=3
2018-01-06 17:11:09 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=3
2018-01-06 17:11:21 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=2
2018-01-06 17:11:24 <WIN-7-R><SYSTEM><ACT> The command is received from file: type=Standard, device=61, number=1January 7, 2018 at 7:04 am #3029MikhailModeratorHi,
Thank you for the description.
I’d like to ask you for 1 extra screenshot:
When you send a command there should be a appropriate line in the communication line log: https://ibb.co/mXi89w
Could you scroll the log to the moment of the command and make a screenshot of this page?
You can also find the log files at C:\SCADA\ScadaComm\LogI recommend to increase timeouts of the device to make communication slower while testing.
January 7, 2018 at 7:09 am #3030MikhailModeratorNow I’ve opened the source of the MQTT driver and realized that the author hasn’t implemented sending commands.
I created an issue https://github.com/bersim/OpenKPs/issues/6January 7, 2018 at 5:39 pm #3032rick-pitParticipantOh, that explain a lot. Thanks Mikhail
January 18, 2018 at 11:33 am #3040MikhailModeratorThe author has implemented commands. See the GitHub issue for details.
January 18, 2018 at 2:19 pm #3041rick-pitParticipanti see it. thanks for your support too
January 20, 2018 at 2:00 pm #3042rick-pitParticipantIm using binary and standart acommand and they seems great. But i dont see any output from execute. Im assuming i should receive a const or something similar, maybe its not the way it works (i didnt use others communication line yet), can you help me?
January 23, 2018 at 11:41 am #3044MikhailModeratorI think, it better to ask the author by creating an issue on GitHub.
January 23, 2018 at 11:56 am #3046rick-pitParticipantyou are right i will
i just want to confirm a expected behaviour in other communication lanes. thanks
-
AuthorPosts
- You must be logged in to reply to this topic.