contact@webdyn.com | webdyn.com
V2.05 subject to changes | Webdyn © by Flexitron Group
5. Commands
5.1 Principle
It is possible to send commands to the WebdynSun PM. They allow you to perform tasks remotely for
conguration, control or monitoring purposes. For example: launching a search for equipment, obtaining
the current conguration, triggering a connection to the IS, etc. The same mechanism also makes it
possible to invoke a function of a script installed on the concentrator.
5.2 How it Works
An order can be sent via three distinct methods:
• A command le deposited on the server (FTP, SFTP or WebDAV) which will be retrieved by the
concentrator during the SI connection.
• An MQTT message posted on the WebdynSun PM control topic.
• An SMS sent to the WebdynSun PM SIM card.
5.2.1 Command le
During an FTP, SFTP or WebDAV connection, the WebdynSun PM checks for the presence of a command
le in the directory congured for this purpose (/CMD by default). This le must be named <uid>_cmd.
json where <uid> is the gateway identier. The commands included in it are in the JSON format described
below and are executed in order. Invocation of script functions is also supported. The le is deleted after
import so as not to process the same order twice.
The results of commands are also written in les which will be deposited during the next SI connection.
A le can contain one or more results. These are named according to the <uid>_ACK_<timestamp>.json
pattern.
For an FTP, SFTP or WebDAV connection, the commands work only on server 1; the commands
placed in the “/CMD” directory on a server 2 (backup) are not taken into account by the concentrator.
5.2.1.1 Command le JSON format
The format used for commands and invocations of script functions is as follows:
[{
“rpcName”:”<nom du script>.<nom de la fonction>”,
“parameters”:{ <paramètres de la fonction au format json> },
“callerId”:”<identiant commande 1>”
},
{
“rpcName”:”<nom du script>.<nom de la fonction>”,
“parameters”:{ <paramètres de la fonction au format json> },
“callerId”:”<identiant commande 2>”
},
…
]