Growing a Plant With IOT

by Inbali in Living > Gardening

482 Views, 1 Favorites, 0 Comments

Growing a Plant With IOT

תמונה ראשית.jpg

Hello every one!

Here we are going to learn how to grow house plants!

The idea came from Inbal's mother actually. her mother studied agriculture at the university and always loved plants and flowers , that’s why her house is full of them.

As she saw her mother taking care of the plants she always got curious about how to grow them properly and that’s why she wanted to make an easier way to grow them, using the great technology we have today. That’s why we are going to learn how to grow house plants using the CPX, integromat and Blynk.

We made 5 scenarios:

We learned that the light and temperature that the plant gets is very important and that's why for each such relevant attribute we created 2 scenarios:

1.The lighting level and the temperature level measured from the environment will always be displayed on the Blynk app.

2.Because we cant always watch at the app , we added a scenario that push a notification to our smartphone if the level of the light or the level of the temperature is not suitable for growing the plant.

3.Watering time and fertilization time, we can set a specific watering schedule and a specific fertilization schedule on google calendar and be notified from the CPX whenever the plant need water or fertilizer.

4. Its importent to know also when the soil is too dry or too wet and we can know this by measuring the humidity level of the air. In this scenario we will Display the Moisture Level in the Soil.

5. We can grow houseplants on the balcony as well, but this is not always the ideal place, for example on a summer day when there is a lot of wind, we prefer that the plant be indoors so that it is not destroyed. In this scenario we will measure the wind speed and notifiy when the speed is ideal or not.

Supplies

1) Circuit Playground Express board.

2) Blynk app.

3) integromat user.

4) Arduino software.

The Technologies We Use:

cpx.jpg
apps.jpg

1) CPX :

CPX is a hardware board that has Neo pixels, sensors (temperature sensor, light sensor, sound sensor etc) and buttons.

In this project we used the CPX to measure the light level, temperature level and take actions accordingly, in addition we used it to show data that we get from the internet using it's Neo pixels and sounds.

2) Blynk Application:

Blynk is an IOT platform that interact with the CPX and the internet. The Blynk application knows how to transfer data to and from the CPX and to and from the internet.

In this project we used the Blynk App to show the data we measured in the CPX and we used it to be a linking layer between the CPX and integromat.

3) Integromat Site:

Integromat is an online automation platform, it helps you link two or more applications so one's action affects the action of the other.

we used integromat in this project to link between applications and Blynk.

How to Get Start?

blynk_1.jpg
blynk_2.jpg
blynk_3.jpg
integromat_site_1.jpg

let's start:

- Download Arduino software on following Download Arduino. Using Arduino software you can upload the project's code to the hardware (CPX).

- Download the Blynk application: for Apple on the following link ios app or for Android on the following link android app.

In Blynk :

1. Create a new acount and log-in.

2. Create a new project -

- choose your own project name.

- in choose device , select "Arduino MKR1000"

3. creat the project.

- Download the integromat application to your smartphone: for Apple on the following link ios app or for Android on the following link android app.

- In integromant site link , create a new acount and log-in.

First Scenario: Always Display the Light Level and Temperature Level

blynk_tem_1.jpg

Use videos and photos above for a deeper and easier understanding of the order of operations.

Because we want see the light and temperature level, repeat the same instractions twice.

1. Open the Blynk app and enter to the project.

2. Add a "Gauge" widget on the widget settings.

3. Choose input as virtual pin V4 for light (and V5 for temperature).

4. Set the values to be 0 - 1023.

5. Choose 10 sec in "Refresh interval".

now you can see on your Blynk app the mesured light level and temperature level from the environment.

Second Scenario: Measure Light and Temperature

integromat_webhook.MOV
blynk_temp_4.jpg
blynk_temp_5.jpg
notice_temp.jpg

Use videos and photos above for a deeper and easier understanding of the order of operations.

Because we want to be notified for both light and temperature level, repeat the same instractions twice.

Integromat site:
1. Create a new scenario on integromat.

2. Select "Webhooks" and choose "custom webhook".

3. Press the add button and add a new webhook.

4. Press "RE-determine data structure".

5. Press "copy address to clipboard" and open a new tab on your browser.

6. Print the address that you copied to the search line and add to it - "?message="message"".

7. Press enter and wait for an "Accepted"

8. In the integromat site , press on the right half circle on the right of the webhook symbol to add a new module as the new module choose "Apple IOS" or "Android" according to your personal device.

9. Choose "send a push notification".

10. Add a new device (by scanning the QR code presented with the Integromat app) - note that you need to do it BEFORE you login to the app!.

11. Choose the name of the title you want and for the body choose "message".

12. Press the clock symbol on the bottom left side of the screen and choose how often you want to be notified and set scheduling switch to On.

Blynk App:

1. Go to the project you created before.

2. Add a " Webhook" widget.

3. Choose as output V4 for the light sensor and V5 for the temp sensor , On the URL put the url of the Webhook you got in the integromat site and add at the end , ?message=/pin/. example: https://hook.integromat.com/4qqwe7qbli8f44bklbjkb...

Third Scenario: Watering and Fertilization Day With Google Calender

integromat_wateringday.MOV
cpx_wateringday.MOV

Use videos and photos above for a deeper and easier understanding of the order of operations.

Because we want to notify about watering and fertilization, repeat the same instractions twice.

1.Create a new scenario on Integromat

2.First pick "Google Calendar" and choose "Watch events".

3.Now press on the right half circle on the right of the Google calendar symbol to add a new module.

4.As the new module choose "HTTP".

5.Choose "make a request".

6.In the URL line enter the following address:

http://188.166.206.43/XXXXXXXXX/update/pin?value=10...

(for watering insted of pin write V2 and for fertilization write V3).

-Instead of the X's that you see in step 6, add your AUTH TOKEN of your Blynk's project.

7. Set scheduling switch to on.

8. Press the clock symbol on the bottom left side of the screen and choose "every day" , choose the time you want to be notified.

now the CPX will alarm every watering day and fertilization day by its Neo pixels, to turn it off for watering press the left button and for fertilization press the right button.

Fourth Scenario: Displaying Moisture Level in the Soil

integromat_moisture.MOV
cpx_moisture.MOV

Use videos and photos above for a deeper and easier understanding of the order of operations.

1. Create a new scenario on Integromat

2. First pick "Weather" and choose "get current weather".

3. Enter the city and country you live in.

4. Now press on the right half circle on the right of the Weather symbol to add a new module.

5. As the new module choose "HTTP".

6. In the URL line enter the adress:

"http://188.166.206.43/XXXXXXXXX/update/V0?value=" and replace the "XXXXXXXXX" with the AUTH TOKEN of your Blynk app.

7. Concat the URL from step 6 with the Air Humidity.

8. Press the clock symbol on the bottom left side of the screen and choose "every day" , choose the time you want that the information will be updated.

now when you turn on the slide switch on the CPX you will the Moisture level of the soil presented as the number of active Neopixels.

Fifth Scenario: Measure the Wind Speed

integromat_windspeed.MOV
blynk_windspeed.jpg
notice_windspeed_1.jpg
notice_windspeed_2.jpg

Use videos and photos above for a deeper and easier understanding of the order of operations.

In this step we will create two different scenarios , one for measuring the wind speed and one to notify where should the plant be.

Measuring the wind speed -

1. Create a new scenario on Integromat
2. First pick "Weather" and choose "get current weather". 3. Enter the city and country you live in. 4. Now press on the right half circle on the right of the Weather symbol to add a new module. 5. As the new module choose "HTTP". 6. In the URL line enter the adress: "http://188.166.206.43/XXXXXXXXX/update/V0?value=" and replace the "XXXXXXXXX" with the AUTH TOKEN of your Blynk app.

7. Concat the URL from step 6 with the wind speed.

8. Press the clock symbol on the bottom left side of the screen and choose "every day" , choose the time you want that the information will be updated.

Notify where should the plant be -

Integromat site:

1. Create a new scenario on integromat.

2. Select "Webhooks" and choose "custom webhook".

3. Press the add button and add a new webhook.

4. Press "RE-determine data structure".

5. Press "copy address to clipboard" and open a new tab on your browser.

6. Print the address that you copied to the search line and add to it - "?message="message"".

7. Press enter and wait for an "Accepted"

8. In the integromat site , press on the right half circle on the right of the webhook symbol to add a new module as the new module choose "Apple IOS" or "Android" according to your personal device.

9. Choose "send a push notification".

10. Add a new device (by scanning the QR code presented with the Integromat app) - note that you need to do it BEFORE you login to the app!.

11. Choose the name of the title you want and for the body choose "message".

12. Press the clock symbol on the bottom left side of the screen and choose how often you want to be notified and set scheduling switch to On.

Blynk App:

1. Go to the project you created before.

2. Add a " Webhook" widget.

3. Choose as output V1 , On the URL put the url of the Webhook you got in the integromat site and add at the end , ?message=/pin/.

example: https://hook.integromat.com/4qqwe7qbli8f44bklbjkbz...

The Arduino Code

First, download the code we added below and make the following changes:

1. Change in the file: AUTH TOKEN, wifi name, wifi password insted of the writen "XXX" .

2. Connect the CPX to your computer.

3. Upload the code to the CPX.

4. Put the CPX near to a plant.

and enjoy!