Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-boolean-logic-ultimate

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-boolean-logic-ultimate

A set of Node-RED enhanced boolean logic, with persisten values after reboot and more

  • 1.0.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3K
increased by12.55%
Maintainers
1
Weekly downloads
 
Created
Source

node-red-contrib-boolean-logic-ultimate

Sample Node

Set of enhanced logic nodes for your flows.

NPM version NPM downloads per month NPM downloads total MIT License JavaScript Style Guide Donate via PayPal

Donate via PayPal

Subscribe to my channel. Only news about my nodes, no spam, no ads. I'm a github developer, not a merchant.

Wellcome! First of all thank you for your interest in my nodes. This is a set of logic nodes, to overcome the simplicity of the default node-red boolean logic nodes. Hope you enjoy that and if you're in trouble, please ask!

CHANGELOG

BOOLEAN LOGIC

The node performs Boolean logic on the incoming payloads.
The node expects a fixed number of topics (configured in the settings) on which it will operate. It will only output a value when it has seen the expected number of topics. If it ever sees more than the configured number of topics it will log a message then reset its state and start over.

The node performs 3 checks (AND,OR,XOR) on the incoming boolean payloads and outputs the result at the same time, as follow:

  • Output "AND": true or false
  • Output "OR": true or false
  • Output "XOR": true or false

The node can have a persistent input: the input values are retained after a node-red reboot. That means, that if you reboot your node-red, you don't need to wait all inputs to arrive and initialize the node, before the node can output a payload.
You can also set the default values of the topic inputs.

CONFIGURATION

Number of different topics to evaluate

Set the number of different topics to be evaluated. The node will output a message to the flow, after this number of different topics arrives.
Remember: each input topic must be different. For example, if you set this field to 3, the node expects 3 different topics.

Filter output result

  • Output both 'true' and 'false' results: Standard behaviour, the node will output true and false whenever it receives an input and calculate the boolean logics as output.
  • Output only 'true' results: whenever the node receives an input, it outputs a payload true only if the result of the logic is true. False results are filtered out.

Trigger mode

  • All topics: standard behaviour, the node will evaluate each input topic and ouputs the values. At each input change, it will output a msg on the flow.
  • Single topic + eval other inputs: the node evaluates all the input topics, but only whenever it receives a msg input with the specified topic (having payload true), it outputs a msg to the flow.

If input states are undefined

Every time you create a node or modify the node, all inputs are set to undefined. This means that the node will wait the arrive of all topics (for example 3 topics, if you've selected 3 topics in the option), before it can output a payload. This can be a problem if your logic must be operative as soon as you deploy the flow. To overcome this problem, you can "initialize" all the undefined inputs with True or False.

  • Leave undefined: Standard behaviour, the node will wait all the "undefined" topics to arrive, then starts a flow with the result.
  • True or False: The node is immediately operative, by force the initialization of the "undefined" inputs with "true" or "false".

Remember latest input values after reboot

If checked, the input values are retained after a node-red reboot. That means, that if you reboot your node-red, you don't need to wait all inputs to arrive and initialize the node, before the node can output a payload.
Every time you modify the node's config, the retained values are cleared.

INTERRUPT FLOWS ULTIMATE

Whenever this node receives a payload = false from a specific topic, it stops output messages to the flow. As soon it receives payload = true from this topic, the output messages start to flow out again.

INVERT ULTIMATE

Outputs the inverted input. For example true -> false

FILTER ULTIMATE

This node has 2 outputs.
If the input payload is true, the node will send true on output 1 and nothing on oputput 2
If the input payload is false, the node will send nothing on output 1, and false on oputput 2

Keywords

FAQs

Package last updated on 19 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc