npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-nanoleaf-aurora

v0.2.2

Published

A node-red module, which provides nodes to manipulate a Nanoleaf Aurora installation.

Downloads

14

Readme

Nanoleaf Aurora Node-Red client

A node-red module, which provides nodes to manipulate a Nanoleaf Aurora installation.

Installation

To install the stable version use the Menu - Manage palette option and search for node-red-contrib-nanoleaf-aurora, or run the following command in your Node-RED user directory (typically ~/.node-red):

npm i node-red-contrib-nanoleaf-aurora

Open your Node-RED instance and you should have Nanoleaf Aurora nodes available in the palette.

Get your access token

You can request an access token from the 'new access token' node. This is required for the other nodes to manipulate your installation.

To do so, create a flow with a inject input, new access token and debug output (or import the flow below).

[{"id":"e55b9d45.fd9998","type":"inject","z":"2d92504.e175db","name":"Create","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":100,"wires":[["cb1b93ab.818018"]]},{"id":"1aa2ee85.d5cca9","type":"debug","z":"2d92504.e175db","name":"Debug token","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":510,"y":100,"wires":[]},{"id":"cb1b93ab.818018","type":"new-access-token","z":"2d92504.e175db","host":"","query":"/api/v1/new","port":16021,"x":290,"y":100,"wires":[["1aa2ee85.d5cca9"]]},{"id":"f5b63322.d94098","type":"comment","z":"2d92504.e175db","name":"Create new access token","info":"","x":130,"y":20,"wires":[]},{"id":"cd2b5206.2cd0e8","type":"comment","z":"2d92504.e175db","name":"Change host IP address!","info":"","x":310,"y":60,"wires":[]}]

Fill in the host ip of your Nanoleaf Aurora. Deploy then hold the on-off button down for 5-7 seconds until the LED starts flashing. Triggering the inject node should result in a new access token being created and displayed in the debug area.

Use this token when creating an installation of Nanoleaf Aurora for the other nodes.

Currently tested with NanoLeaf firmware

3.1.3 If you are encountering issues with a newer firmware, please open a GitHub issue.

Current nodes implemented

Brightness

Set the current brightness.

  • Integer payload; 0 -> 100.
    • Numbers less than 0 are clipped to 0
    • Numbers greater than 100 clipped to 100
  • Object payload { brightness (0, 100], duration (seconds) }

Color

For hex and css keyword where the payload was just a string you can specify duration by creating a structure (see below) instead. Duration is an integer in seconds which defaults to 0.

HEX

{ "#RRGGBB" } or
{ "color": "#RRGGBB", "duration": [seconds] }

CSS Keyword

Available keywords can be found at https://drafts.csswg.org/css-color/#named-colors. Keywords are case insensitive.

{ "css keyword" }
{ "color": "css keyword", "duration": [seconds] }

RGB

{ r, g, b }
{ red, green, blue }
{ r, g, b, duration }
{ red, green, blue, duration }

HSV

{ h, s, v }
{ h, s, b }
{ hue, saturation, value }
{ hue, saturation, brightness }
{ h, s, v, duration }
{ h, s, b, duration }
{ hue, saturation, value, duration }
{ hue, saturation, brightness, duration }

HSL

{ h, s, l }
{ h, s, l, duration }

CMYK

{ c, m, y, k }
{ c, m, y, k, duration }

Effects

List installed effects, current effect or both

Effect

Set the current effect and start the show

Identify

Flash the Nanoleaf Aurora installation on and off (colour cannot be changed)

Installation

Shared configuration node used by all but the new access token node

Information

Dump of all the information supplied by the Nanoleaf Aurora installation

New access token

Create a new access token (see above)

Power

Switch on/off

Power status

on/off

Advanced

Direct manipulation of the restful API implemented by Nanoleaf. DO NOT use unless you know what you are doing!

Changes ahead

No more nodes planned! If you want something, please raise an issue or a pull request. Tests. All this was written 'blind' or by testing manually. If anyone could help with a PR which shows how to test at least a single node that would be much appreciated.

Changelog

0.2.2 (2019.08.03)

  • issue Fix to power-status node. Thanks to narolinus

0.2.1 (2019.07.20)

  • Messed up the npm publish. Try again...

0.2.0 (2019.07.20)

  • Changes to the API forced changes to the color node. Thanks to arrichter for pointing out the break
  • Allow the setting of a duration in the color node. For the payload types that were just a string extend to be a structure of color and duration.
  • Bumped all dependencies to latest

0.1.1 (2019.03.19)

  • issue Fix to power node for Canvas. Thanks to TonKkkkk

0.1.0 (2019.02.24)

  • Migrated from original dependency nanoleaf-aurora-client which is no longer supported. Thanks guys, the code was appreciated!
  • Moved all requests to direct calls using the axios library
  • Brightness now supports, in addition to an 'immediate' brightness an object with a transition duration
  • Power-status node can set the output payload as
    • String (default),
    • Boolean or
    • Numeric
  • Effects can set the output payload as
    • Available; array of installed effects
    • Selected; currently selected effect
    • Combined; object with both selected and available effects
  • Advanced node

0.0.5 (2019.02.22)

  • Additional color options

0.0.4 (2019.02.02)

0.0.3 (2018.08.12)

  • Added brightness node

0.0.2 (2018.08.09)

  • Added README.md

0.0.1 (2018.08.08)

  • Initial release