Plantly was an RMIT external capstone project for RMIT Programming Project 1 (COSC2408) semester 1 2020 supervised by Amir Homayoon - who was also the head tutor of RMIT Programming Project 1.
The project was a combination of smart IoT solutions and a highly scalable serverless cloud architecture. It was considered to be one of the best capstone projects of the same semester.
This is the best project so far in my teaching career.
Amir Homayoon - RMIT Head Tutor
TechStack | Github | Demo |
---|---|---|
Next.js | Repository | Video |
AWS Cognito | Handbook | |
AWS Lambda | ||
AWS Dynamodb | ||
Elastic Search | ||
Kinesis | ||
SQS | ||
SNS | ||
MQTT | ||
Tensorflow | ||
Web Socket | ||
API Gateway | ||
Hugo |
The purpose was to create a serverless IoT gardening system which automatically monitored and adjusted sensors to optimise plants health condition. The machine-learning model trained to utilise electricity, nutrients and water consumed most effectively. Additionally, it focused on maximising yield without knowledge requirement of aeroponic or hydroponic systems.
With a highly scalable architecture, the system was designed to suit both house-hold and business usage with a low maintenance cost. In this project, I mainly worked on cloud architecture, front-end dashboard and helped my teammate with the Adruino microcontroller.
Since the project is complicated, we started by analysing previous works and research papers to have a better understanding of building the machine learning model. We decided to go for the Linear Regression model as it was suitable for the data type and development time frame.
Next, we then set up the IoT system, which includes: Raspberry Pi, Arduino, microsensors (temperature, light, pH, humidity, camera) and a real plant. In the meantime, a dashboard view mock-up was designed to suit the planned user stories.
Initially, we planned to use Kibana as a web dashboard. However, after considering that Kibana dashboard might be overwhelmed for non-technical users, the team decided to build a web dashboard from scratch with Next.js for a server-sided-rendering functionality.
During building the web dashboard, I found it quite challenging for the team members to pick up a new framework. Therefore, with a bit of React experience my from previous projects, I tried to learn Next.js beforehand. As a result, I was able to help my teammate to understand the framework during the development phase.
The most challenging of all is the cloud architecture. I found myself to spend most of the time reading the documentation, StackOverflow and watching tutorials on Youtube to understand how some particular services work. Most of the microservices on the cloud were controlled by Lambda functions and accessible via API Gateway with Cognito authentication.
DynamoDB was used as the main database to store the devices information and user information. For the database schema, the team agreed to use the One-Many relationship (one user has many devices). The information stored in DynamoDB was mainly accessible via Lambda function, which our IoT devices can query via AWS MQTT. It is also the main communication method from our IoT device.
Data from sensor devices were then recorded and uploaded via AWS MQTT through Lambda function to S3 Bucket. From the S3 Bucket, the data was then read via an update transferred via AWS SNS on events to upload to our Elastic search service and our machine learning model. This is also the part where I spent the most time searching for online resources.
I found that using Elasticsearch to handle query and searches were more effective and convenient comparing building raw APIs from scratch. The team and I also decided to use API Gateway WebSocket to provide real-time communication between the machine learning model and the dashboard interface.
Development during COVID-19 lockdown was a challenge for us to assemble the IoT architecture together. Many IoT important parts were not delivered as a result of Australia border lockdown. To overcome this, we held a lot of meetings online to discuss the situation and pivot the idea to the most suitable one for remote development.
Building a complete serverless cloud solution was very new for me. There were a lot of challenges in the development phase. I found that the best solution was to actively learn by reading online resources and asking for bits of help from other people.
From this project, my cloud development skills were greatly improved as I'm now confident to develop a cloud architecture by myself. I think this was an excellent opportunity for me to get my hand dirty with the cloud platform, and from here, I would be able to learn more about cloud technology and improve what I already knew.
Moreover, I found that my communication and teamwork skills were also better from solving new challenges with my team members and project presentation.