Values sent from virtual MQTT devices not shown in Webstation

Forum Home Forums Communicating with Devices Values sent from virtual MQTT devices not shown in Webstation

Tagged: ,

This topic contains 5 replies, has 2 voices, and was last updated by Mikhail Mikhail 6 months, 3 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4752
    Avatar
    TomasH
    Participant

    Hello!

    I have problem with communication to Webstation on Windows 10.
    I use KpMQTT modul (https://github.com/bersim/OpenKPs/tree/master/KpMQTT) and simulate mqtt devices with python scripts using paho mqtt client.

    Everything can be run on localhost:
    – MQTT broker/server mosquitto
    – Rapid SCADA (RS) Server and Communicator with KpMQTT modul configured
    – python scripts simulating MQTT devices using paho mqtt client library
    – RS Webstation

    Python scripts send MQTT messages to topic e.g. /input/601, where 601 is number of input channel of RS Communicator.
    Mosquitto and Communicator do receive these messages, but in Webstation there are not these values in our created scheme, even though we have set input channel 601 on dynamic text.

    Content of my KpMQTT_Config.xml file is:

    
    <?xml version="1.0" encoding="utf-8"?>
    <DevTemplate>
    	<MqttParams Hostname="127.0.0.1" ClientID="KpMQTTrs111" Port="1883" UserName="" Password=""/>
    	<RapSrvCnf ServerHost="127.0.0.1" ServerPort="10000" ServerUser="ScadaComm" ServerPwd="12345"/>
    	<MqttSubTopics>
    		<Topic TopicName="/input/601" QosLevel="0" NumCnl="601"/>
    		<Topic TopicName="/input/602" QosLevel="0" NumCnl="602"/>
    		<Topic TopicName="/input/603" QosLevel="0" NumCnl="603"/>
    	</MqttSubTopics>
    	<MqttPubTopics>
    		<Topic TopicName="/output/601" QosLevel="0" NumCnl="601" PubBehavior="OnChange" Retain="true" NDS="."/>
    	</MqttPubTopics>
    	<MqttPubCmds>
    		<Topic TopicName="/input/601" QosLevel="0" NumCmd="1"/>
    		<Topic TopicName="/input/602" QosLevel="0" NumCmd="2"/>
    		<Topic TopicName="/input/603" QosLevel="0" NumCmd="3"/>
    	</MqttPubCmds>
    	<MqttSubCmds>
    		<Topic TopicName="/output/601" QosLevel="0" NumCmd="10" CmdType="St" KPNum="61" IDUser="0" NumCnlCtrl="500"/>
    		<Topic TopicName="/output/603" QosLevel="0" NumCmd="10" CmdType="BinHex" KpNum="61" IDUser="0" NumCnlCtrl="501"/>
    	</MqttSubCmds>
    	<MqttSubJSs>
    		<Topic TopicName="/mesparam11" QosLevel="0" CnlCnt="1" JSHandlerPath="C:\SCADA\ScadaComm\job.js"/>
    	</MqttSubJSs>
    </DevTemplate>
    

    In minute data on RS Server on channel 601 there is always 0 value, so I don’t know, if Server receives values from Communicator. In Server log there is nothing wrong.

    For first time we run it we saw the value in Webstation scheme, but after few days we are not able to get it work and we don’t know where is the problem.

    Do you, please, know, what can be wrong or what else should be done to get it working?
    Any help appreciated.

    Tomas H.

    #4753
    Mikhail
    Mikhail
    Moderator

    Hi,
    Please post a link to a screenshot of the appropriate Device data tab of Communicator.

    #4755
    Avatar
    TomasH
    Participant

    Thanks for quick reply.
    Sure, here it is:
    https://ibb.co/614pch4
    Currently only sendind data to /input/601 topic.

    #4758
    Mikhail
    Mikhail
    Moderator

    Thanks for the screenshot.
    In the screenshot we see that /input/601 is bound to the channel #601 (because of the number in the Channel column). If there is no “15” in the UI, open the SCADA-Server shell, go to the Current Data node, open current.dat and view the current value of 601 channel. Is it 0 or “15”?

    #4765
    Avatar
    TomasH
    Participant

    In current data and also minute data the current value of 601 channel is 0. I also wrote it in first comment, it seems that Server does not receives the value from Communicator…

    #4767
    Mikhail
    Mikhail
    Moderator

    I suppose, this issue needs debugging. You can do it by yourself or contact the author of the driver on GitHub.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.