Welcome to Portal

?Unknown\pull-down

Welcome to Zoho Cares

Bienvenido a Soporte de Zoho

Search our knowledge base, ask the community or submit a request.

Visualise, Automate, and Control the soil monitoring set up

Once the ESP is onboarded, it will transmit soil moisture data to the Zoho IOT application. This data can be visualized through a graph for easy interpretation. Additionally, you can set up a command in the Zoho IOT application to manually control the irrigation pump. To optimise the system, you can automate the pump's operation based on the sensor data and the configured commands within the application.

View data sent by ESP32

We must first confirm if the messages sent by the ESP32 are received by the Zoho IOT application. Once the device is properly onboarded, the connection status of the My ESP (device created in the application) will change to connected.


To view the data received,
  1. Access the End Application.
  2. Select Devices > Devices in the left pane.



  3. Click on the name of the device created for the ESP32. For this illustration, it is My ESP. This will open the device's information page.



  4. Select the Messages tab.



  5. Toggle to Live Messages and click Start Listening. The data sent by the ESP will be displayed.



 
From here we can identify the parsing key to be soil_moisture, this is already configured in the Soil Moisture datapoint we imported while creating the device.

Click Stop Listening to stop viewing the messages.

Adding a widget to the overview dashboard of the device

The datapoint will parse and store soil moisture value data from the received messaged. We can visualise this data with a chart widget added to the overview dashboard.

To add a widget in the overview dashboard,
  1. Click the Overview tab in the device's information page.



  2. Click the Edit icon in the overview dashboard. This opens the dashboard builder.



  3. Hover over the Alarms by Severity widget and click the vertical ellipsis icon.



  4. Select Delete from the context menu.



  5. Click Delete in the Widget Delete Alert pop-up.



  6. Select Charts in the left pane.



  7. Select Line chart and click Proceed.



  8. Toggle to Realtime.



  9. Provide the Widget Title as Soil Moisture Level and Soil Moisture in the Y1 field and click Create.



  10. Click Cancel in the dashboard builder.



The widget will now be added to the overview dashboard and will start displaying the received data.

Adding a Command to control the pump

You can add a command to the "My ESP" device to enable remote control of the pump via the application. The necessary code to manage the pump is already integrated into the example program that has been uploaded to the ESP32.

To add a command,,
  1. Click Actions > Command Configuration in the device's information page.



  2. Click Add Command.



  3. Provide the value shown below in the appropriate fields and click Create.



    Note: The command key status is in the direct parsing string option.
A new command with the name Pump ON/OFF will be created.



Executing the Command

You can execute the command, and the appropriate action will be initiated in the ESP32 setup.

To execute a command,
  1. Select the box near the Pump ON/OFF command and click the Execute Command that appears.



  2. Click toggle to OFF and click Execute.

    <include command successful screenshot>
The command will be sent to the ESP32, and the pump will be turned off.

You can always access the command configuration to execute the command by clicking Actions > Command Configuration in the device's information page.

Automating command with an alarm rule.

You can now set up an alarm rule to automate the pump's ON/OFF functionality. Configure the rule so that if the soil moisture level drops below 20, the pump will automatically turn ON. Conversely, if the soil moisture level rises above 80, the pump will turn OFF. This ensures optimal watering based on real-time soil conditions.

To create an alarm rule,
  1. Click Actions > Alarm Rule Configurations in the device's information page.



  2. Click Add Alarm Rule.



  3. Provide the following values in the appropriate fields and click Next.



  4. Click Add State.



  5. Provide the following values in the Define State page and click Next.



  6. Select Realtime Datapoint in the Select Trigger page and click Next.



  7. Provide the Primary Condition and details as follows in the set Condition Page and click Next.



    Note: The value 20 is provided in the constant field option
  8. Provide the following description in the Configure Message and click Next.


  9. In the Configure Action page,
    1. Select Everytime Action in the Select Action Type.


    2. Click Add Action > Execute Command.


    3. Select Pump ON/OFF in the Select Command filed.


    4. Toggle On and click Save & Associate.


  1. Click Finish, and the state will be added.
  2. Click Add State again.


  3. Provide the following values in the Define State page and click Next.


  4. Select Realtime Datapoint in the Select Trigger page and click Next.


  5. Provide the Primary Condition and details as follows in the set Condition Page and click Next.


    Note: The value 80 is provided in the constant field option
  6. Provide the following description in the Configure Message and click Next.


  7. In the Configure Action page,
    1. Select Everytime Action in the Select Action Type.


    2. Click Add Action > Execute Command.


    3. Select Pump ON/OFF in the Select Command filed.


    4. Toggle Off and click Save & Associate.


  8. Click Finish, and the state will be added.


  9. With two states added, click Save.

 
The alarm rule has been successfully created, automating the operation of the pump to maintain the soil moisture level for optimal plant health. The system is configured to activate the pump when soil moisture drops below 20 and turn it off when it exceeds 80.
You have now successfully set up a comprehensive soil moisture monitoring and management system using a Zoho IOT application.
 


Helpful?60
Updated: 5 months ago
Share :