All Projects â†’ cydrobolt â†’ pifx

cydrobolt / pifx

Licence: Apache-2.0 license
💡 A Python library for the LIFX cloud HTTP API

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to pifx

LIFX-Control-Panel
As LIFX no longer supports their Windows 10 app, I created an open-source alternative for controlling LIFX-brand smart lights.
Stars: ✭ 137 (+179.59%)
Mutual labels:  lifx
automate-home
Yet another python home automation (iot) project. Because a smart light is more than just on or off.
Stars: ✭ 59 (+20.41%)
Mutual labels:  lifx
spotify-lifx-visualiser
Visualising Spotify music with LIFX bulbs
Stars: ✭ 28 (-42.86%)
Mutual labels:  lifx
LIFX-Menu
OSX menu bar app to control LIFX bulbs
Stars: ✭ 24 (-51.02%)
Mutual labels:  lifx
script.kodi.lifx.ambilight
💡📺🌈Kodi add-on for Lifx lights with ambilight support.
Stars: ✭ 28 (-42.86%)
Mutual labels:  lifx
homebridge-lifx-lan
LiFx LAN platform plugin for Homebridge
Stars: ✭ 83 (+69.39%)
Mutual labels:  lifx

PyPI

A Python library for the LIFX cloud HTTP API

Installing PIFX

Install PIFX using pip:

  • pip install pifx

Install PIFX from source:

  • git clone https://github.com/cydrobolt/pifx.git
  • cd pifx
  • python setup.py install

Using PIFX

Create an API key

Importing PIFX in your Python file:

  • from pifx import PIFX

Creating a PIFX instance:

  • p = PIFX('API_KEY_GOES_HERE')

Performing PIFX actions:

import pifx

p = pifx.PIFX(api_key='API_KEY_GOES_HERE')

p.toggle_power() # toggle all lights
p.toggle_power('label:Bedroom') # toggle light with label "Bedroom"

p.set_state(color='blue', brightness='0.85') # set brightness to 85% and color to blue
p.pulse_lights(color='red', period=2.5) # pulse lights with a period of 2.5 seconds

Read the docs for full usage instructions.

Hacking on PIFX

Running tests:

  • pip install nose
  • nosetests

Contributing:

  • We appreciate contributions from all users.
  • Fork the project, add your changes, and make a pull request.
  • Thank you!

Other information

PIFX is an open source library not affiliated or endorsed by LIFX ®

 Copyright © 2015-2018 Chaoyi Zha <[email protected]>

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].