huelog
v1.0.0
Published
Log Hue lights API responses to CSV
Downloads
2
Readme
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 --header
Log to file
$ hueadm lights --json | huelog --output ./huelog.csv
Data 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.: