Ryan Cassidy (s3740446) - Worked on Task-B and C (agent.py, socketing between Pi's, facial recognition, Trello Board, Unit Testing)
Vineet Bugtani (s3734938) - Worked on Task-A (API, Site, Google Cloud Database, Unit Testing, Trello Board, Google Maps)
Akshay Sunil Salunke (s3730440) - Worked on Task-A and B (API, Site, Google Calendar, Trello Board, Sphinx Documentation)
Pui Ling Chan (s3561165) - Worked on Task-A (API, Site, Google Cloud Database, Sphinx Documentation, Trello Board)
Group assignment 2 for RMIT Programming Internet of Things 2020 Features a flask website for renting cars and a python agent script for socketing to Master Pi and unlocking cars.
A database schema for the cloud database can be seen in the root directory of this repo.
In order for site to operate correctly the host address must be raspberry.localpi.com:5000 in order to utilize google calendar's redirect-uri. This may require some configuration in the host file in order to work in a local environment (add the ip you are hosting the site on or the loopback address followed by raspberry.localpi.com)
Site utilizes google maps, google calendar and a google cloud database. For configs and keys to these please ask above team members.
Flask-socketio is used to provide socketing through gevent-websocket to the agent, agent utilizes python-socketio to socket with site.
Agent uses google geolocation API to lookup location through IP address, config.json with api key required in order to use.
Both applications can be run on different Pi's and communicate.
Task-C Facial recognition is implemented in both Task-A and Task-B applications. Place a picture of yourself in Task-B and name it image.jpg to use it for facial recognition. Other image is for unit testing.
Unit Testing is found in the unittests.py file in both folders. Make sure to adjust the ip strings to the server ip.
Trello Board: https://trello.com/b/j2XWnnbK/programming-iot-assignment-2
Run below commands in a terminal in MacOS
python3 -m venv <virtual env path>
source <virtual env path>/bin/activate
alternatively . <virtual env path>/bin/activate
pip install -r requirements.txt
cd Task-A
& python3 flask_main.py
cd Task-B
& python3 agent.py
cd docs
and then make clean html
Navigate to index.html in docs/build/html
Run the Task-A server and in a separate shell run python3 Task-A/unittests.py
Run the Task-A server and in a seperate shell run python3 Task-B/unitests.py