WiZ Smart Bulb Manager is a Python-based graphical user interface (GUI) application that allows you to discover, control, and manage your WiZ smart bulbs on your local network. With this tool, you can easily turn your lights on or off, organize devices by rooms, rename rooms, remove devices, and monitor the status of each bulb in real-time.
- Device Discovery: Automatically discover WiZ smart bulbs on your local network.
- Room Management: Organize devices by rooms and rename rooms as needed.
- Device Control: Turn individual devices on or off or control all devices within a room simultaneously.
- Remove Devices: Easily remove devices from the manager.
- Real-time Logging: Monitor actions and device statuses in real-time.
- Offline Device Detection: Identify and display devices that are offline.
- Persistent Data: Save device and room configurations for future sessions.
- Python 3.6 or newer: Ensure Python is installed on your system. You can download it from python.org.
git clone https://github.com/yourusername/wiz-smart-bulb-manager.git
cd wiz-smart-bulb-managerCreating a virtual environment helps manage dependencies and keep your project isolated.
python -m venv venvActivate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
Install the required Python packages using pip:
pip install -r requirements.txtIf you don't have a requirements.txt file, you can create one with the following content:
# requirements.txtNote: tkinter is usually included with Python on most systems. If it's not installed, follow the instructions below:
-
On Debian/Ubuntu:
sudo apt-get install python3-tk
-
On macOS:
tkinteris included in the standard Python installation. -
On Windows:
tkinteris included in the standard Python installation.
To start the WiZ Smart Bulb Manager, navigate to the project directory and run:
python wiz_gui.py- Discover Devices: Click the "Discover Devices" button to scan your local network for WiZ smart bulbs.
- View Devices: Discovered devices will be listed, organized by rooms.
- Control Devices:
- Individual Control: Use the "Turn On" and "Turn Off" buttons next to each device to control them individually.
- Room Control: Use the "Turn All On" and "Turn All Off" buttons in the room header to control all devices within that room simultaneously.
- Manage Rooms:
- Rename Room: Click the "Rename Room" button to assign a custom name to a room.
- Remove Devices: Click the "Remove" button next to a device to remove it from the manager.
- Monitor Logs: The log section displays real-time actions and device statuses.
The application uses a wiz_data.json file to store persistent data such as room names and device information. This file is automatically created and managed by the application.
-
Location: The
wiz_data.jsonfile is located in the same directory as the Python scripts. -
Structure:
{ "rooms": { "1": "Living Room", "2": "Bedroom" }, "devices": { "192.168.87.10": { "ip": "192.168.87.10", "moduleName": "Bulb A", "info": { ... } }, "192.168.87.11": { "ip": "192.168.87.11", "moduleName": "Bulb B", "info": { ... } } } }
The application primarily uses Python's standard libraries:
tkinter: For the graphical user interface.socket: For network communication.json: For handling JSON data.threading: For managing background tasks.logging: For logging actions and errors.
- Logging: Enhanced logging for better debugging and monitoring.
Contributions are welcome! To contribute to WiZ Smart Bulb Manager:
-
Fork the Repository
-
Create a Feature Branch
git checkout -b feature/YourFeature
-
Commit Your Changes
git commit -m "Add a new feature" -
Push to the Branch
git push origin feature/YourFeature
-
Open a Pull Request
Please ensure your code follows the existing style and includes appropriate documentation.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or support, open an issue on the GitHub repository or contact your email.