Node-Red as a rules engine

In Progress


1 comment

  • Avatar
    Norman - Nx Support

    Hi Jason Simpkin,

    You're so right. Node-RED is a pretty awesome application, which has some steep learning curve, but once you passed this steep climb, you can build awesome solutions within Nx.

    To comment on your requests, see my Italic comments below:

    1. Input Node
      Currently, you can use the HTTP in node as an input, and the Event in Nx Witness would be a Generic Event.
    2. Camera/Device  node - All the current event triggers we have like analytic plugin events, motion events etc. - you perhaps could select what you want to see by opening the node and switching different sources on and off and select which cameras you want to get that from.
      Currently, this can be done with the Do HTTP request Action without NodeRed. Although I might consider NodeRed to be the easier solution with a better overview.
    3. Server Node - don't know if that would be necessary? Other may have other ideas.
      I don't know either, but server side adjustment often can be done through the server API and thus with a Do HTTP request within the Nx Witness rules engine or the NodeRed HTTP request node.
    4. Output Nodes
      Currently, this would be the Do HTTP request action inside the rules engine.
    5. Actions Node - triggers recording or alerts etc. like the current actions list in Rules
      As said, you can do this with the Do HTTP request action inside the rules engine of Nx Witness or with the HTTP request node in Node-RED.
    6. Meta node - inserts META data into the selected cameras and streams for those edge case integrations.
      This goes beyond my knowledge of Node-RED and our Nx Meta integration program. But I assume this would be possible as well. If you have a specific case, I would recommend you to post the question in our For Developers section of this community.
    7. Server Node - I guess an automated restart or similar actions could be effective in some instances.
      If you want to shedule a automated restart of a daemon or the entire server, personnally I would do it via a cronjob, so it is listed in the OS logs, but you also can use an application like shell2http. Some instructions can be found here.

    Regarding your additional idea of a button panel:

    You can create a button panel, which you can add as a webpage into Nx Witness. I have described how to create a button panel in a very rudimentary manner in THIS blog article. On the top right of this blog, you can switch to English. Securing Node-RED is highly recommended for production systems or otherwise exposed systems.

    If the button is camera specific you can also add a Soft Trigger to the specific camera or if you have a generic action, that applies to all/most devices, you can also create the Soft Trigger on multiple devices.


    Comment actions Permalink

Please sign in to leave a comment.