Connecting an HTTPS device

Connecting an HTTPS device

This document will help you connect to a Zoho IoT application and send payload messages using HTTPS. For this illustration, Postman will be used as the HTTPS client to send messages to the application.

The steps to establish the HTTPS connection and send payload messages are outlined below.

Creating a device instance with HTTPS connectivity

For this illustration, we will create a device called "My HTTPS Device" in the application.
  1. Access the End Application.



  2. Select Devices > Devices in the left pane.



  3. Click Add Device.



  4. You are provided with four options (or three if this is your first time adding a device). For this illustration, we will focus on two: Add Using Product Gallery (Device) and Add Using Direct API Endpoint.



    Add Using Product Gallery (Devices): The Device Product Gallery contains a list of devices with preconfigured datapoint definitions. When you select a device product and create a device instance from it, the predefined datapoint definitions are automatically imported as datapoints for that device.

    Add Using Direct API Endpoint: If your device is not available in the Product Gallery, or if you are using a computer or testing a setup, you can add the device using the Direct API Endpoint method. In this approach, datapoints must be created and configured individually.
  1. Select Add Using Product Gallery (Devices) and click Next.



  2. In the device gallery, filter, browse or search for your device product.



  3. Click on the your desired product. Here, TRB245 is selected.



  4. Click Import and Proceed.



  5. Provide the required details in the appropriate fields.Make sure HTTPS is selected as the device connectivity.
    Example:
    Model Type: Create New Model
    Model Name: Gateway HTTPS
    Name: My HTTPS Device
    Description: A test device for HTTPS connection
    Device Connectivity: HTTPS
    Device Application: Custom Application
    Data Interval : 10



    Info
    Learn more about configuring the device fields.
  6. Click Proceed.



  7. Click View Device.


You will be redirected the newly added device instance's device information page. You may be asked to choose to use the onboarding assistant. You can click Proceed to use the onboarding assistant for on-screen help; to continue with this illustration, click Close.



Next, go to the Accessing Connection Credentials section to obtain the details required to establish the HTTPS connection. 

Add Using Direct API Endpoint

  1. Select Add Using Direct API Endpoint and click Next.



  2. Provide the required details in the appropriate fields. Make sure HTTPS is selected as the device connectivity.
    Example:
    Model Type: Create New Model
    Model Name: Endpoint HTTPS
    Name: My HTTPS Device
    Description: A test device for HTTPS connection
    Device Connectivity: HTTPS
    Data Interval: 10


    Info
    Learn more about configuring the device fields.
  3. Click Add.



  4. Click Ok in the device registered successfully popup.


You will be redirected to the device's information page. You may be asked to choose to use the onboarding assistant. You can click Proceed to use the onboarding assistant for on-screen help; to continue with this illustration, click Close.



Next, go to the Accessing Connection Credentials section to obtain the details required to establish the HTTPS connection. 

Accessing Connection Credentials

Each registered device has a unique set of connection credentials that can be used to establish a connection.
  1. In the device information page, Click Actions > Connection Details


This will display the credentials required to establish connection with the Zoho IoT application.



Now that you have created your device and obtained its connection credentials, you can proceed to the Updating Credentials section. Here, you will use these credentials to establish a secure HTTPS connection with the Zoho IoT application and start sending data.

Updating the Credentials

In this illustration, we will use Postman, a commonly used HTTPS client, to connect and send data. The fields configured in Postman match those required in an HTTPS based device application.

To send messages using an HTTPS POST request, three credentials are required: the Endpoint (1), Authentication Token (2), and Device ID (3). These credentials are used to establish a secure connection with the Zoho IoT application and send messages from the device.




There are two ways to configure credentials for the HTTPS POST function:
  1. Using URL Parameters
  2. Using Headers

Using URL Params

If you're using the HTTPS client/device with parameter-based authentication, you can easily include the credentials in the URL as parameters. The URL to be used can be found in the URL Parameter Implementation section, located under the Endpoint Usage tab.

Structure for URL with Parameters:

https://<telemetry_endpoint>/?device_id=<deviceid>&device-token=<authenticationtoken>
In Postman, 
  1. Select the POST method.



  2. In Connection Details, select the Endpoint Usage section.



  3. Copy Paste URL Param Implementation into the URL field. This will automatically populate the device_id and device_token keys with their corresponding values. 







Using Header

If you're using the Header option for authentication, you can input the following values: device_id and device_token from the Endpoints section as headers into the appropriate fields. In this implementation, the strings "device_id" and "device_token" are used as the keys, while their corresponding values are treated as the actual value.

The Endpoint URL is also available and can be included in the request as part of the connection setup. This ensures a complete configuration for successful authentication and communication with the device.

In Postman, 
  1. Select the POST method.



  2. Copy and paste the Telemetry Endpoint in the URL field.




  3. Add device_id as a key and the corresponding device_id value from the Header Implementation as its value.



  4. Add device_token as a key and paste the device_token value from the Header Implementation section as its corresponding key. 





Notes
Note: Make sure the device_id and device_token strings copied from the application are not included in the value field. 

Sending payload using Postman

Once the credentials are updated, you can begin sending the payload to the Zoho IoT application from the HTTPS client/device.

For this illustration, a simple payload of {"temp": 20} is sent as a JSON object (recommended payload format) to the application.

In Postman, 
  1. Select the Body tab under the URL field. 



  2. Select raw and set the format to JSON. 



  3. Enter the payload.



  4. Click Send. If the credentials are provided correctly, a success message will be displayed. 



Viewing the payload in the Application

With the message sent by the client/device, in this illustration through postman, it can be viewed in the application. 

To view the sent messages,
  1. In the device information page, select the Messages tab.



  2. Toggle to Historic Messages. The received messages will be displayed.





  3. Use the refresh button to update the list with new messages.



  4. To view messages in real time, toggle to Live Messages and click Start Listening.



With the messages received, you can parse the values by creating datapoints and then build dashboards to visualize the data.





        Create. Review. Publish.

        Write, edit, collaborate on, and publish documents to different content management platforms.

        Get Started Now


          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 LinksWorkflow AutomationData Collection
                                Web FormsEnterpriseOnline Data Collection Tool
                                Embeddable FormsBankingBegin Data Collection
                                Interactive FormsWorkplaceData Collection App
                                CRM FormsCustomer ServiceAccessible Forms
                                Digital FormsMarketingForms for Small Business
                                HTML FormsEducationForms for Enterprise
                                Contact FormsE-commerceForms for any business
                                Lead Generation FormsHealthcareForms for Startups
                                Wordpress FormsCustomer onboardingForms for Small Business
                                No Code FormsConstructionRSVP tool for holidays
                                Free FormsTravelFeatures for Order Forms
                                Prefill FormsNon-Profit

                                Intake FormsLegal
                                Mobile App
                                Form DesignerHR
                                Mobile Forms
                                Card FormsFoodOffline Forms
                                Assign FormsPhotographyMobile Forms Features
                                Translate FormsReal EstateKiosk in Mobile Forms
                                Electronic Forms
                                Drag & drop form builder

                                Notification Emails for FormsAlternativesSecurity & Compliance
                                Holiday FormsGoogle Forms alternative GDPR
                                Form to PDFJotform alternativeHIPAA Forms
                                Email FormsFormstack alternativeEncrypted Forms

                                Wufoo alternativeSecure Forms

                                TypeformWCAG

                                  Zoho FSM Video Tutorials


                                        All-in-one knowledge management and training platform for your employees and customers.

                                                  Create. Review. Publish.

                                                  Write, edit, collaborate on, and publish documents to different content management platforms.

                                                  Get Started Now




                                                                    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


                                                                          • Desk Community Learning Series


                                                                          • Digest


                                                                          • Functions


                                                                          • Meetups


                                                                          • Kbase


                                                                          • Resources


                                                                          • Glossary


                                                                          • Desk Marketplace


                                                                          • MVP Corner


                                                                          • Word of the Day


                                                                          • Ask the Experts


                                                                            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 Demo

                                                                                                              Get a personalized demo or POC

                                                                                                              REGISTER NOW


                                                                                                                Design. Discuss. Deliver.

                                                                                                                Create visually engaging stories with Zoho Show.

                                                                                                                Get Started Now








                                                                                                                                    • Related Articles

                                                                                                                                    • Configuring fields: Device products

                                                                                                                                      This document provides a detailed overview of the various fields you will encounter when creating a custom device product in the Zoho IOT application. The field values specified during the configuration of a device product are not permanent ...
                                                                                                                                    • HTTPS Telemetry Cases

                                                                                                                                      Zoho IoT provides a dedicated endpoint for specific communication needs while using the HTTPS protocol for device connectivity. The typical structure for an endpoint in HTTPS configurations used in Zoho IoT is : https://<app_url>/v1/iot/<endpoint> To ...
                                                                                                                                    • Understanding Device Application

                                                                                                                                      A device application refers to the software layer running on a physical gateway device that connects to the Zoho IoT application. When registering a gateway device in Zoho IoT, users must specify the type of device application running on it. This ...
                                                                                                                                    • Device Action: Simulator

                                                                                                                                      Zoho IoT applications come equipped with an inbuilt simulator designed to help users simulate data. The simulator is an essential tool when the actual physical device is unavailable. It allows users to replicate the data sent by the device, enabling ...
                                                                                                                                    • Adding a LoRa Device (LoRa Node)

                                                                                                                                      Adding a device for your LoRa node in the Zoho IoT application allows you to represent and manage it in the application. There are two ways to add a LoRa device in Zoho IoT applications: Add Using Product Gallery. Add By Defining your Own Device ...
                                                                                                                                      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