The project aims to achieve the following key objectives:
- IoT Gateway: Create a robust IoT gateway that acts as an intermediary between IoT devices, such as sensors and smart devices, and the cloud-based platform or local network.
- Efficient Data Transmission: Utilize MQTT as the messaging protocol due to its lightweight and efficient nature. MQTT is well-suited for resource-constrained networks with limited bandwidth, making it ideal for IoT data transmission.
- Reliability and Scalability: Implement MQTT's built-in features to ensure reliability, especially for IoT devices connected over unreliable networks. The protocol's scalability allows it to handle a large number of IoT devices.
- Security: Leverage modern authentication protocols (e.g., OAuth, TLS1.3) supported by MQTT to ensure secure communication between devices and users. Automation: Automate the process of data retrieval and upload. Create a scheduled task to periodically run scripts that fetch simulated data and upload it to the cloud.
- Initial Setup: Created an AWS account and took advantage of the free usage tier for one year. Used a credit card for verification.
- EC2 Instance: Created an AWS EC2 instance to host the IoT gateway. The EC2 instance provides resizable computing capacity in the cloud.
- InfluxDB Integration: Integrated InfluxDB 2.0 with the EC2 instance for efficient storage of IoT data.
- SSH Access: Established SSH access to the EC2 instance using the provided keypair.
- Python Environment: Installed the Python interpreter and required Python modules on the EC2 instance..
- Uploading Source Code: Created a directory on the EC2 instance to store the source code. Used SCP (Secure Copy Protocol) to import the Python source files to the EC2 instance.
- Shell Script: Create a shell script that executes the Python scripts for data retrieval and upload.
- Cron Job: Installed and configured cronie on the EC2 instance. Create a cron job to run the shell script daily to automate the data uploading process.
- Dashboard Export: Export the generated data to a dashboard in JSON format for visualization and analysis.