Giter Site home page Giter Site logo

xbl4z3r / spotuya Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 90 KB

SpoTuya is a simple CLI to change the color of your Tuya lights based on the cover art of the song you're listening to on Spotify.

License: GNU General Public License v3.0

JavaScript 100.00%
color colors iot music smart smart-home smarthome spotify spotify-api spotify-web-api sync synchronization tuya tuya-api tuya-cloud tuya-devices tuya-iot tuya-smart tuyapi

spotuya's Introduction

SpoTuya

SpoTuya, formerly known as Spotify-Tuya, is a simple CLI to change the color of your Tuya lights based on the cover art of the song you're listening to on Spotify. It is written in JavaScript and is easy to set up. SpoTuya uses the Tuya API to control the lights and the Spotify Web API to get the cover art of the song you're listening to. SpoTuya is a fun project that I created to learn more about the Tuya and Spotify APIs and to have a cool feature in my room. I hope you enjoy it as much as I do and remember to leave a star!

Installation

To install SpoTuya clone this repository and run npm install -g .. This will install the CLI globally on your machine. You can also install it locally by running npm install ..

Features

The latest version of SpoTuya supports the following features:

  • Change the color of your Tuya lights based on the cover art of the song you're listening to on Spotify.
  • Change the color of multiple lights at the same time.
  • Automatically reconnect to Spotify when the access token expires.
  • Start SpoTuya on system startup.

Setup

To setup SpoTuya you just have to run spotuya setup or spotuya wizard and follow the instructions. You will be asked to provide a Tuya ID, a Tuya Secret and (sometimes) a single device's virtual ID. You can find the Tuya ID and Secret in the Tuya Developer Console. The virtual ID can be found under the devices tab in the project console. Remember that you first need to add your devices to the project via the Tuya Smart app before running the SpoTuya wizard. After all that information has been provided, the wizard will ask for a Spotify Application ID and Secret and open a Spotify OAuth2 page where you will be asked to login and authorize the application.

Usage

To use SpoTuya you just have to run the command spotuya start and it will start listening for Spotify events. You can also run spotuya help to see all the available commands.

Contributing

To contribute to this project, you can follow these steps:

  1. Fork the repository to your own account.
  2. Clone the forked repository to your local machine.
  3. Create a new branch for your changes.
  4. Make your changes and commit them with a clear and concise commit message.
  5. Push your changes to your forked repository.
  6. Create a pull request to the original repository and describe your changes.

Please make sure to follow the project's coding style and guidelines when making changes. Also, be sure to test your changes thoroughly before submitting a pull request.

spotuya's People

Contributors

vlad-07 avatar xbl4z3r avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

lekk4847

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.