lifxlan
lifxlan is a Python 3 library that controls LIFX lights over a local network by implementing the LIFX LAN protocol directly, without going through LIFX's cloud service.
lifxlan implements the LIFX LAN protocol specification so Python code can discover and control LIFX devices, such as bulbs, over a local network. It supports white, color, multizone (LIFX Z, LIFX Beam), infrared (LIFX+) and chain (LIFX Tile) devices, group-based control of arbitrary sets of lights, and Unicode names for devices, groups and locations.
The library is organized around a small class hierarchy: a LifxLAN object represents the local network and can discover devices automatically or address them directly by MAC and IP address, Device provides low-level unicast messaging, and Light, MultiZoneLight and TileChain subclass it to add device-specific capabilities. Developers can use the high-level API directly, build their own API on the low-level networking layer, or build virtual LIFX devices in software.