1.0.0 • Published 7 years ago
huelog v1.0.0
huelog
Tiny CLI utility that transforms Phillips Hue API lights status responses to CSV logs, keeping only state information.
See test/example-transformed.csv for an example output.
Setup
npm install huelog -g
Usage
| Flag | Shortcut | Type | Description |
|---|---|---|---|
--header | -H | bool | Force column headers to be printed in output |
--output | -o | file | Write to FILE rather than stdout |
--skip | -s | bool | Skip logging of duplicated status responses |
--time | -t | date | Pass a time to be logged instead of current time |
huelog doesn't collect data by itself, it gets feed with data from other sources:
Log to stdout with column headers
$ hueadm lights --json | huelog --headerLog to file
$ hueadm lights --json | huelog --output ./huelog.csvData will be appended if the output file exists.
Note
In the examples above I'm piping in data using hueadm, a CLI to phillips hue that allows for easy management of your lights and much more.
You can however use any tool you want to collect the lights data, input just has to be a valid Phillips Hue API response in JSON for the /lights endpoint, e.g.: