This repository contains a Python script to control a Tapo smart bulb (L530) using the Tapo API. The script allows you to toggle the bulb's state, retrieve device information, and run an ambient lighting mode that changes the bulb's color based on the dominant color of your screen.
- Toggle Bulb State: Turn the bulb on or off.
- Device Info: Retrieve and display the bulb's current state and information.
- Ambient Lighting: Automatically adjust the bulb's color to match the dominant color of your screen in real-time.
- Python 3.7+
- Required Python packages:
tapoPillownumpynumexprmssdxcampyautogui
- Clone the repository:
git clone https://github.com/Combust10/tapo-python-ambient.git
cd tapo-python-ambientpip install -r requirements.txtCreate a .env file in the root directory with the following content:
API_EMAIL=your_email@example.com
API_PASSWORD=your_password
DEVICE_IP=192.168.1.xxxRun the script:
python tapo_control.pyContributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.