A Python Flask web application for controlling WiZ smart lights and plugs via a user-friendly web interface.
- 🌈 Color Control: Change light colors using an intuitive color picker
- 💡 Brightness Control: Adjust brightness with a slider
- 🔛 Power Control: Turn lights on/off with simple buttons
- 🌐 Web Interface: Control your lights from any device with a web browser
- 📱 Responsive Design: Works on desktop, tablet, and mobile devices
- 🎨 Beautiful UI: Modern Bootstrap-based interface with gradient background
- 📋 System Tray Integration: Run the app in the background with system tray support
- Python 3.6 or higher
- WiZ smart lights/plugs connected to your local network
- Knowledge of your WiZ device's IP address
-
Clone the repository:
git clone https://github.com/Smugcurve13/wiz-control-by-SC13.git cd wiz-control-by-SC13 -
Install dependencies:
pip install -r requirements.txt
-
Configure your device IP: Open
app.pyand update theBULB_IPvariable with your WiZ device's IP address:BULB_IP = "192.168.1.18" # Replace with your device's IP
-
Start the Flask server:
python app.py
-
Access the web interface: Open your browser and navigate to
http://localhost:5000 -
Control your lights:
- Use the color picker to change light colors
- Adjust brightness with the slider
- Turn lights on/off with the power buttons
The application includes system tray functionality for running in the background:
python sysicon.pyThis will minimize the app to your system tray, allowing you to access controls without keeping a browser window open.
wiz-control-by-SC13/
├── app.py # Main Flask application
├── application.py # Alternative application entry point
├── sysicon.py # System tray integration
├── requirements.txt # Python dependencies
├── logs.txt # Application logs
├── templates/
│ └── index.html # Web interface template
├── static/
│ ├── favicon.ico # App icon
│ └── gradient.jpg # Background image
└── README.md # This file
- Flask: Web framework for the application
- requests: HTTP library for communicating with WiZ devices
- pystray: System tray integration
- Pillow: Image processing for system tray icon
- plyer: Cross-platform notification system
- beautifulsoup4: HTML parsing utilities
The application provides REST API endpoints for controlling lights:
GET /: Main web interfacePOST /control: Send commands to WiZ devices- Additional endpoints for specific light functions
- Use your router's admin panel to find connected devices
- Use network scanning tools like
nmap:nmap -sn 192.168.1.0/24
- Check the WiZ mobile app device settings
The default WiZ port 38899 is configured in the application. This is the standard port for WiZ device communication and typically doesn't need to be changed.
-
Device not responding:
- Verify the IP address is correct
- Ensure the device is on the same network
- Check that the WiZ device is powered on
-
Web interface not loading:
- Ensure port 5000 is not blocked by firewall
- Try accessing via
127.0.0.1:5000instead oflocalhost
-
Dependencies issues:
- Make sure all packages from
requirements.txtare installed - Consider using a virtual environment
- Make sure all packages from
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project was inspired by and references:
This project is open source and available under the MIT License.
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Search existing GitHub issues
- Create a new issue with detailed information about your problem
Made with ❤️ by SC13