HueGPT is a simple tool to set colorful ambient lighting for your Philips Hue lights using OpenAI's APIs.
The backend is powered by Firebase which is used to store the generated images in Firebase Storage and the related metadata in Firestore. If you want to run the project yourself, you'll need to add your own Firebase project and add the credentials to NEXT_PUBLIC_FIREBASE_CONFIG
environment variable.
Image generation is done using DALL·E API. The generated images are then processed to extract dominant colors. You need to set your OpenAI API key in OPENAI_API_KEY
environment variable.
You also, of course, will need a Philips Hue setup with a bridge and at least one light. You should register your app with the bridge and add the credentials in the app along with the URL of the bridge. You can get started with the official guide.
The project is containerized using Docker. You can build and run the project using the following commands:
sudo docker build -t hue-gpt .
sudo docker run -p 3000:3000 --env-file .env.local hue-gpt
Copy the .env.example
file to .env.local
and add you credentials as explained above.
- Connect to the Hue bridge
- Set up Firebase Storage and Firestore
- Connect backend to Firebase & OpenAI
- Generate images using OpenAI API
- Implement image processing to extract dominant colors
- Implement light controls
- Image deletion API
- Brightness adjustment
- Secure Firebase access
- Deploy
- Make
npm run build
work 🫢 - Shuffle colors between lights
- Modifiable color palette
- Enter should trigger
Generate
button - Add proper Hue connection and API key generation
- Logout button
- Adjust brightness per light
- Option to group lights for easy selection
- Option to download the generated image