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-ui-led2

v0.4.19

Published

A simple LED status indicator for the Node-RED Dashboard

Downloads

736

Readme

Node-RED UI LED

A simple LED status indicator for the Node-RED Dashboard

CI FOSSA Status

dependencies peer-dependencies dev-dependencies optional-dependencies

Examples Image

The node uses msg.payload's value to determine status. By default:

  • msg.payload === true - Green
  • msg.payload === false - Red
  • no msg received yet or msg.payload !== true and msg.payload !== false - Gray

New in this variant: The node can not only use values from msg.payload to determine the status, elements of an object can also be specified (e.g. msg.payload.state).

Install

To install the node run the following from your Node-RED user directory (~/.node-red):

npm install node-red-contrib-ui-led

Or install the node from the Palette section of your Node-RED editor by searching by name (node-red-contrib-ui-led).

Aesthetics

There are a number of options when it comes to the node's aesthetics.

Most other customization happens in the Edit panel, which includes a preview so you can tweak to your heart's content.

Edit panel

Custom Statuses

Although true => Green and false => Red is the default, one can map other payload values to any color.

To customize the mappings open the node's configuration panel and scroll to the Colors for Values list.

Colors for Values Image

To add a value mapping press the +Color button at the bottom of the list.

Next fill in a color in a CSS format (color name, hex, rgb, rgba...), select the value type (string, boolean...) and fill in an appropriate value.

Similarly existing Value => Color maps can be modified.

Finally to delete a mapping simply press the X button on the far right!

Custom Statuses in msg

By enabling Allow Color For Value map in msg in a node that node will use dictionaries passed via msg.colorForValue to override any previous color to value mappings.

The format should be value => color, ie an object whose key values return color values.

Example:

msg.colorForValue = {}
msg.colorForValue[true] = 'purple'
msg.colorForValue[false] = 'orange'

Further Examples

To see usages already set up check out the examples included with the project by using Import in your Node-RED editor!

License

FOSSA Status

Thanks to