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

@ais_automation/node-red-contrib-eqcloud-monitoring

v1.4.3

Published

Client for EquipmentCloud® Monitoring

Downloads

47

Readme

node-red-contrib-eqcloud-monitoring

License: MIT

logo

This node is the easiest way to connect your equipment to the EquipmentCloud® of Kontron AIS GmbH for any Monitoring purposes.

node

Installation

npm install @ais_automation/node-red-contrib-eqcloud-monitoring

Usage

After installation you will find the node inside the Node-red palette.

Configuration

node_properties

Name: Give the node an individual name (e.g. EquipmentName)

Authentication: There are 2 different ways for adding the Authentication settings into the node.

The first one is "Custom": You have to login into your EquipmentCloud®, choose "Equipment Configuration" and "Equipment". In the list of available Equipments you will find the REST Service icon behind each equipment. Now choose your equipment and press the REST Service icon for all REST API details. Now you have to copy all values into the relevant input fields.

The second option is "File": You have to login into your EquipmentCloud®, choose "Equipment Configuration" and "Equipment". In the right top corner of the Equipment list, you will find "Download Rest Configuration". A JSON file will be downloaded. Now you can select the downloaded file at the parameter "Json config". After the upload you have to select the target Equipment from the Dropdown field at parameter "Equipment".

Cycle Time: This parameters sets the interval for sending values to the EquipmentCloud®. Incoming messages will be stored inside a buffer until the next interval. When the messages are send successfully to the EquipmentCloud® the buffer will be cleared.

Sending Delay: The monitoring node automatically sorts all buffered messages in the chronologically correct order before sending them to EquipmentCloud®. This is done using the timestamp attribute in the message. If your process has data or events that are not available until a later point in time, you can also delay the sending of messages. In this case, only messages older than the specified delay time are taken from the buffer during each send cycle.

Item Priority: This parameter sets the sort order of messages with the same timestamp attribute. This way you can distinguish whether a state change occurred before or after an alarm or a part was produced. The order of events can affects the presentation of data and calculation of KPI values in the EqupmentCloud®. The following options are available for this purpose:

  • First In First Out: The order in which the messages were passed to the node is preserved.
  • Events First: Events for equipment state change are sent to EquipmentCloud® first. All following alarms and produced parts therefore get the property of the last passed state of the equipment.
  • Events Last: Events for equipment state change are sent to EquipmentCloud® after the other messages. All alarms and produced parts up to the state change message therefore get the property of the previous equipment state.

Max. Buffer Size: You can set a maximum buffer size for storing the messages until the next cycle. If the maximum buffer is reached, older messages will be deleted and new messages will be stored.

When you have configured your Monitoring node correctly, the node will get a token and will show this as a green point under the node in your flow.

Logging: You can activate the option "Logging to File" with the checkbox. If "Logging to File" is activated, the Monitoring node creates rotating log files. You can specify a custom directory path, the maximum number of log files (minimum 2) and the maximum size per log file in MB. If no directory is specified for logging, the current working directory is used. If the maximum size is reached, the system creates a new log file. If the maximum number of log files exists, the oldest one will be deleted and the system creates a new one.

Monitoring Data

The input for the Monitoring node must be a message format based on the REST API of the EquipmentCloud®. The following JSON message is an example for such a message. Please note that you have to be ensure that the correct type for each item (alarm, event, etc.) is selected.

{
    "items": [
        {
            "type": 1,
            "id": "alarm1",
            "timestamp": "2019-01-11T08:19:56Z",
            "action": 1,
            "additional_values": [
                "low speed",
                1,
                "5 m/h"
            ]
        },
        {
            "type": 2,
            "id": "event1",
            "timestamp": "2019-01-11T06:38:29Z"
        },
        {
            "type": 3,
            "id": null,
            "timestamp": "2019-01-11T06:38:37Z",
            "count": 1,
            "quality": 1
        },
        {
            "type": 4,
            "id": "numeric_process_value1",
            "timestamp": "2019-01-11T06:38:41Z",
            "value": -1.3555
        },
        {
            "type": 4,
            "id": "string_process_value2",
            "timestamp": "2019-01-11T06:38:41Z",
            "value_string": "This is an example value"
        },
        {
            "type": 4,
            "id": "boolean_process_value3",
            "timestamp": "2019-01-11T06:38:41Z",
            "value_boolean": true
        }
    ]
}

Dynamic Data Upload

In case you want to upload your data from the buffer independent from the Cycle Time, there is a possibility to trigger the data transfer to the EquipmentCloud®. With the following JSON message the Monitoring node will initialize the transfer of all data from the buffer to the EquipmentCloud®. When the messages are send successfully the buffer will be cleared.

{
    "buffer":"flush"   
}

Equipment Configuration

You can also dynamically upload the type configuration of the equipment. This allows, e.g., to create an alarm in the EquipmentCloud®, which has not been configured yet. Note that this may affect other equipment of the same type.

{
    "states": [
        {
        "name": "Running"
        },
        {
        "name": "Stopped"
        }
    ],
    "events": [
        {
        "id": "start",
        "name": "Start button pressed"
        },
        {
        "id": "stop",
        "name": "Stop button pressed"
        }
    ],
    "statemodels": [
        {
        "event": {
            "id": "start"
        },
        "state": {
            "name": "Running"
        },
        "standardState": {
            "id": "prd"
        }
        },
        {
        "event": {
            "id": "stop"
        },
        "state": {
            "name": "Stopped"
        },
        "standardState": {
            "id": "sdt"
        }
        }
    ],
    "alarmclasses": [
        {
        "name": "High Priority",
        "color": "#FF0000"
        },
        {
        "name": "Low Priority",
        "color": "#C7BF20"
        }
    ],
    "alarms": [
        {
        "id": "dooropen",
        "text": "Door still open",
        "type": "Error",
        "class": {
            "name": "High Priority"
        }
        },
        {
        "id": "empty",
        "text": "Mashine is still empty",
        "type": "Warning",
        "class": {
            "name": "Low Priority"
        }
        }
    ],
    "processvalues": [
        {
        "id": "rpm",
        "name": "RPM",
        "type": "double",
        "unit": "U/min",
        "color": "#45C78D"
        },
        {
        "id": "temperature",
        "name": "Temperature",
        "type": "double",
        "unit": "°C",
        "color": "#F21352"
        }
    ],
    "oeeparameters": [
        {
        "product": "Colourful Clothes",
        "unitsPerHour": 90,
        "productionFactor": 1
        },
        {
        "product": null,
        "unitsPerHour": 50,
        "productionFactor": 1
        }
    ]
}

If you want to have more information regarding our REST API, please log in to your account and take a look at:

Help Center / Help & Tips / RESTful Service API Explorer / Monitoring API 2.0

Output

The node has two outputs. One for responses of the EquipmentCloud® and one for error messages.

LICENSE

Licensed under the MIT License (MIT).