HomeNetAI is a full-stack smart home dashboard that combines real-time weather monitoring, smart device management, Raspberry Pi Pico IoT integration, and AI insights into a unified platform.
What HomeNetAI Does:
- Monitor Weather - Track real-time weather data and forecasts for multiple locations
- Control Smart Devices - Manage thermostats, lights, sensors, and other smart home devices
- Connect IoT Hardware - Integrate Raspberry Pi Pico devices for real sensor data (temperature, humidity, pressure)
- Get AI Insights - Chat with an AI assistant powered by Google Gemini that understands your home's data
- Analyze Trends - View ML-powered analytics with trend detection and anomaly alerts
-
Install Prerequisites
- PostgreSQL database
- Python 3.8+
- Node.js 18+
-
Setup Backend
cd Fall_25_HomeNetAI pip install -r requirements.txt cd backend python start_backend.py
Backend runs at: http://localhost:8000
-
Setup Frontend
cd frontend npm install npm run devFrontend runs at: http://localhost:8080
Prerequisites:
- Raspberry Pi Pico W (with WiFi)
- USB cable
pico-setup.exetool (frompico-pi/cmd/pico-setup)
Step-by-Step Setup:
-
Run the Pico Setup Tool
cd ./pico-pi/cmd/pico-setup ./pico-setup.exe -
Login with Your Credentials
- Enter your HomeNetAI username and password
- The tool authenticates against the cloud Pico API
-
Connect Your Pico Device
- Pico broadcasts an Access Point (AP)
- Connect to the Pico's WiFi network from your computer
- The setup tool sends your WiFi credentials and user ID
-
Automatic Device Registration
- Pico receives credentials and restarts
- Connects to your WiFi network
- Automatically registers with the Pico API
- Registers sensor modules (thermostat, weather sensors)
- Starts sending sensor data every 5 seconds
-
View Your Pico Devices
- Navigate to http://localhost:8080/pico-devices
- Your registered Pico devices appear automatically
Using Pico Devices:
- Send Commands - Click "Send Command" to run
BLINK_PICO1(blinks onboard LED) - Change WiFi - Click "Change WiFi" to update network settings for all devices
- View Readings - Click ⚡ to see temperature, humidity, and pressure data
Pico Architecture:
User → pico-setup.exe → Login (Cloud Pico API)
↓
Pico Device ← WiFi Credentials + User ID
↓
Connect to WiFi → Register Device (Cloud API)
↓
Register Modules → Start Sending Data
↓
Dashboard ← Fetch Devices by user_id ← Cloud Pico API
Cloud Pico API: https://iot-picopi-module.onrender.com/api/v1
- User Authentication - Register and login with JWT tokens
- Location Management - Add and manage weather locations
- Real-Time Weather - Current weather and 7-day forecasts
- Smart Home Devices - Add and control smart devices
- Raspberry Pi Pico Integration - Connect and manage Pico devices
- Device Commands - Send commands to Pico devices (blink LED, change WiFi)
- Sensor Readings - View real-time temperature, humidity, and pressure data
- AI Chatbot - Context-aware AI assistant using Google Gemini
- ML Analytics - Trend analysis and anomaly detection with scikit-learn
- Weather Scheduler - Automatic weather data collection
Authentication:
POST /auth/register- Create accountPOST /auth/login- LoginGET /auth/me- Get current user
Locations:
GET /locations/search?query={city}- Search citiesGET /locations- Get your locationsPOST /locations- Add locationDELETE /locations/{id}- Delete location
Weather:
GET /weather/{location_id}- Get weather data
Devices:
GET /devices- Get your devicesPOST /devices- Add devicePUT /devices/{id}- Update deviceDELETE /devices/{id}- Delete device
Pico Devices (via Proxy):
GET /proxy/pico/users/{user_id}/device-modules- Get all Pico devicesPOST /proxy/pico/commands- Send command to Pico deviceGET /proxy/pico/device-modules/{module_id}/latest- Get latest sensor reading
AI & Analytics:
POST /ai/chat- Chat with AI assistantGET /ai/insights- Get AI-generated insightsGET /analytics/trends/{location_id}- Get trend analysisGET /analytics/anomalies/{location_id}- Get anomaly detection
Tools Used:
- VS Code - Primary IDE
- Git/GitHub - Version control and collaboration
- PostgreSQL - Relational database
- Postman - API testing
Backend (Python):
- FastAPI - Web framework
- Pydantic - Data validation
- google-generativeai - Gemini AI integration
- pandas, numpy, scikit-learn - ML/Analytics
- psycopg2 - PostgreSQL driver
- python-jose - JWT authentication
Frontend (TypeScript/React):
- React 18 - UI framework
- Vite - Build tool
- Tailwind CSS - Styling
- shadcn/ui - Component library
- React Router - Navigation
IoT (Go/MicroPython):
- Raspberry Pi Pico W
- MicroPython firmware
- Go - Pico setup tool
| Name | Role | Contributions |
|---|---|---|
| Ethan | Developer | AI/ML integration, Analytics, Dashboard charts, Chatbot |
| Nathan Luckock | Developer | Dashboard redesign, Login system, Documentation |
| Ian McMaster | Developer | Repository setup, GitHub project board, License |
| Moroni Motta | Developer | Pico module, Devices page, Dashboard weather |
| Joshua Chapman | Developer | Branch merging, Dev integration |
| Tyler Burdett | Developer | Settings page, Backend routes |
- FastAPI Documentation
- React Documentation
- Open-Meteo Weather API
- Google Gemini AI
- Tailwind CSS
- shadcn/ui Components
- Raspberry Pi Pico Documentation
- scikit-learn Documentation
- Real Sensor Integration - Connect more physical IoT sensors beyond Pico
- Mobile App - React Native version for iOS/Android
- Energy Usage Predictions - ML model for predicting energy consumption
- Multi-user Household - Share devices and locations with family members
- Alert Notifications - Push notifications via ntfy.sh for weather alerts
- Historical Data Export - Download weather/sensor data as CSV
- Voice Control - Integration with Alexa or Google Assistant
- Automated Routines - "If temperature drops below X, turn on heater"