This crate provides low-level message types and structures for dealing with the LIFX LAN protocol.
This lets you control lights on your local area network. More info can be found here: https://lan.developer.lifx.com/
Since this is a low-level library, it does not deal with issues like talking to the network, caching light state, or waiting for replies. This should be done at a higher-level library.
To discover lights on your LAN, send a Message::GetService message as a UDP broadcast to port 56700. When a device is discovered, the Service types and IP port are provided. To get additional info about each device, send additional Get messages directly to each device (by setting the FrameAddress::target field to the bulbs target ID, and then send a UDP packet to the IP address associated with the device).
When constructing packets, you must always set every reserved field to zero. However, it’s possible to receive packets with these fields set to non-zero values. Be conservative in what you send, and liberal in what you accept.
It’s common to see packets for LIFX bulbs that don’t match the documented protocol. These are suspected to be internal messages that are used by official LIFX apps, but that aren’t documented.