This provides an interface to the At Your Service agent from within Node-RED. This is accomplished by adding an ays-agent
subflow and adding two global environment variables.
Please note: The agent has only been tested on Node-RED v3.1.6.
There are two ways to install the ays-agent
subflow.
1. Node-RED
- Open Node-RED
- Top right menu button >
Settings
>Palette
> (tab)Install
- Search for the
bithead/node-red-ays-agent
module - Install
2. NPM
- Open a terminal
- Change directory to the Node-RED config directory (e.g.
cd ~/.node-red
) - Install module using NPM
npm install @bithead/node-red-ays-agent
Drag the ays-agent
node into your flow. It should be located in the network
category.
Connect any of your HW/SW systems to the ays-agent
input. The input must be a numeric value.
Parameters:
-
Config
global configuration that can be used by anays-agent
node instance-
Server
the location to the AYS Agent Service endpoint -
Org Secret
the respective secret for the organization node sending samples to -
Parent
(optional) the path to the parent node. Set this value if you intend to use the same parent for all agents.
-
-
Parent Node
the path to the parent node. Your child lives under this node. Leave this empty to use theConfig.Parent Node
value. Otherwise, it will override the value. -
Child Node
The name of the child node. Please use the character range[a-z0-9]
, or the hyphen (-
) character, where the first character in the name is a letter. e.g.my-node-01
-
Monitor Name
(optional) The name of the monitor. If none is provided,node-red
is used. -
Threshold
(optional) Trigger a threshold if a value falls outside of specified range. Refer to the ays-agent API docs for a list of supported threshold formats. -
Heartbeat
(optional) The default is set for 5 minutes. If you don't want to monitor the node, set the heartbeat value to0
. -
Template
(optional) Adopt a template located at the specified node path.
The ays-agent
subflow emits node.error
s messages (which can be seen in the Debug panel) and provides node status messages hints that display under the ays-agent
subflow instance. If an node status is displayed, please open the Debug menu for more information.
The most common problems are:
- A required parameter is not provided
- Connection to the AYS server failed
Do you need help configuring the agent? Do you have a feature suggestion? If so, please call me at 253-329-1280.