KMC CONTROLS UNO420-WIFI Wi-Fi Installation Guide

June 3, 2024
KMC CONTROLS

KMC CONTROLS UNO420-WIFI Wi-Fi

KMC-CONTROLS-UNO420-WIFI Wi-Fi-Installation-Guide-
product

Introduction

Node-RED may appear in two places in KMC Commander. The Node-RED network protocol (in Network Explorer, under Add Network) is primarily for future use. See Network Protocol (for Specific Preprogrammed Devices) on page 2. This application guide, however, is primarily about the Node-RED add-on. The Node- RED add-on functions in KMC Commander if an additional add-on license has been purchased. Click the Add-ons (cloud) icon (on the left, below the Dashboard icon) and click the Node-RED icon to open Node-RED. See Add-On (for Customer Custom Programming) on page 3.

NOTE
If you do not see the Node-RED add-on icon, you do not have the needed extra license. Contact KMC Controls for additional purchase and installation instructions.

“Types” of Node-RED with KMC Commander
Network Protocol (for Specific Preprogrammed Devices)KMC-CONTROLS-
UNO420-WIFI Wi-Fi-Installation-Guide-fig-1

The node-RED protocol option is for interfacing with local devices (such as for a leak detection kit). For such applications, the Node-RED snap (application package) must also be installed in the local KMC Commander IoT appliance/gateway. If the Node-RED snap has not been preinstalled or automatically installed, the user must install it using PuTTy (or equivalent terminal software) and the SSH (Secure SHell) credentials for that appliance.

NOTE
PuTTY is an open-source terminal emulator. For more information about SSH, see the Configuring SSH Settings topic on KMC Commander Help (or the same topic in the KMC Commander Installation Guide PDF).

To install the Node-RED snap and discover a Node-RED network

  1.  Contact KMC Controls for instructions on installing Node-RED on a local KMC Commander appliance/gateway.
  2.  See the Configuring a Node-RED Network topic on KMC Commander Help (or the same topic in the KMC Commander Installation Guide PDF) for instructions on configuring and discovering a Node-RED network.

Add-On (for Customer Custom Programming)KMC-CONTROLS-UNO420-WIFI Wi-Fi-
Installation-Guide-fig-2

The Node-RED add-on is a license to run Node-RED on a cloud server. Clicking on the Node-RED add-on shortcut redirects to that server. Seeing and using that add-on requires an additional purchased add-on license. Contact KMC Controls about purchasing the license. Node-RED is a drag-and-drop visual programming tool with a browser-based editor. It uses flow-based programming, which is a programming paradigm that defines applications as networks of “black box” processes. The “black boxes” (nodes or blocks) exchange data across predefined connections by passing messages. Node-RED was originally developed by IBM but is now open source, which has generated many free development resources. The Node-RED add-on provides a means of expanding and integrating the KMC Commander’s capabilities. Some Node-RED application examples include:

  •  Integrating KMC Commander with APIs.
  •  Connecting KMC Commander data to other devices and databases.
  •  Creating custom web pages and dashboards.
  •  Running control code for KMC Commander to command functions within HVAC controllers or other devices.

The Node-RED interface, when properly licensed, is accessible through your browser. You do not need to install any additional software on your computer to use it. The KMC Commander version of Node-RED includes palettes specific to KMC Commander. See Commander and Users Palettes on page 6.

Starting the Node-RED Add-On

KMC-CONTROLS-UNO420-WIFI Wi-Fi-
Installation-Guide-fig-3

To start using the Node-RED add-on

  1.  Click the Add-Ons (cloud) icon.
  2.  Click the Node-RED icon (which opens the Node-RED login page in a new browser tab).
  3.  Enter the login credentials. (If needed, contact KMC Controls for the default Node-RED username and password.)
  4.  Click Login.

Tabs and DeploymentKMC-CONTROLS-UNO420-WIFI Wi-Fi

CAUTION
Do NOT delete the JWT (JSON Web Token) Login tab or edit its contents! (If you do, you may not be able to log in again.)
Do NOT delete the Initialize Globals tab and be very careful about editing its contents! (If you do, a variety of functions may stop working.)–The Examples tab provides samples of reusable flows relating to KMC Commander. To find additional examples:

  1.  Go to the Menu (three lines in the upper-right corner).
  2.  Select Import, which opens the Import nodes window.
  3.  Select the Local tab.

Create new flow tabs by clicking the + to the right of the tabs. Double-click the new tab to rename, add a description, and/or delete it. The Deploy button (near the upper right corner) deploys the nodes from the editor to the server. It has four options (described in the buttons) when clicked.KMC-CONTROLS-
UNO420-WIFI Wi-Fi-Installation-Guide-fig-5

Commander and Users Palettes

KMC-CONTROLS-UNO420-WIFI Wi-Fi-
Installation-Guide-fig-6

To facilitate programming, a library of KMC Commander-specific commands are included in the Commander palette in the left pane. The Users palette has nodes relating to KMC user permissions and logins.

NOTE
Most nodes specific to KMC Commander are recognizable by their up-and-down- triangles icon.

NOTE
Additional palettes can be added by clicking the Menu (three lines)button, selecting the Manage palette, clicking the Install tab, and searching for keywords (e.g., dashboard).

To access the nodes

  •  Drag out a node/block from the palette onto the sheet/window.
  •  Double-click the node to enter properties.

NOTE
For more information about a particular node, click the node and look in the info tab.

Commander palette nodes and their functions briefly described include

  •  Baddeck—adds a deck to the dashboard.
  •  check query—provides standard query result properties.
  •  create a card—adds a card to the dashboard.
  •  createConnection—sets the (message) connection between a device and a network in the database.
  •  create device—sets the payload to create a device in the KMC Commander database.
  •  create a network—sets the payload to create a network in the KMC Commander database.
  •  create point—sets the payload to create a point in the KMC Commander database.
  •  creator—creates a variable to add to the KMC Commander database.
  •  divide point—divides a point’s current value by either a fixed value or the current value of another object.
  •  global—provides access to the global variables loaded from KMC Com-mander on the Initialize Globals tab.
  •  get props—provides point properties from the Query Check node plus an additional filter.
  •  invertCurVal—inverts the current value of a point (e.g., 1 to 1/2, 10 to 1/10).
  •  max point—finds the maximum current value of two or more points in the data flow.
  •  pinpoint—finds the minimum current value of two or more points in the data flow.
  •  name objects—sets the payload to a point name on a given device in the Com-mander database. The node creates templates for points, devices, and networks in an object-alled “topic.”
  •  negateCurVal—negates the current value of a point (e.g., 1 to –1 or 10 to –10).
  • round point—rounds the current value of points to the assigned precision (e.g., 12.3456 to 12).
  •  selectTrendData—provides trend properties from the input point plus an additional date range filter.
  •  selectTrendTimeRange—creates the time span (date range) to query the API for trend data.
  •  subpoints—sums the current value of two or more points in the KMC Com-mander database.
  •  syncToClock—Takes input from a to inject node (set for a repeating 1-second interval) and outputs a message synchronized with the real (system clock) time at the selected Sync time interval (1-minute, default).
  •  TrackPoint—adds tags to one or more points in the KMC Commander database.
  •  unto point—removes tags from one or more points in the KMC Commander database.
  •  v1Parser—converts zinc into JSON for earlier KMC Commander BX/V1 API.

User palette nodes and their functions include

  •  getPage—checks an HTTP GET response from the KMC Commander API to see if the results are complete and if not, the “next” output is triggered to perform another GET.
  •  hash8 – generates a bcrypt password hash.
  •  set Url—provides authorization for http requests accessing the API. It includes an optional query field for use when sending a query argument to the API and supports variable names for the mustache web template system.
  •  store cookies—helps store cookies to user globals.
  •  user credentials—sets the username and password for the project.
  •  v1Login—used for encryption in earlier KMC Commander BX/V1 API.
  •  verify it—sets the User Id for use in creating user-specific objects.

Usage Tips

Below are some important tips for using Node-RED with KMC Commander

  •  Nodes have only one input (unlike some blocks in KMC’s block programming), but outputs from multiple nodes can be attached to the single input of a node.
  •  An (output) debug node is needed on a string to see the results on the debug tab screen. If results from multiple debug nodes are showing in the screen, hovering over a particular text outlines the relevant node.
  •  An (input) inject node starts a flow (manually or periodically) and can inject data into the flow.
  •  A (function) switch node gives you logic capability such as (among others) greater than, is between, contains, and is true.
  •  The (function) change node is useful for narrowing down information of an object (such as reducing all the properties of an object down to just the current value). A change node also allows you to set values.
  •  Use a (User) several node when you want to pull a point from the KMC Com-mander API. Change the Query string to the desired tag. Use AND/OR to narrow down options. The syntax is the same as in Data Explorer (see the Data Explorer topic on KMC Commander Help, or the same section in the KMC Commander Installation Guide PDF).
  •  The (Commander) getGlobal node gets object information from the Initialize Globals tab so that flows can be streamlined. For example, if you need to write to a setpoint through the API, you can use global to access the ID and use the ID in the POST to update the value.
  •  KMC Commander can only provide data at a finite rate so the efficient use of bandwidth should always be considered. For example, don’t query all the points in the system on a continuous basis when a limited query will do (e.g., “sensor and temp” to get temperature sensors).

Node-RED Resources

The Node-RED add-on is meant for advanced KMC Commander users, and instructions for using Node-RED are beyond the scope of this document. For more Node-RED information:

  •  See the Examples tab for reusable flows relating to KMC Commander.
  •  Clicking a node/block displays information about it in the info tab on the right side of the screen. Click the Show help (book icon) button to see more help information about that node. (Double-clicking the node also opens the edit properties panel.) Click the i button (next to the help tab) to get back to the info tab.KMC-CONTROLS-UNO420-WIFI Wi-Fi-Installation-Guide-fig-7
  •  Click the KMC Commander logo at the upper left of the screen to go to tips at api.kmccommander.com.
  •  See nodered.org for general information.
  •  See nodered.org/docs/ for help. See especially the Cookbook for examples that can be copied and then imported into Node-RED from the clipboard.

Important Notices

The material in this document is for information purposes only. The contents and the product it describes are subject to change without notice. KMC Controls, Inc. makes no representations or warranties with respect to this document. In no event shall KMC Controls, Inc. be liable for any damages, direct or incidental, arising out of or related to the use of this document.

KMC Controls® and the KMC logo are registered trademarks of KMC Controls. KMC Commander™ is a trademark of KMC Controls. All other products or name brands mentioned are trademarks of their respective companies or organizations. All rights reserved. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language in any form by any means without the written permission of KMC Controls, Inc.

KMC Commander Support Documents
All KMC Commander support documents are available on the KMC Controls website. Type the KMC Commander part number (e.g. CMDR-ADVT-WIFI-BASE) in the Search field. Log in to see all available files. The information in the KMC Commander Installation Guide PDF is also available in an online format at help.kmccommander.com.
For advanced applications, api.kmccommander.com has information about the KMC Commander application programming interface.
NOTE: Documents, product design, and product specifications are subject to change without notice.

2022 KMC ContrKMC Commander and Node-RED Aols, Inc.

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

KMC CONTROLS User Manuals

Related Manuals