Node-Red as a rules engine
In ProgressJust got to say first that since v2.something when I first installed NxWitness has become an awesome product!
But what everyone wants to do now is connect it to more stuff and that means external systems are becoming vital to the Nxwitness experience. It is a great UI which is one of he best things I like about it and the more end users can do in that slick Nx UI the better!
Summary:
Node-Red represents a bunch of unique advantages as a rules engine
- Low code - but it is usable by a wide range of abilities
- Lot of support
- Stable - used by a lot of companies now.
- Will add support for and/or logic or whatever you possibly want....
- Ideal 'mid point' for manufacturers of different products to connect to
- Has great debug tools
- Has a Dashboard UI that end users can develop and then can be made available by the in client browser. Once this feature is implemented it would accessible from anywhere via proxy! There has been a number requests for extra controls or display widgets. Tick that off!
- Has most authentication options for 3rd parties available.
- Would implement connectivity to other protocols like MQTT (requested) and Modbus TCP Etc.
- Designed to be embedded into a larger system....
Use Cases
- Integrate third party systems so users can do more without leaving the Nx UI
- control gates/ doors - you can do it now but it is limited to IO control or possibly http requests
- control / manage industrial equipment where you need camera oversite
- automate processes like whitelist and black list updates for ANPR, facial recognition
- automate recording modes or analytic systems modes uses based on external system states, like alarm status ( no point recording intrusion alerts during the day with normal staff presence but currently....I can't intelligently switch if on/off!)
What I think Nx needs to provide to make it work:
- Input Nodes
- 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.
- Server Node - don't know if that would be necessary? Other may have other ideas.
- Output Nodes
- Actions Node - triggers recording or alerts etc. like the current actions list in Rules
- Meta node - inserts META data into the selected cameras and streams for those edge case integrations.
- Server Node - I guess an automated restart or similar actions could be effective in some instances
In the Middle - Node-Red already has all you need to create logic and filter data.
Additional ideas
A UI node that interacts with Nx UI widget that is a button icon or custom png icon that can be placed anywhere in the screen and can be set to take up a grid space or live in any corner of the the box of the grid it is placed into. The Node then can change its look by different icon's to represent states and or even be interactive with some 'onclick', 'hover' or 'on release' events that Node-Red can action.
Hope all that makes some sense. I think it is ideal as that there are some many features that everyone wants this could tick off most of them or give them a way to sort it out for themselves. Nx can focus on the real big features around the video and META data!
-
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:
-
Input Node
Currently, you can use the HTTP in node as an input, and the Event in Nx Witness would be a Generic Event. - 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. - 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. -
Output Nodes
Currently, this would be the Do HTTP request action inside the rules engine.
- 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. - 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. - 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.
-
Input Node
Please sign in to leave a comment.
Comments
1 comment