✅ AI Service Running on port 5001
✅ Backend Running on port 3001
✅ Frontend Running on port 8080
✅ Database Connected - 2 appliances stored
✅ Peak Hours Calculated - 18:00-22:00 (from 29 household CSVs)
- ✅ Database Path - Changed from
../../backend/to../backend/ - ✅ Port Conflict - Moved from 5000 (macOS AirPlay) to 5001
- ✅ Missing pandas - Added to requirements
- ✅ Pinecone Package - Updated from
pinecone-clienttopinecone - ✅ Fallback Mechanism - Recommendations work without OpenAI
- Go to
http://localhost:8080 - Fill out the form:
- Date: Today's date
- Hours: 3
- Appliance Name: "Air Conditioner"
- Click "Add Appliance"
- Watch the "Smart Recommendations" section
The recommendations should:
- Show actual peak hours: 18:00-19:00, 19:00-20:00, 20:00-21:00, 21:00-22:00
- Display appliance-specific tips
- Update the appliance count
- Change recommendations based on what you added
Open Developer Tools (F12) → Console tab:
- Should see: "Appliance usage saved successfully"
- No red errors about CORS or 404
# Check AI service health
curl http://localhost:5001/health
# Get current recommendations
curl http://localhost:5001/api/ai/recommendations
# Check backend data
curl http://localhost:3001/api/appliances- Check the event is firing: Open browser console, add appliance, look for logs
- Manual refresh: Click the "Refresh Recommendations" button
- Hard refresh: Press Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
The system is using fallback recommendations (offline mode). To restore full AI features:
- Add credits to your OpenAI account: https://platform.openai.com/account/billing
- Or use a different API key in
/ai_service/.env
The fallback provides:
- ✅ Peak hours from real data
- ✅ Appliance-specific recommendations
- ✅ Energy savings estimates
- ❌ No RAG from Pinecone
- ❌ No GPT-generated natural language
Check what's stored:
cd /Users/sophia/Documents/GitHub/Sparky-Mcsparkface
sqlite3 backend/appliances.db "SELECT * FROM appliance_usage;"- Test adding different appliances (Washing Machine, Oven, etc.)
- Verify recommendations change for each appliance type
- Check peak hours are displayed correctly
- Test the progress ring (mark recommendations as complete)