Skip to content

dhairyashah1/Sra-Assignments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sra-Assignments

Solutions to problem statements provided by SRA, VJTI

DATA-RELAY

Implementing MQTT communication protocol aided by data compression and json manipulation using mosquitto library in C.

Problem Statement

Consider you have deployed various sensors in your office like temperature, pressure, gas, smoke, motion, proximity, etc. These sensors are present on different floors and rooms with 50 edge boards. You need to get the sensor readings to a single device like your mobile phone. Also, since sensors will be working the whole day, the size of data will increase tremendously. Considering that you need at least one week's data to provide the user with some statistics, you will have to compress and store the data on the user's device.

Table of Contents

About The Project

The basic idea of this project is to understand MQTT protocol and this functioning and manipulating large data with minimal space and efficent storage. The project is done using mosquitto library in C. It can also be achieved using the Paho library in C++.

Tech Stack

File Structure

.
├── publisher.c                  # Publishes the data i.e in our case various SENSORS
├── subscriber.c                 # subscribes to the data using MQTT service
├── data    
│   ├── device1  
|       ├── temperature.txt      # -40 to 110 degree Celcius (upto 2 decimal places)
|       ├── humidity.txt         # 0% to 100% (upto 3 decimal places)
|       ├── air_pressure.txt     # 3 to 300 psi (integer)
|       └──  ph.txt              # 0 to 14 (upto 1 decimal place)
|    └── device2
|       ├── distance.txt         # 0 to 100m (upto 2 decimal places) 
|       └── switch_state.txt     # “ON” or “OFF”
│        
├── src                     # Source files (alternatively `lib` or `app`)
├── ...
├── test                    # Test files (alternatively `spec` or `tests`)
├── ...
├── LICENSE
├── README.md 
├── Setup.md                # If Installation instructions are lengthy
└── todo.md                 # If Future developments and current status gets lengthy

### Installation
1. Clone the repo
```sh
git clone https://github.com/dhairyashah1/Sra-Assignments.git

Usage

How to run the driver code

Future Work

  • See todo.md for seeing developments of this project
  • Using multithreading to create various bots
  • Generating Random JSON
  • Implementing Compression Algorithm
  • Compiling all code

Troubleshooting

  • Common errors while configuring the project

Errors tend to occur while library installation. Kindly download as per your system configurations.

Contributors

Acknowledgements and Resources

...

License

MIT License

About

Solutions to problem statements provided by SRA, VJTI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages