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

@autocodingsystems/node-red-contrib-integration

v3.4.1

Published

Utility nodes for handling ACS Gateways, Vision Inspection endpoints and workflows

Downloads

43

Readme

ACS Node Red Utils

Utility nodes for making workflows using the ACS Gateway

Nodes available

Gateway

Gateway nodes allow specific actions to be taken on an ACS Gateway.

  • gateway-device-resolve find a named device across multiple gateways
  • gateway-device-update sends a job to a device
  • gateway-device-clear clear the job from a device
  • gateway-event receive events from a gateway

Flow

A "flow" is a controlled sequence for always running processes.

Messages originate from a begin node and flow towards an end node. Once reached, a new message will be emitted from the begin node, making a never ending sequence of messages. A new message will not be emitted from begin until the previous message has hit an end, meaning there is only ever a single message in the flow.

If a flow message is split between 2 or more paths, the first message to hit an end node invalidates all other messages originating from the original begin message.

A message that has been invalidated will not pass through an inactive node, so you can kill dead messages before they take any action by ensuring the action is guarded by these nodes.

Flow messages can be trapped in a trap node and released at a later date by specially crafted release messages or http requests. A trapped message will be immediately destroyed if a sibling flow message hits an end node. A trap node can only hold one message at a time.

  • begin signals the start of message flow.
  • end terminates the current message flow and starts a new one.
  • isactive only passes messages that are part of an active message flow.
  • trap hold on to a message until it is released or until the flow is ended.
  • route send flow messages to one output or the other - is toggled by sending control messages to the node.

Miscellany

General nodes for handling common situations

  • array-split a simplified version of the split node that only supports arrays and has a dedicated "empty" output so that the associated array-join node can be triggered correctly even if there are no items in the array.
  • array-join wait for all the messages from the previous array-split to arrive, collate their payloads and carry on processing. Also wire the "empty" output from the array-split to the input to carry on processing if the array was empty.

Example flow for reporting

[
    {
        "id": "a8214027.9a1af",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "6c3fffae.55e7",
        "type": "vision-inspection-receive",
        "z": "a8214027.9a1af",
        "name": "",
        "server": "eb5561b.8f601a",
        "x": 150,
        "y": 140,
        "wires": [
            [],
            [],
            [
                "d813a864.50e5b8"
            ],
            [
                "a7139310.1bc3e"
            ],
            [],
            [
                "d560af39.23e9e"
            ]
        ]
    },
    {
        "id": "d813a864.50e5b8",
        "type": "function",
        "z": "a8214027.9a1af",
        "name": "Increment batch",
        "func": "let batchid = flow.get('batchid') || 0\n\nbatchid = batchid + 1\nif (batchid > 255) batchid = 1\n\nmsg.payload.batchid = batchid\n\nflow.set('batchid', batchid)\nflow.set('inbatch', true)\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 440,
        "y": 100,
        "wires": [
            [
                "7c1b5b76.02fcf4"
            ]
        ]
    },
    {
        "id": "7c1b5b76.02fcf4",
        "type": "vision-inspection-send",
        "z": "a8214027.9a1af",
        "name": "",
        "server": "eb5561b.8f601a",
        "x": 740,
        "y": 140,
        "wires": []
    },
    {
        "id": "a7139310.1bc3e",
        "type": "function",
        "z": "a8214027.9a1af",
        "name": "Clear batch",
        "func": "msg.payload.batchid = 0\nflow.set('inbatch', false)\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 430,
        "y": 140,
        "wires": [
            [
                "7c1b5b76.02fcf4"
            ]
        ]
    },
    {
        "id": "d560af39.23e9e",
        "type": "function",
        "z": "a8214027.9a1af",
        "name": "Build report",
        "func": "let batchid = flow.get('batchid') || 0\nlet inbatch = flow.get('inbatch') || false\n\nif (!batchid || !inbatch) { return msg }\n\nmsg.payload.batchid = batchid\nmsg.payload.parameters.push({\n    name: 'BatchId',\n    value: batchid\n})\n        \nmsg.payload.parameters.push({\n    name: 'Data Descriptor Name 3',\n    value: 88\n})\n\nmsg.payload.events.push({\n    name: 'FirstEvent',\n    parameters: [{\n        name: 'An Event',\n        value: 'Some value 58'\n    }]\n})\n\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 430,
        "y": 180,
        "wires": [
            [
                "7c1b5b76.02fcf4"
            ]
        ]
    },
    {
        "id": "eb5561b.8f601a",
        "type": "vision-inspection-config",
        "z": "",
        "port": "3111",
        "firmware": "Node-red implemented vision inspection system",
        "version": "1.0",
        "connectionmode": "single",
        "initialisemode": "auto",
        "updatemode": "manual",
        "clearmode": "manual",
        "resetmode": "auto",
        "reportmode": "manual",
        "datadescriptor": "#BatchEvent=FirstEvent    \n#\n    Name=An Event\n    Description=Just some event\n    Type=String\n    InformationType=Event\n    ReportingClass=Special:FirstEvent\n    #\n    Name=BatchId\n    Description=Visualise the batch id\n    Type=Decimal\n    InitialValue=0\n    InformationType=BatchSpecific_Fixed\n    ReportingClass=Special\n    #\n    Name=Data Descriptor Name 3\n    Description=Description of Data Descriptor Name 3\n    Type=Decimal\n    InitialValue=0\n    InformationType=BatchSpecific_Variable\n    ReportingClass=Special\n",
        "name": "Virtual Device A"
    }
]]