start,stop,reset logic using Bufferstack.IO NoCode platform

Bufferstack.IO NoCode Method

Node-RED is a low code platform but by creating nodes and encapsulating logic into them, we can almost create a NoCode platform for simple requirements

Presenting here is an example of start, stop and reset logic using Bufferstack.IO NoCode method.

This application takes three inputs - start, stop and reset.

  1. When start is clicked, the relay node is activated which allows the output of inject node to be fed to add node - this basically works as a counter

  2. When stop is clicked, the relay node is deactivated and the counter stops at given instance. The output remains constant till it is manually reset

  3. On clicking reset, the output is reset to 0.

By reducing dependency on manual coding, we can greatly reduce barriers and allow more non technical users to design logic and create applications that will enhance productivity.

The relay node can be found here - https://flows.nodered.org/node/node-red-contrib-relay

[{"id":"64be663cf0206851","type":"tab","label":"relay","disabled":false,"info":"","env":[]},{"id":"525f10ada286a70a","type":"comment","z":"64be663cf0206851","name":"Relay Logic Node","info":"","x":150,"y":40,"wires":[]},{"id":"9ee575d0754121d8","type":"inject","z":"64be663cf0206851","name":"start","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":150,"y":260,"wires":[["d970975b7e294254"]]},{"id":"1ac3ad5411372426","type":"inject","z":"64be663cf0206851","name":"stop","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":150,"y":320,"wires":[["dc289e3e44dd7d49"]]},{"id":"d970975b7e294254","type":"change","z":"64be663cf0206851","name":"set msg.topic value to enable","rules":[{"t":"set","p":"topic","pt":"msg","to":"enable","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":260,"wires":[["b029a528116775e2"]]},{"id":"dc289e3e44dd7d49","type":"change","z":"64be663cf0206851","name":"set msg.topic to value disable","rules":[{"t":"set","p":"topic","pt":"msg","to":"disable","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":320,"wires":[["b029a528116775e2"]]},{"id":"63a9df9c35bd02a4","type":"inject","z":"64be663cf0206851","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":450,"y":180,"wires":[["b029a528116775e2"]]},{"id":"e161e9acfc110ca2","type":"add","z":"64be663cf0206851","name":"","topic":"","x":870,"y":260,"wires":[["af5f636bc71d920e"]]},{"id":"90307f4df9e9818f","type":"change","z":"64be663cf0206851","name":"set msg.payload to value reset","rules":[{"t":"set","p":"payload","pt":"msg","to":"reset","tot":"str"},{"t":"set","p":"reset","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":380,"wires":[["e161e9acfc110ca2"]]},{"id":"af5f636bc71d920e","type":"debug","z":"64be663cf0206851","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1050,"y":260,"wires":[]},{"id":"b029a528116775e2","type":"relay","z":"64be663cf0206851","name":"relay","x":650,"y":260,"wires":[["e161e9acfc110ca2"]],"icon":"font-awesome/fa-toggle-off"},{"id":"8128820f43143ec1","type":"inject","z":"64be663cf0206851","name":"reset","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":150,"y":380,"wires":[["90307f4df9e9818f"]]}]

Flow Info

Created 1 year, 3 months ago
Rating: 5 2

Owner

Actions

Rate:

Node Types

Core
  • change (x3)
  • comment (x1)
  • debug (x1)
  • inject (x4)
Other
  • add (x1)
  • relay (x1)
  • tab (x1)

Tags

  • Bufferstack.IO
  • NoCode
  • Pune
  • India
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option