GithubHelp home page GithubHelp logo

sarasafavi / lifx-simple Goto Github PK

View Code? Open in Web Editor NEW

This project forked from petrklus/lifx-simple

0.0 0.0 0.0 18 KB

Controlling LiFX bulbs using command line. Pure Python 2.7

License: MIT License

Python 100.00%

lifx-simple's Introduction

lifx-simple

Controlling LiFX bulbs using command line. Supports colour setting with 2.0 firmware

Supported actions

Colour setting via including hue, saturation, brightness and temperature. Sends packet multiple times based on the retries defined in the file itself. Hue ranges between 0-360, saturation and brightness between 0 and 100 and temperature between 2500 and 9000.

Example usage

Setting hue to 120, saturation to 50, brightness to 100 and temperature to 3500K ./set_colour.py 192.168.2.222 120 50 100 3500

Webservice

I have also included simple webservice that stays loaded and listens to ACKs for the colour packets. Bottle is used to provide simple HTTP API. Only colour setting is supported, akin to the standalone command-line version. The packet parsing functionality is separated into receive.py. Despite the tool's simplicity, an effort has been made for all of the operations to be thread-safe and is intended for production use. Please report any issues!

Example URL: http://localhost:8888/192.168.2.222/90/100/100/3500

Requirements

  • Python 2.7
  • Knowledge of the IP address of the bulb. You can configure your router to assign static IPs to the bulbs, this eliminates any need of discovery
  • see requirements.txt to run built-in webservice

Tested on Linux (raspberry PI) and Mac OS 10.9

Resources

lifx-simple's People

Contributors

petrklus avatar

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.