Sprint 1

teammembers

Selecting Topic and Team Members

Saravanan (Scrum Master) has selected the Smartics Team based on their individual strengths. My role is a developer as I have relevant programming skills for this project from modules such as Programming 1 (Python), Programming 2(C#), Mobile Application Development 1 (Android) and Mobile Application Development 2 (IOS). I hope that I am able to apply those skills into this module and contribute as much as I can. At the same time, I hope that I can deepened the knowledge of the skills that are applied and also gain more experience about the agile methodology.

Note: Watch it in fullscreen for best quality.

Working on the Firebase

This function will update the startTime and endTime to the Firebase when user turn on and off the appliance. The reason why we want to collect the startTime and endTime for each and every appliance is so that we can plot a visualization for the user to see. The visualization will help the user see the trend of their electricity consumption and ultimately make some necessary changes to their habit if needed to.

Challenges: Working with Firebase through python is something that I have touched on during P1 lessons. However, the lessons were pretty basic and the skills needed to get this done is not as simple. Therefore, I have to do additional research as to how to handle data in the Firebase. Nonetheless, P1 lessons did help me get started pretty fast.

Updating

Updating Total Usage for every Appliances

This script will be running on a while loop to update the total usage for every appliances. The script will calculate the total usage from startTime, endTime and power [(endTime-startTime)*power]. The Smartics App will then display them so that the user can see the total usage for each and every appliances they are using.

Challenges: There is a chance that the raspberry pi will crash if it was tasked to run a script for every seconds. The raspberry pi does not come with strong hardware, therefore, it is very hard to say until we try to run the script on it. What I can do at most is to ensure that my codes are well designed and does not include any unnecessary lines.

Sprint 2

Note: Watch it in fullscreen for best quality.

Creating a Data Visualisation on electricity consumption for each appliance

User can select the time period to view the Data Visualization on electricity consumption for each and every appliances. User can make decision based on the Visualization and change their habit to reduce electricity consumption if necessary.

Challenges: SwiftUI was released on June 3, 2019. Therefore, there are limited tutorials to SwiftUI on the internet. I will have to look through the documentation provided by Apple to make a visualization using SwiftUI. The Visualization used was from GitHub and the Data inputs are from our Firebase.

Note: Watch it in fullscreen for best quality.

Summary for all appliances

Our current appliances are categorised into Lights, Fans and Air Cons. User can see the total electricity consumption from these three categories. This will give the user an overview of the electricity consumption in their household.

Challenges: I have did research on the Internet about using SwiftUI to handle Data and create visualization. It was hard at first, but because programming language are sort of similar. Therefore, with enough time spent, I start to become more familiarize with the new language(SwiftUI)

Sprint 3

Note: Watch it in fullscreen for best quality.

Admin Performing CRUD on Tips

Tips in the application is to give the user latest information to saving electricity. We realise that there should be a feasible way to make changes to the tips section so that user gets the latest tips. Therefore, we create a side application for the admin (shown in the video). The main purpose is to allow admin to make changes to the tips. Admin can add new relevant tips, delete outdated tips and update exisiting tips.

Challenges: Performing CRUD function on Tips using SwiftUI and Firebase is something new to me. I often seek help from Sara and do research online to find the most efficient way to handle data using SwiftUI and Firebase. It took me a long time to finish it, and there are testing still needed to be done.

Sprint 4

Firebase

Final Update on Firebase Structure

The Firebase is the core to this application. From logining into the application to managing appliances, we will need to retrieve data from the Firebase. We have make minor changes here and there during the project development.

Challenges: I am not very familiar working with Firebase using SwiftUI, therefore I will have to do reaserch and read documentation on how to work with Firebase with SwiftUI. At the same time, writing code that works with the Firebase need to be optimized because not all phones are using the latest CPU.

Note: Watch it in fullscreen for best quality.

Demostration of Working with them HomeKit

The Apple Homekit is the magic of this project. It allows us to control the appliance using the Homekit Application. The Apple Homekit API will talk to our wireless switch to turn on and off the appliance. This system help makes controlling appliances at home/offices more convenient. We also make use of this system to create our own Companion App to collect user's electricity consumption habit and provide them with data visualization and tips on reducing electricity consumption.

systemdiagram

System Diagram

As you can see in the system diagram, User can only interact with two interfaces and they are the Companion App and the Home Kit App. While user uses the Home Kit App to control their appliances, the data is processed and sent to our Firebase. We then retrieve the data, processed it and used it to provide meaningful information for the user.

New Things I Learnt:

swiftui
Swift UI
ios13
IOS 13
firebaselogo
Firebase
raspberrypi
Raspberry Pi