A public park is a cheap recreational gateway for families or people who wants to have a calm morning or afternoon time.
A single public park could contain a lot of assets that needs to be monitored and maintained regularly, such as various kind of plants and animals.
Not only the park should be maintain regularly for the comfort of its visitors, but it also it need to be safe from the air pollution especially if it is located in the middle of the city. so it is crucial to get the pollution data in order for the park management to maintain the air cleanliness.
In order to gather all of those data we need various kind of sensors to read the specific kind of data needed for each aspects of the park. But I guess we don't have to worry about that because the Rapid IoT kit already come built in with the sensors needed to build this project.
So in this project I will show you how easy it is to make a dashboard to monitor all assets and weather/air condition in a public park using minimum software and also hardware.
Really, there is nothing a lot to do in here. You just prepare the Rapid IoT kit out of the box and a raspberry pi with an SD card and a decent power source.
There are few things needed to do for the software:
just follow this link to install the os
- Python 2 or 3
Already built in for the raspbian
- Pygatt and few of its components
$ pip install pygatt $ pip install "pygatt[GATTTOOL]" $ pip install pexpect
Pygatt is needed to read the advertisements data from the Rapid IoT kit using the ble connection
$ pip install cloud4rpi
This is needed to connect the data to the Cloud4rpi iot service
I already try various kind of online iot dashboard service such as ubidots, adafruit, thingspeak, etc. For this projects I am gonna use cloud4rpi because of its simplicity and easy to build dashboard system
The code and firmware that used for this projects are attached below. To reserve power I turn off the backlight and only send the data I need for the project. If you want clone the project just import the.atmo files attached below
Before you program the raspberry pi, make sure you already have a Device Token from the cloud4rpi service. Check this github page for more clear documentation
If you already install the library that I was mentioned above, than you can run the python code without any problem. But there are few things that need to be change based on your credentials
import time import pygatt import cloud4rpi mac = '00:00:00:00:00:00' #change this to your Rapid IoT kit Mac Address DEVICE_TOKEN = 'xxxxxxxxxxxxxxxxx' #change this to your cloud4rpi device token
after you change the two lines just run the cloudscan.py files and you are good to go.
If everything work correctly open your device menu on cloud4rpi and should get this screen
Now you can make your own dashboard on the control panel menu based on the data you just sent
Due to the small amount of time I can give in this project, There are a few more feature I was planning to add in this project, such as:
- Using the Rapid IOT Kit NFC to identify and give the information of the various kind of plant or assets existed in the park
- Adding a small solar panel to charge the Rapid IoT kit
- Burglar detection by activating the shock/fall feature and immediately send an alarm notification to the park guards
- Track moving assets that could be hard to find by making an local positioning ble system
Hopefully in the near future I can continue this project and make those plan fulfilled