NCD.io will be offline for maintenance Thursday, March 21st from 11:00-11:30 AM CST. We thank you for your patience while we work to improve your online experience! Dismiss

You are using an unsupported browser!

Please upgrade your version of IE to at least 9, or use a modern browser such as Chrome or Firefox.

Build

In the spirit of making hardware more accessible, we’ve had our noses to the grindstone building new functionality for our favorite IoT UI, Node-Red. If you’ve never heard of it, check it out here. If you haven’t used this amazing tool yet, get ready for a treat! Node-Red is a flow-based programming tool that lends itself extremely well to IoT, and comes preloaded with enough functionality to play with that you can easily burn an entire day experimenting.

If you are already familiar with Node-Red and how to get it up and running, you can skip this tutorial, just know that depending on your platform you will require the SerialPort library or the i2c-bus library to start using the new nodes. You can see a list of available repos here. Otherwise, we will walk you through the basics below for:

Control

The dashboard you see here is provided via the node-red-dashboard. This dashboard offers some great UI control for nodes. The nodes it provides are flexible, the theme is clean, and the colors are configurable. We definitely recommend checking it out so you can get from the drawing board to manual control ASAP.

Set Up Environment

Setting up node-red is relatively simple, and since it is built on NodeJS, it’s cross-platform. There are a couple of extra requirements here since we are working with I2C devices, if your device has native I2C support (like a Raspberry Pi), that means enabling I2C. If not, you can use one of our USB to I2C adapters, but will need access to the USB ports, which will require the SerialPort library to build on your local machine. There is also a dependency on a configuration node we provide, while this can be manually included, it is much easier to ensure you have the LTS releases of NodeJS and Node-Red.

There are a few specific requirement to get this up and running, we aren’t going to re-invent the wheel, so here are the relevant links to get your platform setup:

Node-Red

Node-Red has a great page with the simple instructions for getting up and running, be sure to take note of the links for special cases like the Raspberry Pi:

Install Node-Red

I2C Bus

The NodeJS library i2c-bus is the dependency that allows us to communicate with your native I2C port. You do not need to install this library as that will be handled during installation of the NCD nodes, but some platforms require special configuration to get the I2C bus up and running. The Github page provides these configuration instructions:

Configure I2C

Serial Port

The SerialPort library gives us access to the USB ports on your computer, this library is well supported, and cross platform. Like the I2C Bus library, this library will be included as a dependency, however some platforms do require some special setup instructions. They are explained on the GitHub page:

Setup SerialPort Access

Get Building!

Now that you have everything installed, all that remains is for you to build the next big thing! We are actively expanding our node offerings to include some of our most popular products, and hope to continue at a good pace for quite awhile (we have nearly 1000 products to support after all!). If you have a product you’d like to see supported, be sure to let us know in our community. Check out the posts below to see what we’ve been building lately!

ControlAnything.com and ControlEverything Site Migration Notes

©2018 National Control Devices, LLC

ncd.io

Made in the USA
5 Year Warranty
Free Shipping on orders over $100
Free Shipping on orders over $100

To learn something new, take the path that you took yesterday. ~John Burroughs

*

Log in with your credentials

or    

Forgot your details?

Create Account