Crate lifx_core[−][src]
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.
Discovery
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
Reserved fields
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.
Unknown values
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 offical LIFX apps, but that aren't documented.
Structs
BuildOptions | |
EchoPayload | |
Frame |
The Frame section contains information about the following: |
FrameAddress |
The Frame Address section contains the following routing information: |
HSBK |
Bulb color (Hue-Saturation-Brightness-Kelvin) |
LifxIdent | |
LifxString |
Lifx strings are fixed-length (32-bytes maximum) |
ProtocolHeader | |
RawMessage |
The raw message structure |
Enums
ApplicationRequest | |
Error | |
Message |
Decoded LIFX Messages |
PowerLevel | |
Service |