====== Sending Downlink Commands to Devices ====== {{indexmenu_n>9}} Certain devices support the sending of downlink commands. Here, we explain how to send a downlink command to a device, use predefined commands for specific devices, view the history of commands exchanged with the device, and save commands for use on other devices of the same type. ===== CMD Panel in the Devices Module ====== The Devices module features a CMD panel for sending commands. By default, the panel displays: * A field named "cmd" with a dropdown menu set to "raw" * A "parameters" field with a dropdown menu offering options like "payload, port, applicationID, extDeviceID," an input field for values, and a "+" icon * A "Save commande" button * A "Send" button {{:tutorials:cmd_default.jpg?nolink&600|}} When saved commands exist, the panel displays a "customCMD" dropdown menu followed by a "New" button". You can either chose a pre-existing command, view it, modify it if needed by clicking on the "pen" icon, and then send or save it. Or create a new command. {{:tutorials:cmd_predifined.jpg?nolink&600|}} {{:tutorials:cmd_custom.jpg?nolink&600|}} For certain devices (e.g., TEK766, SI-11), where IOT Factory has implemented decoders and downlink commands, we provide specific interfaces to assist in creating commands while still allowing the option to send raw commands. {{:tutorials:cmd_by_iotfactory.jpg?nolink&600|}} ===== Command History ===== The second part of the panel displays a list of sent commands and their responses, along with technical exchanges from the device, which are categorized in this stream. A search box allows you to filter the results. {{:tutorials:cmd_history.jpg?nolink&600|}} ===== How to Save a Downlink Command ===== To save a downlink command, follow these steps: - Select the "payload" parameter and enter its value. - Click the "+" icon to add the "payload" parameter to the command. - Select the "port" parameter and enter its value. - Click the "+" icon to add the "port" parameter to the command. - Click the "Save commande" button. A dialog box will open, allowing you to enter a name and description for the command. The registered order can be used for all devices of this type. {{:tutorials:cmd_new.jpg?nolink&600|}} {{:tutorials:cmd_edition.jpg?nolink&600|}} You can utilize saved downlink commands in the [[advancedconfiguration:rules|Rules modules]] when an alert is activated, or manually send them to your devices [[tutorials:command_widget|using the command widget]].