Forum Home › Forums › Communicating with Devices › Values sent from virtual MQTT devices not shown in Webstation
Tagged: mqtt, Webstation
- This topic has 5 replies, 2 voices, and was last updated 5 years, 4 months ago by Mikhail.
-
AuthorPosts
-
December 19, 2018 at 1:33 pm #4752TomasHParticipant
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 WebstationPython 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.
December 19, 2018 at 2:09 pm #4753MikhailModeratorHi,
Please post a link to a screenshot of the appropriate Device data tab of Communicator.December 19, 2018 at 3:01 pm #4755TomasHParticipantThanks for quick reply.
Sure, here it is:
https://ibb.co/614pch4
Currently only sendind data to /input/601 topic.December 21, 2018 at 1:28 pm #4758MikhailModeratorThanks 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”?December 22, 2018 at 9:44 am #4765TomasHParticipantIn 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…
December 23, 2018 at 12:28 pm #4767MikhailModeratorI suppose, this issue needs debugging. You can do it by yourself or contact the author of the driver on GitHub.
-
AuthorPosts
- You must be logged in to reply to this topic.