Understanding Command Key and Command Payload

Understanding Command Key and Command Payload

Commands executed in Zoho IOT applications send a payload as a JSON message containing essential information. A command key within the payload enables the edge device to identify the specific command and trigger the appropriate actions.
Note: This command key is based on the name defined during the programming of the edge device. Altering the key values can result in device malfunction or unintended behaviour.

Example: Consider this basic JSON payload sent to the edge device.


Configuring Command Key

When creating a command, the command key is specified in the Command Key field. You can configure the command key in two ways: as a Direct Parsing String or as an Edge Key.

Direct Parsing String

The Direct Parsing Key refers to the key used in the JSON message's key-value pair.
For example, if "power" is entered in the Command Key field, the following JSON message will be generated when the command is executed.



Edge Key Parsing

Edge Parsing is similar to Direct String Parsing, but with an added information: the edge key specified in the edge name field of an instance (device, asset, location) is prefixed to the generated JSON message.
For instance, if "power" is used as the command key and "ac_1" as the edge name, the resulting JSON file will include the edge name to the key, forming "ac_1.power", and this payload will be sent to the edge device.
 




Learn More about Edge Keys.

Values

Values in the JSON message are determined by the command executed. The generated value can be Boolean, Decimal, Integer, or Percentage, depending on the user's configuration of the command.
 
For example, consider a payload for controlling the speed of a smart fan. In this, a command uses a command key: set_speed and slider input type with the following configurations: Slider Datatype is set to percentage, the minimum value is 10%, the maximum value is 100%, and the increments are in steps of 10%. When the command is executed with the slider set at 50%, the following payload is generated:







See Also
  1. Adding and managing commands
 


    Access your files securely from anywhere

      Zoho CRM Training Programs

      Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

      Zoho CRM Training
        Redefine the way you work
        with Zoho Workplace

          Zoho DataPrep Personalized Demo

          If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

          Zoho CRM Training

            Create, share, and deliver

            beautiful slides from anywhere.

            Get Started Now


              Zoho Sign now offers specialized one-on-one training for both administrators and developers.

              BOOK A SESSION






                          Quick Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          Offline Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal

                          Form Designer HR

                          Card Forms Food
                          Assign Forms Photography

                          Translate Forms Real Estate
                          Electronic Forms

                          Notification Emails for Forms Alternatives
                          Holiday Forms Google Forms alternative 
                          Form to PDF Jotform alternative





                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                Manage your brands on social media

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      Zoho Sheet Resources

                                                       

                                                          Zoho Forms Resources


                                                            Secure your business
                                                            communication with Zoho Mail


                                                            Mail on the move with
                                                            Zoho Mail mobile application

                                                              Stay on top of your schedule
                                                              at all times


                                                              Carry your calendar with you
                                                              Anytime, anywhere




                                                                    Zoho Sign Resources

                                                                      Sign, Paperless!

                                                                      Sign and send business documents on the go!

                                                                      Get Started Now




                                                                              Zoho TeamInbox Resources



                                                                                      Zoho DataPrep Resources



                                                                                        Zoho DataPrep Demo

                                                                                        Get a personalized demo or POC

                                                                                        REGISTER NOW


                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now









                                                                                                              • Related Articles

                                                                                                              • Understanding Parsing Keys and Payload Formats

                                                                                                                Parsing keys act as identifiers in datapoint configuration. Consider the Shelly H&T smart sensor, which monitors a room's temperature and humidity. The sensor sends data in JSON format as below: In the Zoho IOT application, you'll use the parsing key ...
                                                                                                              • Understanding Edge Keys

                                                                                                                Edge Keys in Zoho IOT Applications ensure uniqueness to resources and their corresponding data. They help to distinguish between resources that might have similar or duplicate names in the application. This feature is important in environments where ...
                                                                                                              • Understanding Command Widgets

                                                                                                                Command type widgets are used to perform actions such as On/Off, control brightness or volume, etc., on managed entities. You can choose from a list of commands created in the application and associate it with the corresponding widget. These widgets ...
                                                                                                              • Understanding Commands

                                                                                                                Zoho IOT applications enable users to execute actions on connected devices, and assets/locations using commands. These commands send instructions to the devices. For example, take an air conditioning (AC) unit in a smart home system. By using a ...
                                                                                                              • Understanding Certificates

                                                                                                                In any network where data communication occurs, authentication is crucial for establishing a secure and trustworthy communication channel. In Zoho IoT, Transport Layer Security (TLS) ensures that the data transmitted between the device and the server ...
                                                                                                                Wherever you are is as good as
                                                                                                                your workplace

                                                                                                                  Resources

                                                                                                                  Videos

                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                  eBooks

                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                  Webinars

                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                  CRM Tips

                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                    Zoho Show Resources