Sync your TP-Link Tapo lights with Spotify album art in real time.
| Device |
|---|
| L530 |
| L535 |
| L630 |
| L900 |
| L920 |
| L930 |
It uses Tapo to handle device connections, so the supported devices are same as devices supporting set_hue_saturation, you can check it here Supported Devices
- Download the correct package for your system from the Releases page.
- Create a
config.yamlfile (see the example here: config.example.yaml). - Configure
config.yamlas described below. - Run the app
Write the email and password of your tapo account that is used to control the device through tapo app
Example
email: email
password: passwordYou can add one or multiple devices that will handled by the application. To get the model name and ip address you can use the tapo app
Open tapo app -> Select the device -> Click the settings button on top right corner -> Device info -> Model & IP address will be visible here
Example
devices:
- type: L900
ip: 192.168.0.1
# if multiple devices
- type: L900
ip: 192.168.0.2login_type can be oauth or connect
As of writing the readme, Spotify has temporarily restricted the creation of new developer applications, if you already have a application this method can be used
Steps to create spotify app
- Go to the Spotify dashboard
- Click Create an app
- You now can see your Client ID
- Now click Edit Settings
- Add http://localhost:8888/callback to the Redirect URIs
- Scroll down and click Save
Open the config.yaml and set the login_type to oauth, add the client id and redirect_uri
Example
spotify:
login_type: oauth
client_id: client_id
redirect_uri: http://localhost:8888/callbackWarning
Connect method uses SpotAPI which uses spotify internal API, by using this method you agree with the risk mentioned here NOTICE
This method does not require a Spotify developer application, instead it uses spotify cookies
Open the browser where spotify is logged -> Press F12 or Ctrl + Shift + I (whichever works) -> Select Application in top bar -> Select Cookies then https://open.spotify.com -> There you will see the sp_dc & sp_t cookies value
Open the config.yaml and set the login_type to connect, add spotify email, sp_dc and sp_t cookies value
Example
spotify:
login_type: connect
sp_dc:
sp_t:
email:| Key | Type | Default | Accepted Value | Description |
|---|---|---|---|---|
| off_on_pause |
bool | true | true/false | Turns off the lights when the music is paused |
| off_on_stop | bool | true | true/false | Turns off the lights when the music is stopped |
- Download or clone the repo
- Open the terminal in that directory
- Run
uv sync - Activate the virtual environment:
- Linux/macOS:
source .venv/bin/activate - Windows:
.venv\Scripts\activate
- Linux/macOS:
- Create
config.yaml - Run
python main.py
- Create a virtual env
python -m venv .venv - Activate the virtual environment:
- Linux/macOS:
source .venv/bin/activate - Windows:
.venv\Scripts\activate
- Linux/macOS:
- Run
pip install . - Create config.yaml
- Run
python main.py
This project is not affiliated with, endorsed by, or sponsored by Spotify or TP-Link. Use of Spotify internal APIs (via the Connect method) may violate Spotify’s Terms of Service. Use at your own risk.
