Onboarding the Raspberry Pi

Onboarding the Raspberry Pi

Now that you've created a device in the application, you can use the device's connection credentials to establish a secure link with the Raspberry Pi. Once this connection is successfully established, the Raspberry Pi will be able to send data directly to the application, allowing you to monitor and manage the data seamlessly.

Accessing the Connection Credentials

You can access the connection credentials with the following steps.
  1. Select Devices > Devices in the left pane.
  2. Click the name of the device you want the connection credentials for. For this illustration, My RPi( Device created in the previous step) is selected. This will open the device's information page.



  3. Click Actions > Connection Credentials. The connection credentials of that specific device will be displayed.


  4. Click Download Complete Registration Details to download the connection credentials as a text file.


Note: Keep the connection credentials tab open in your browser, as this will allow you to easily copy and paste the credentials.

Onboarding the Raspberry Pi

For users accessing the Raspberry Pi via GUI, open the terminal by clicking the terminal icon at the top. Then, follow these steps in the terminal to initialise the SDK:

In the terminal of users accessing via SSH, if 'root' is the username associated with your Mac or PC, you are accessing your computer. If 'root' represents the username and hostname of your Raspberry Pi, you are accessing your Raspberry Pi.

Note: The following commands are executed by typing or copying them in the terminal/command prompt and pressing return/Enter. Also, replace <username> with the username of your raspberry pi.
  1.  Go to https://github.com/zoho/zoho-iot-sdk-python in your browser.
  2. Click on the latest git in the Releases section.



  3. Note down the release version.



  4. Open the terminal of your Raspberry Pi if you are using the GUI, or SSH into the terminal of your raspberry pi if your are accessing it headless.
  5. Download the Zoho IOT Python SDK by executing the following command. Replace the x.x.x with latest version of the git you just noted. A zip file will be downloaded.

    curl -L -o zoho-iot-sdk-python.zip https://github.com/zoho/zoho-iot-sdk-python/archive/refs/tags/x.x.x.zip



  6. Unzip the downloaded file by executing the following command.

    unzip zoho-iot-sdk-python.zip



  7. Rename the extracted folder by executing the following command. Replace the x.x.x with latest version of the git you just noted.

    mv zoho-iot-sdk-python-x.x.x zoho-iot-sdk-python



  8. Open the dht_sample.py script in the extracted SDK folder  using nano with the following command.

    nano zoho-iot-sdk-python/examples/DHT_sensor/dht_sample.py



  9. Replace <username> with the username value in the connection credentials of the My RPi device created in the application. Also available in the downloaded txt file of the credentials.

    You can paste the values in the terminal with the following shortcut keys

    For Mac: command + v

    For Windows: cntrl + v

    For Linux: cntrl + shift + v

    Note: Make sure the values are pasted inside double quotes.



  10. Replace <password> with the password/Authentication token value in the connection credentials of the My RPi device created in the application. Also available in the downloaded txt file of the credentials.



  11. After making the changes in the file, you can exit by pressing:

    For Mac: control + x

    For Windows: control + x

    For Linux: control + x

  12. Then type "y" and press return/Enter to save the file.



  13. Then press return/Enter again to confirm the file name. Make sure the file name is dht_sample.py.



    You have now successfully updated the connection credentials in the Zoho IOT SDK for the DHT22 sensor.

  14. Open the unzipped SDK folder by executing the following command.

    cd zoho-iot-sdk-python



  15. Create Virtual Python Environment by executing the following command.

    python -m venv zoho_iot


  16. Activate the virtual environment by executing the following command.

    source zoho_iot/bin/activate



    (zoho_iot) before the root user name indicates virtual environment is active. 



  17. Update the date and time of your Raspberry Pi by executing the following command. Replace YYYY with year, MM with the two-digit month number, DD with two-digit day number, HH with two-digit hour number, MM with two-digit minutes and SS with two-digit seconds.

    sudo date -s 'YYYY-MM-DD HH:MM:SS'



    Note: This step is optional and can be skipped if the date and time on your Raspberry Pi are correct. If they are not aligned with the actual date and time, please update them, as discrepancies can cause issues when downloading the required software.

  18. Install the required packages by executing the following command.

    pip install -r requirements.txt



  19. Install the Zoho IOT Python SDK by executing the following command.

    pip install .   



  20. Navigate to the Example directory of the DHT sensor source code by executing the following command.

    cd examples/DHT_sensor/



  21. Install the DHT Sensor Example Requirements by executing the following command.

    pip install -r requirements.txt



    Note: Installation of the packages will take few minutes
  22. Now run the DHT sensor code by executing the following command.

    python3 dht_sample.py

Once the sensors are properly connected and all the necessary requirements are installed, the device will establish a connection with the Zoho IoT application. You'll start receiving messages containing temperature and humidity data in the "My RPi" device you created within the application. The temperature and humidity readings will be published every 30 seconds.

To terminate the program/script press:
  • For Mac: Press control + C
  • For Windows: Press Ctrl + C 
 
You can restart the program at any time by executing the following commands one by one:

command 1: cd ~/zoho-iot-sdk-python-master/
command 2: source zoho_iot/bin/activate
command 3: cd examples/DHT_sensor
command 4: python3 dht_sample.py


Now that you have successfully onboarded the raspberry pi device, you can view the messages sent by the raspberry pi in the application and visualize the data.

 

 



    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
                          CRM 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
                          Mobile App
                          Form Designer HR
                          Mobile Forms
                          Card Forms Food Offline Forms
                          Assign Forms Photography
                          Mobile Forms Features
                          Translate Forms Real Estate Kiosk in Mobile Forms
                          Electronic Forms

                          Notification Emails for Forms Alternatives Security & Compliance
                          Holiday Forms Google Forms alternative  GDPR
                          Form to PDF Jotform alternative HIPAA Forms
                          Email Forms
                          Encrypted Forms
                          Embeddable Forms
                          Secure Forms
                          Drag and Drop form builder
                          WCAG


                                            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

                                                                                                              • Remote access of a Raspberry Pi: Terminal

                                                                                                                If you don’t have a monitor, mouse, or keyboard readily available for your Raspberry Pi setup, you can easily manage your device remotely from your Mac or PC. This method is efficient and convenient, particularly for headless setups. Prerequisites ...
                                                                                                              • Creating a Device for Raspberry Pi in Zoho IOT application

                                                                                                                With the physical setup of connecting the DHT22 sensor complete, we can now create a device in the Zoho IOT application to represent this raspberry pi. This device created I the application will have the necessary credentials to establish a ...
                                                                                                              • Setting up the Raspberry Pi

                                                                                                                The Raspberry Pi is a highly versatile microcomputer widely used across numerous IoT applications. Setting up your Raspberry Pi is the initial step toward harnessing its capabilities in conjunction with Zoho IOT for a variety of use cases, such as ...
                                                                                                              • Phase 1: Getting Started

                                                                                                                Welcome to Zoho IOT's Diesel Generator Tutorial! This tutorial will provide you with step-by-step procedure to create a real-world IoT-based monitoring solution using Zoho IOT. In the process, you'll explore various features and functions and learn ...
                                                                                                              • Remote Access of a Raspberry Pi: GUI

                                                                                                                If you prefer to access the graphical user interface (GUI of the Raspberry Pi from your Mac or PC, you must enable VNC for your device and then access it using a VNC viewer, for this illustration Real VNC viewer is used. Enabling VNC Note: If your ...
                                                                                                                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