ODONADO

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Send data to rapid Scada through JSON MQTT Message #8216
    ODONADO
    Participant

    Hi, Thanks for your answer.

    Let me explain better. In the config file (image 1) I subscribe to channel 600 and 601 by the topics /mesparam1 and /mesparam 2 respectively. When I publish a message from my cellphone (for example) to this topics the values change in the webstation without problem. Until here all is fine.

    The problem is when I try to send a value in JSON format. How is explain on the KpMqtt driver repository at the end of the page, a JSON format message like {“Num”:600,”Val”:200.3,”Stat”:0} is possible by the javascript script (job.js), and in the config file it’s specify in the <MqttSubJSs> node, where the topic is /mesparam11, so, when I publish a JSON format message from my cellphone to this /mesparam11 topic, I see that the value is recognize because the script responds to /mesparam10 topic with the new value (imgage 3), but in the webstation doesn’t change. Time later, there is a new automatic publish from /mesparam10 topic but with the old value, confirming that the value didn’t change.

    So, I understand this: channel 600 and 601 changes when receive a valid message from /mesparam1 and /mesparam2 topics and this is why the first procedure works, but the script when receive a message from /mesparam11 topic, it recognize the value, but doesn’t change in the webstation because the script publish the new value to /mesparam10 topic and it should publish to /mesparam1 topic to make the change, simulating the first procedure, so maybe there is a failure in the script.

    That is what I think, but I don’t know if my config file is wrong or maybe I’m omitting steps to setup the use of JSON format messages.

    Thank you very much

Viewing 1 post (of 1 total)