Connect a Raspberry Pi to WSO2 IoT Server and manage it. The following subsections explain how you can work with the Raspberry Pi device type:
Prerequisites
- A Raspberry Pi board that is Internet enabled (Wi-Fi or Ethernet).
- An Adafruit DHT11 temperature sensor.
- An LED bulb.
Start the Raspberry Pi
Sign in to the Device Management console.
- Click Enroll New Device.
- Click Raspberry Pi to enroll a device of the type Raspberry Pi.
Connect the DHT11 Temperature Sensor and the LED to the Raspberry Pi board.
Set up your Raspberry Pi device as shown in the schematic diagram.
Ensure that your Raspberry Pi Board is Internet enabled, either via Wi-Fi or Ethernet.
- Download the device agent.
- Click Download Agent.
- Enter a preferred name on the download agent form.
- Click DOWNLOAD NOW to download the device agent on your machine. If you select this option move to step 7.
Click COPY LINK to directly download the agent to the Raspberry Pi board via the generated cURL command. If you select this option move to step 8.
- Unzip the downloaded agent file and copy the unzipped file onto your Raspberry Pi board.
Navigate to the downloaded agent that is on the Raspberry Pi board.
Example:cd <RASPBERRY_PI_BOARD>/agent
Test to confirm that the agent is working as expected.
./testAgent.sh
You can run the script on your local machine, on which the agent was downloaded.
Start and deploy the agent as a service on the Raspberry Pi board once you have tested the agent as explained in step 9.
The registered service will be loaded on boot up.
./startService.sh
Try out the Raspberry Pi device
Once you start and deploy the Raspberry Pi agent you can try out the following actions:
Action | Description |
---|---|
View device details | Navigate to the Device Details page to view the device details, carry out operations and monitor real-time data. |
Control the bulb |
|
Monitor real-time data | Click View Device Analytics to monitor real-time data via the Device Details page. Example: |
What's next?
Follow the options given below to see what you can do next.
Navigate to the Device Management page to view all the devices created by you.
- Select a device from your device dashboard and check the available operations and monitor real-time data.