All Projects → ceejbot → nanoleaves

ceejbot / nanoleaves

Licence: ISC license
CLI and api client for the Nanoleaf Aurora light panels.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nanoleaves

nanoleaf-aurora
A java wrapper for the Nanoleaf Aurora API
Stars: ✭ 19 (-32.14%)
Mutual labels:  aurora, nanoleaf
tuya-local
Local support for Tuya devices in Home Assistant
Stars: ✭ 150 (+435.71%)
Mutual labels:  lights
hueplusplus
A simple C++ library to control Philips Hue lights on Linux, MacOS, Windows, Espressif ESP32 SDK and Arduino. Full documentation at
Stars: ✭ 48 (+71.43%)
Mutual labels:  lights
py-data-api
A user-friendly client for AWS Aurora Serverless's Data API
Stars: ✭ 37 (+32.14%)
Mutual labels:  aurora
terraform-aws-rds-cluster
Terraform module to provision an RDS Aurora cluster for MySQL or Postgres
Stars: ✭ 115 (+310.71%)
Mutual labels:  aurora
Aurora
Modern toolbox for impurity transport, neutrals and radiation modeling in magnetically-confined plasmas
Stars: ✭ 18 (-35.71%)
Mutual labels:  aurora
ABB Aurora Solar Inverter Library
Arduino, esp32 and esp8266 library for ABB (ex PowerOne) Aurora Inverter, implement a full methods to retrieve data from the Inverter via RS-485
Stars: ✭ 22 (-21.43%)
Mutual labels:  aurora
local-data-api
Data API for local, you can write unittest for AWS Aurora Serverless's Data API
Stars: ✭ 99 (+253.57%)
Mutual labels:  aurora
aurora-future-vscode-theme
💜 A futuristic vscode theme.
Stars: ✭ 27 (-3.57%)
Mutual labels:  aurora
dbal-rds-data
A driver to use the aws aurora serverless rds data api in the doctrine database abstraction layer
Stars: ✭ 24 (-14.29%)
Mutual labels:  aurora
hexo-theme-aurora
🏳️‍🌈 Futuristic auroral Hexo theme.
Stars: ✭ 681 (+2332.14%)
Mutual labels:  aurora
dice-fairlink
JDBC Driver for read-only connections on AWS RDS Clusters
Stars: ✭ 33 (+17.86%)
Mutual labels:  aurora
aurora
Apache Aurora - A Mesos framework for long-running services, cron jobs, and ad-hoc jobs
Stars: ✭ 624 (+2128.57%)
Mutual labels:  aurora
pipe-mysql.vim
MySQL client runner to query MySQL / Amazon Aurora / MariaDB database in Vim interactively (also remotely)
Stars: ✭ 51 (+82.14%)
Mutual labels:  aurora
aurora-packaging
Mirror of Apache Aurora
Stars: ✭ 23 (-17.86%)
Mutual labels:  aurora
aws-serverless-nextcloud
moved - https://github.com/f7o/aws-serverless-nextcloud
Stars: ✭ 78 (+178.57%)
Mutual labels:  aurora
lifelights
Video games blended with home automation. Control your IoT devices based on in-game statuses!
Stars: ✭ 80 (+185.71%)
Mutual labels:  lights
aurora-sdk-mac
An SDK to develop effects for Nanoleaf Light Panels using features like frequency, beat, or tempo.
Stars: ✭ 43 (+53.57%)
Mutual labels:  nanoleaf
HueLightDJ
Hue Light DJ using Hue Entertainment API
Stars: ✭ 54 (+92.86%)
Mutual labels:  lights
ad-automoli
💡 Fully automatic light management based on conditions like motion, illuminance, humidity, and other clever features
Stars: ✭ 99 (+253.57%)
Mutual labels:  lights

nanoleaves

A command-line tool for interacting with your Nanoleaf Aurora. Also includes a full API client for the Aurora!

Build Status Coverage Status on npm

CLI usage

Provide the IP address of your Aurora in the environment variable AURORA_HOST and your API access token in AURORA_TOKEN. If your AURORA is listening on an unusual port, use AURORA_PORT.

To generate a token, hold the power key until the light starts flashing, then run nanoleaves token.

$ nanoleaves --help
Commands:
  animation <name>          get details about the given animation effect
  brightness [number]       get or set the overall brightness
  effect [name]             get or set the current effect
  effects                   list available effects
  hsb <hue> <sat> <bright>  set the hue, sat, and brightness for all panels
  hue [number]              get or set the hue for all panels
  info                      get all available info about your Aurora
  layout                    show the panel layout
  mode                      get the current color mode for the Aurora
  off                       turn your Aurora off
  on                        turn your Aurora on
  panels                    show the panel ids
  random                    run a randomly-chosen effect
  saturation [number]       get or set the overall saturation
  temp [number]             get or set the overall color temperature
  token                     generate a new API access token
  upload <filename>         upload a json file containing a new animation effect

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

API usage

const AuroraAPI = require('nanoleaves');
const aurora = new AuroraAPI({
    host: '10.0.0.2',
    token: 'your-api-token'
});

aurora.info().then(info =>
{
    console.log(info);
});

The constructor will default to the values in the above-mentioned environment variables if present.

All API functions return promises.

  • newToken() - generate a new API token
  • info() - return all info about the Aurora
  • identify() - flash panels
  • animation(name) - get detailed information about a specific animation effect
  • brightness() - get the brightness for all panels
  • setBrightness(v) - set the brightness for all panels; 0-100
  • effect() - get the name of the current effect
  • effects() - return a list of the names of all effects
  • setEffect(name) - set the active effect by name
  • hue() - get the hue for all panels
  • setHue(v) - set the hue for all panels; 0-360
  • layout() - get panel layout data
  • mode() - get the Aurora's current color mode
  • off() - turn the Aurora off
  • on() - turn the Aurora on
  • orientation() - get the global orientation; 0-360
  • saturation() - get the saturation for all panels
  • setSaturation(v) - set the saturation for all panels; 0-100
  • temperature() - get the color temperature for all panels
  • setTemperature(v) - set the color temperature for all panels; 1200-6500
  • addAnimation(json) - store a new animation effect on the Aurora
  • setStaticPanel(data) - set a panel or a list of panels to a static color; see below

Static panel structure

The setStaticPanel() function pokes a single color into a specific panel. It is only useful for single frame static displays. You can call this a couple of ways. This snippet sets panel id 100 to black:

const panel = { id: '100', r: 0,  g: 0,  b: 0 };
aurora.setStaticPanel(panel);

This code does the equivalent with a full panel object:

const Aurora = require('nanoleaves');

const aurora = new Aurora();
const panel = new Aurora.Panel('100');
panel.frames = [{ r: 0, g: 0, b: 0, w: 0, transition: 50}];

aurora.setStaticPanel(panel);

You can also send a list of panels to setStaticPanel():

const list = [
	{ id: 71, r: 255, g: 0, b: 0, transition: 50 },
	{ id: 26, r: 255, g: 51, b: 17, transition: 50 },
	{ id: 72, r: 255, g: 102, b: 68, transition: 50 },
	{ id: 167, r: 255, g: 153, b: 51, transition: 50 },
];
aurora.setStaticPanel(list);

There's an example of setting an entire static animation display in examples/static-display.js. Use nanoleaves panels to get a list of valid panel ids for your setup.

License

ISC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].