- Objective: Develop a Raspberry Pi-based weather observation system.
- Features: Measures temperature, humidity, and atmospheric pressure.
- Alerts: Activates alerts through email, LED signals, or auditory alarms upon threshold breaches.
- Integration: Utilizes AWS Lambda and AWS SNS for efficient email notifications.
- Raspberry Pi with internet access.
- DHT11 sensor (or compatible) for environmental readings.
- Python 3.
- An AWS account for AWS Lambda, AWS IoT Core, and AWS SNS.
- Required Python libraries:
Adafruit_DHT
,awscrt
,boto3
,awsiot
. - Terraform for infrastructure provisioning.
- Clone the Repository:
git clone https://github.com/dragonscypher/Weather-Window.git
- Install Dependencies:
pip install Adafruit_DHT awscrt boto3
- Fill in AWS IoT Core details and other AWS resource information in the Python script.
- Set email credentials as environment variables:
export MY_EMAIL_PASSWORD='your_secure_password'
- Terraform is used to create the required AWS infrastructure, including AWS IoT Thing, Lambda functions, and a DynamoDB table for storing sensor data.
- Provision AWS Resources:
Run Terraform to create the necessary AWS resources:
terraform init terraform apply
- Start the System:
python mqtt_email_notification.py
- Monitor weather data, store it in DynamoDB, and receive alerts based on set thresholds.
The Weather Monitoring System, "Weather Window," leverages AWS IoT Core to collect and send weather data (temperature and humidity) from a DHT11 sensor connected to a Raspberry Pi. The collected data is published to AWS IoT Core using MQTT, stored in a DynamoDB table, and notifications are sent using AWS Lambda functions and SNS.
- AWS IoT Core Integration: The system uses MQTT to publish sensor data to AWS IoT Core, ensuring real-time updates.
- Data Storage: Weather data is stored in DynamoDB for historical reference and analysis.
- AWS Lambda: Lambda functions are used to process messages, store data, and send alerts.
- Notifications: Email notifications are sent using AWS SNS based on threshold values for temperature and humidity.
The system architecture for "Weather Window" involves multiple components working together to provide real-time weather monitoring and alerting. Below is a high-level overview:
- Raspberry Pi: Collects data from the DHT11 sensor and publishes it to AWS IoT Core using MQTT.
- AWS IoT Core: Serves as the central messaging broker that receives data from the Raspberry Pi.
- AWS Lambda Functions: Processes the incoming data, stores it in DynamoDB, and triggers alerts.
- AWS DynamoDB: Stores weather data for historical reference and analysis.
- AWS SNS: Sends email notifications when the data breaches the defined thresholds.
Your contributions are welcome! Open an issue or pull request to suggest changes or additions.
This project is under the MIT License.