LIFX LAN Protocol implemented in Go
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/gen-product-map gen-product-map: Fix dead link and update docs Jan 19, 2019
light light: -0.5 in ConvertSkewRatio before multiplying Jan 18, 2019
mock Add sub-package light Jan 13, 2019
tile Add lifxlan.ReadNextResponse function Jan 13, 2019
.editorconfig Add .editorconfig file Jan 8, 2019
LICENSE Add LICENSE Jan 1, 2019
README.md Move examples to their own repository Jan 20, 2019
ack.go Add lifxlan.ReadNextResponse function Jan 13, 2019
color.go Make sure block constants have the correct type Jan 7, 2019
color_test.go Run gofmt -s against the code Jan 2, 2019
device.go Refactor Device.Send to encode payloads automatically Jan 12, 2019
discover.go Fix typos Jan 2, 2019
doc.go Minor doc tweaks Jan 1, 2019
doc_test.go Add lifxlan.ReadNextResponse function Jan 13, 2019
go.mod Implement Discover Dec 31, 2018
header.go Add lifxlan.ReadNextResponse function Jan 13, 2019
header_test.go Make HeaderLength type-less Jan 3, 2019
label.go Add lifxlan.ReadNextResponse function Jan 13, 2019
label_test.go Rename types Jan 7, 2019
messages.go Make sure block constants have the correct type Jan 7, 2019
power.go Add lifxlan.ReadNextResponse function Jan 13, 2019
power_test.go Implement GetPower and SetPower APIs Jan 7, 2019
product_map.go gen-product-map: Fix dead link and update docs Jan 19, 2019
response.go Add lifxlan.ReadNextResponse function Jan 13, 2019
send.go Refactor Device.Send to encode payloads automatically Jan 12, 2019
target.go Make RawLabel and Target implementing flag.Getter Jan 6, 2019
target_test.go Revert "Remove ParseTarget" Jan 3, 2019
time.go Change Timestamp from ms to ns since EPOCH Jan 7, 2019
time_test.go Change Timestamp from ms to ns since EPOCH Jan 7, 2019
timeout.go Move tile to its own package Dec 31, 2018
version.go Add lifxlan.ReadNextResponse function Jan 13, 2019
version_test.go Rename types Jan 7, 2019

README.md

GoDoc Go Report Card

LIFX LAN

This is a library that provides API implemented in Go for LIFX LAN Protocol.

Overview

The root package focuses on the base stuff, device discovery, and capabilities shared by all types of devices. Subpackages provide more concreted capabilities by different types of LIFX devices like light control and tile control.

Currently this library is not complete and implement all possible LIFX LAN Protocols is not the current goal of this library. The design choice for this library is that it exposes as much as possible, so another third party package can implement missing device APIs by wrapping Devices returned by this package. Please refer to the subpackage code for an example of extending device capabilities. The reason its split into subpackages is to make sure that it's extendible.

The main focus right now is on tile API support. The reason is that at the time of writing, although there are several Go projects implemented LIFX LAN Protocol available, none of them support tile APIs. Please refer to tile subpackage on GoDoc for more details.

All API with (potential) I/O calls takes a context arg and checks for (and in most cases, relies on) context cancellations.

The API is unstable right now, but I try very hard not to break them.

Examples

Besides examples on GoDoc, there are also some example command line apps in lifxlan-examples repository.

License

BSD License.