Skip to main content

AioLifxC

https://img.shields.io/pypi/v/aiolifxc.svg https://img.shields.io/travis/brianmay/aiolifxc.svg Documentation Status Updates

AioLifxC is a Python 3/asyncio library to control Lifx LED lightbulbs over your LAN.

Most of it was originally taken from the Meghan Clarkk lifxlan package and adapted to Python 3 (and asyncio obviously)

This is a fork from François Wautier’s package. It uses coroutines as opposed to callbacks. If you prefer callbacks, please see his implementation instead. This was forked from version 0.5.0.

Installation

We are on PyPi so:

pip3 install aiolifxc

or:

python3 -m pip install aiolifxc

How to use

In essence, the test program is this:

def readin():
"""Reading from stdin and displaying menu"""

    selection = sys.stdin.readline().strip("\n")
    DoSomething()

loop = aio.get_event_loop()
devices = Devices(loop=loop)

loop.add_reader(sys.stdin, readin)

devices.start_discover()

try:
    loop.run_forever()
except Exception as e:
    print("Got exception %s" % e)
finally:
    loop.remove_reader(sys.stdin)
    loop.close()

Other things worth noting:

  • Whilst LifxDiscover uses UDP broadcast, the bulbs are connected with Unicast UDP

  • The socket connecting to a bulb is not closed unless the bulb is deemed to have gone the way of the Dodo. I’ve been using that for days with no problem

  • You can select to used IPv6 connection to the bulbs by passing an IPv6 prefix to LifxDiscover. It’s only been tried with /64 prefix. If you want to use a /48 prefix, add “:” (colon) at the end of the prefix and pray. (This means 2 colons at the end!)

  • I only have Original 1000, so I could not test with other types of bulbs

  • Unlike in lifxlan, set_waveform takes a dictionary with the right keys instead of all those parameters

History

1.0.0 (UNRELEASED)

Changed

  • Add more log messages.

  • Fix display of selected devices in sample app.

  • Simplify API. Merge device classes into light classes.

0.5.6 (2017-09-22)

Changed

  • Update pip dependancies.

  • Simplify start_discovery function.

  • Update to Beta status.

  • Fix API docs on readthedocs.

Fixed

  • Update MANIFEST.in file.

0.5.5 (2017-07-11)

Changed

  • Update mypy from 0.511 to 0.520

Fixed

  • Ensure we act on selected device in sample client.

  • Fix mypy errors.

  • Fix message size calculation.

  • Add configurable grace period for unregister.

0.5.4 (2017-07-07)

Fixed

  • Fix failure to re-register a light that went off-line.

0.5.3 (2017-07-03)

Fixed

  • Fixed FD resource leak in discovery of existing lights.

0.5.2 (2017-07-02)

Changed

  • Significant changes. Improvements to the API. Type hints, doc strings, etc.

0.5.1 (2017-06-26)

Release files for aiolifxc 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiolifxc 1.0.0
File Size Uploaded
aiolifxc-1.0.0.tar.gz 34.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiolifxc 1.0.0
File Interpreter ABI Platform
aiolifxc-1.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 62.6 kB

Release files / aiolifxc-1.0.0.tar.gz

Download URL aiolifxc-1.0.0.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
380eb0b239b747ef2df33ffb5803691e0e183a10fffcabe7d7eea09751ea4530
BLAKE2b-256 checksum
How to use checksums
01e6d9a4aafc70c57fccbd4170641c6780d3f2d8463d8f2feddeb3ebaaa16c12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / aiolifxc-1.0.0-py2.py3-none-any.whl

Download URL aiolifxc-1.0.0-py2.py3-none-any.whl
Size 28.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e3d756dc064559fda79fd7c5a086714492f9e6d13d7669efc45baa783562683e
BLAKE2b-256 checksum
How to use checksums
e4b9b7c65fe519331ce9389d452819e181f7615060aee286421204d605124625
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page