Skip to content

marcf08/Lights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lights

Voice command for LIFX.

Description

Lights is a simple Python program that uses voice recognition to turn on your LIFX bulbs. Alexa and Google Home have this functionality available out of the box, but why not code it yourself?

How it works

Lights consists of only four files:

  • lights.py - Python script that runs the program.
  • helper.py - Reads the configuration token and user-defined command to toggle the lights.
  • request.py - Contains the logic and API request functions.
  • config.json - Contains the LIFX OAuth token and user-defined command to toggle the lights.

The request.py file uses Uberi's Speech Recognition module for Python.

How to use it

  1. Install Uberi's Speech Recognition module: pip install SpeechRecognition.
  2. Clone this repo.
  3. Edit config.json with your LIFX OAuth token. If you don't have a token, you can easily generate one here: LIFX Cloud Settings
  4. Run the program: python lights.py.
  5. Irreverently declare "let there be light."

Note that the LIFX API only allows for a toggle. Therefore "let there be light" will turn the lights on as well as off. Bummer.

About

Voice command for Lifx.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages