Send a Command through MQTT

Forum Home Forums Communicating with Devices Send a Command through MQTT

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #3027
    rick-pit
    Participant

    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/cwBjhG

    With 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=1

    #3029
    Mikhail
    Moderator

    Hi,
    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\Log

    I recommend to increase timeouts of the device to make communication slower while testing.

    #3030
    Mikhail
    Moderator

    Now 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/6

    #3032
    rick-pit
    Participant

    Oh, that explain a lot. Thanks Mikhail

    #3040
    Mikhail
    Moderator

    The author has implemented commands. See the GitHub issue for details.

    #3041
    rick-pit
    Participant

    i see it. thanks for your support too

    #3042
    rick-pit
    Participant

    Im 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?

    #3044
    Mikhail
    Moderator

    I think, it better to ask the author by creating an issue on GitHub.

    #3046
    rick-pit
    Participant

    you are right i will

    i just want to confirm a expected behaviour in other communication lanes. thanks

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.