Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: mvbeek
- Language: Python
- Default Branch: main
- Size: 49.8 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 24
- Releases: 0
Metadata Files
README.md
Prerequisite
The following should be installed already before setup. - Python3 - Mosquitto Installed
how to install mosquitto
- MacOS:
brew install mosquitto - Linux:
- Debian:
apt-get update && apt-get install mosquitto - Windows:
Getting Started
Install Necessary Source Code and Libraries
git clone https://github.com/ShotaKameyama/ssa_iot.git`
cd ssa_iot
make install
Setup env variables and mosquitto config files.
As we use access controll using username and password, hence we use env variables to avoid info leakage by the source code.
chmod +x setup.sh
./setup.sh
This shell script will take care of the following:
1. Create Mosquitto Access Control List File: ./config/mosquitto.acl
2. Create Mosquitto User Credential File: ./config/mosquitto.pass
3. Create Mosquitto Config File: ./config/mosquitto.conf
4. Add Environment Variables to ~/.bash_profile
Basic Inforamtion
This IoT system consists of 4 instances: - MQTT braker - IoT Controller - IoT Camera - IoT DoorLock
You should start 4 instances parallel.
Instance 1
mosquitto -c config/mosquitto.conf
Instance 2
python3 iot_controller.py
Instance 3
python3 iot_client_doorlock.py
Instance 4
python3 iot_client_camera.py
How to read QR code?
Once you configured 4 instances, then you can start reading qr code using your USB camera.
python3 qr_read.py
Then read a qr file under static/qr
IoT Doorlock MQTT Publish
Alternatively, you can do the following to do the same.
Usage: iot_publish_doorlock.py <Request>
Publish Open Request Sample
python iot_publish_doorlock.py Open
Publish Close Request Sample
python iot_publish_doorlock.py Close
Virtualization
if you need a virtualization, you can use venv.
python3 -m venv pymyenv
. pymyenv/bin/activate
How to force authentication on Mosquitto
- run
mosquitto -c mosquitto.conf
if you don't have the mosquitto.conf file, make sure that you have run ./setup.sh.
How to do perf test
Prerequisite
- MacOS: You need to install the following libraries to pass
make installbrew install postgresqlbrew install librdkafkabrew install zbar- if M1 then run either of the following:
C_INCLUDE_PATH=/opt/homebrew/Cellar/librdkafka/1.8.2/include LIBRARY_PATH=/opt/homebrew/Cellar/librdkafka/1.8.2/lib pip install confluent_kafkaCPATH=/opt/homebrew/Cellar/librdkafka/1.8.2/include pip install confluent-kafka- Ref: confluent-kafka-python github issue
mkdir ~/lib && ln -s $(brew --prefix zbar)/lib/libzbar.dylib ~/lib/libzbar.dylib
How to run perf test
- run
locust - Open
http://0.0.0.0:8089/on your browser - Set the values and start the test
How to contribute
To contribute to this project, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>. <!-- 3. Make your changes and check with:make check--> - Commit them:
git commit -m '<commit_message>' - Push to the original branch:
git push origin <branch> - Create the pull request.
Alternatively see the GitHub documentation on creating a pull request.
Owner
- Name: Matvb
- Login: mvbeek
- Kind: user
- Repositories: 3
- Profile: https://github.com/mvbeek
Citation (CITATION.cff)
cff-version: 1.2.0
authors:
- family-names: Kameyama
given-names: Shota
- family-names: Mundy
given-names: Austin
- family-names: Chan
given-names: Ying
- family-names: Van Beek
given-names: Mathew
- family-names: Nova
given-names: Smiya
title: Uiversity of Essex Online Secure Systems Architecture Coding Output
# date-released: "2022-03-07"
GitHub Events
Total
- Push event: 3
- Pull request event: 5
- Create event: 4
Last Year
- Push event: 3
- Pull request event: 5
- Create event: 4
Dependencies
- flake8 *
- flake8-html *
- locust *
- locust-plugins *
- matplotlib *
- opencv-python *
- paho-mqtt *
- pyaml-env *
- pylint *
- pytest *
- pytest-html *
- pyzbar *