auroraops

所属分类:数据库系统
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2018-03-31 23:14:45
上 传 者sh-1993
说明:  一种允许您以编程方式与纳米叶极光交互的工具。,
(A tool that allows you to interact with a nanoleaf aurora programmatically.,)

文件列表:
.goreleaser.yml (853, 2018-03-31)
Gopkg.lock (4930, 2018-03-31)
Gopkg.toml (874, 2018-03-31)
IMG_3687.jpg (1767018, 2018-03-31)
IMG_3687_tn.jpg (24758, 2018-03-31)
LICENSE (1071, 2018-03-31)
action.go (1822, 2018-03-31)
breath.go (2206, 2018-03-31)
client/ (0, 2018-03-31)
client/api.go (4119, 2018-03-31)
client/discover.go (622, 2018-03-31)
client/doc.go (204, 2018-03-31)
client/external.go (1846, 2018-03-31)
client/structures.go (1438, 2018-03-31)
cmd/ (0, 2018-03-31)
cmd/auroraops/ (0, 2018-03-31)
cmd/auroraops/internal/ (0, 2018-03-31)
cmd/auroraops/internal/root.go (7429, 2018-03-31)
cmd/auroraops/main.go (201, 2018-03-31)
cmd/statushost/ (0, 2018-03-31)
cmd/statushost/main.go (1034, 2018-03-31)
magefile.go (1409, 2018-03-31)
panel.go (372, 2018-03-31)
poller.go (1844, 2018-03-31)
things.go (4379, 2018-03-31)
updater.go (3287, 2018-03-31)

# auroraops The `auroraops` program allows you to interact with a nanoleaf aurora. This application uses local and remote configuration to programmatically update individual or groups of panels (triangles). Demo: https://youtu.be/ePlpQkaogdI # Configuration There are two different configuration sets used. The first is **local** configuration that describes the behavior of statuses and how panels are grouped together by "thing". The second is **remote** configuration that tells the application what the current state of things is. ## Local Configuration Local configuration can be described through configuration files or environment variables thanks to [viper](https://github.com/spf13/viper). The search paths for configuration are the current directory, $HOME/.auroraops/, and /etc/auroraops/. In those directories, the application will attempt to load either `auroraops.json` or `auroraops.yaml`. A configuration file can also be set through the `server --config PATH` command line parameter. The default location for remote configuration is `http://localhost:8080/` and the interval is 3 seconds. There is no default configuration for either the address of the Aurora to command or the key used to authenticate. These configuration variables must be set for the application to work. Status and thing configuration is meant to be flexible and work out of the box. A very simple configuration could have 3 status for "up" (green), "down" (red), and "unknown" (silver) and one thing called "website" that all of our panels will reflect the status of. Colors must be provided in HEX. ``` panel: url: "http://192.168.1.150:16021" key: "myspecialkey" status: location: "https://ci-info.ourgreatapp.io/status.json" interval: 60 status: unknown: type: solid color: "#808080" up: type: solid color: "#008000" down: type: solid color: "#FF0000" things: "website": panels: [13, 71, 89, 91, 250, 102, 235, 167, 11, 39, 34, 28] ``` Additionaly, the application can have `onstart` and `onstop` configuration used to "clear out" the aurora before and after use. Thins can also have individual `onstart` configuration for more complex configurations. ## Remote Configuration Remote configuration is requested periodically through an HTTP GET request. Content type is ignored, but the body must be valid json. The parsed JSON object is just simple string key/value pairs. ``` { "website": "up } ``` # Setup To use this application, you must have authentication for the Aurora as well as know the layout of panels. ## Authentication The `init` subcommand can be used to get authentication configuration and bootstrap a configuration file. Running the command will look for Aurora installations on your local network that are in pairing mode once. This is the process: 1. Run the `init` subcommand and wait for the prompt. (`auroraops init auroraops.yaml`) 2. Physically go the aurora and hold the power button down for 5 seconds so that you start to see a blinking light. 3. Hit "enter" and get confirmation that the configuration was written. ## Info The `info` subcommand can be used to list all of the panels and set unique colors for each to make configuration easier. This command requires authentication via a configuration file. The `init` command be run and the configuration file include both the panel url and key. Example output will look like: ``` Setting panel 13 to blue Setting panel 71 to purple Setting panel 89 to olive Setting panel 91 to white Setting panel 250 to grey Setting panel 102 to red Setting panel 235 to aqua Setting panel 167 to teal Setting panel 11 to fuchsia Setting panel 39 to maroon Setting panel 34 to yellow Setting panel 28 to lime ``` [ ![Alt text](https://github.com/ngerakines/auroraops/raw/master/IMG_3687_tn.jpg?raw=true) ](https://github.com/ngerakines/auroraops/raw/master/IMG_3687.jpg?raw=true) # License Copyright 2018 Nick Gerakines This project is open source under the MIT license.

近期下载者

相关文件


收藏者