AmbientWeather is a back-end project that integrates real-time weather data with indoor lighting. The application dynamically adjusts lighting based on current weather conditions to create a harmonious and immersive indoor environment.
- Jira Board
- Team Agreement
- Pitch idea
- SoftwareRequirement.md
- User Stories
- UML Wire-frame :

- Domain Modeling
- Database Schema
- Real-time Weather Integration: Fetches weather data from a weather API.
- Dynamic Lighting Adjustment: Changes indoor lighting settings based on weather conditions.
- Scheduling: Automates lighting adjustments at specified intervals.
- Backend: Node.js, Express
- Weather Data: Axios for API calls to a weather service
- Scheduling: Node Schedule for timed lighting adjustments
- Communication with Hardware: Flask server on Raspberry Pi for controlling lights
This project integrates with an MQTT broker to communicate with a Raspberry Pi.
Before you begin, ensure you have the following installed:
- Node.js
- npm
- PostgreSQL
- Python (for the Raspberry Pi and Flask server)
- An MQTT broker account (e.g., HiveMQ)
git clone https://github.com/QEA-Javascript/AmbientWeather.git
cd AmbientWeather
npm install
#### .env file sample:
PORT=3000
WEATHER_API_KEY=your_weather_api_key
WEATHER_API_URL=https://api.weatherbit.io/v2.0/current
CITY=your-city
SECRET=your_secret_key
DATABASE_URL=postgres://your_postgres_user:your_postgres_password@localhost:5432/your_database_name
MQTT_BROKER_URL=mqtts://your_mqtt_broker_url:8884/mqtt
MQTT_USERNAME=your_mqtt_username
MQTT_PASSWORD=your_mqtt_password
Run the Server
npm startPOST with http://localhost:3000/auth/register:
{ "username": "", "password": "" }
POST with http://localhost:3000/auth/login:
Get with http://localhost:3000/auth/protected:
Description: Sets the lighting settings.
Body Parameters:
color(string): The color to set.intensity(number): The intensity level.
Authorization: Bearer token and 'write' capability required.
AmbientWeather leverages real-time weather data to dynamically adjust indoor lighting, creating an immersive environment that responds to the weather outside. This project demonstrates the seamless integration of various technologies including Node.js, MQTT, and Raspberry Pi to achieve a smart and responsive lighting system.








