Interacting with a Cloud Web Service - Internet of Things - ثاني ثانوي

Lesson 3: Interacting with a Cloud Web Service

Interacting with Web Services

Lesson 3: Interacting with a Cloud Web Service

Firstly, you will need to register and create a new user in the Binary IoT Cloud online platform.

Lesson 3: Interacting with a Cloud Web Service

Calling a Web API with Python

Lesson 3: Interacting with a Cloud Web Service

Create a new variable named api_url with the following link which is the cloud platform's API web endpoint:

Lesson 3: Interacting with a Cloud Web Service

The complete code for the send_data() method is shown bellow:

Complete Code1

Lesson 3: Interacting with a Cloud Web Service

Complete Code2

Lesson 3: Interacting with a Cloud Web Service

Complete Code3

Lesson 3: Interacting with a Cloud Web Service

Complete Project

Lesson 3: Interacting with a Cloud Web Service

Viewing the Smart Garden Data

Lesson 3: Interacting with a Cloud Web Service

The data that you view in this table are the environmental

Lesson 3: Interacting with a Cloud Web Service

Using Sensor Data and Big Datasets for Data-Driven Decision Making

Lesson 3: Interacting with a Cloud Web Service

Explain the use of a Web API.

Why are the username and the password required to connect to the Web API? Think of two reasons and write them down.

Lesson 3: Interacting with a Cloud Web Service

Which code lines do you have to change to modify the conditions required to start watering the plant and the duration of the watering?

Describe what readings other than temperature and humidity can be collected in a smart garden environment.

Lesson 3: Interacting with a Cloud Web Service

Suppose you could also read past data from an online cloud platform. You could not only have current environmental readings to use, but data from the past as well.

Compare the JSON and CSV data format types.