or gate flow create

Hello guys. How to make a loggia door or. for example: I have three entities with two states each, true or false. I want to relate these three entities to a call service node. true + true + true = true
false + true + true = true ...... false + false + false = false. How would the flow be? thank you very much

Hi @jordirt.

As a newbie, it is interesting you want to make a node from the get go.

Why not - to help you as much as anything - try to do what you want with the existing nodes?

That will help you get a better picture of how it is done. Or maybe explain to others how it is done.

All the same: good luck.

My guess is @jordirt has selected the wrong category in the forum.

@jordirt do you REALLY want to create a new node type (e.g. node-red-contrib-my-new-node-type) for others to install from the pallette?

Or - are you asking how to do true/false boolean logic with node-red?

Please clarify.

Are all those values in one message or are they coming from different sources?

If coming from different sources in different messages then have a look at node-red-contrib-bool-gate which may well do what you want.

I already have it installed [node-red-contrib-bool-gate]
what would be the flow of this diagram?
plc diagran:

no:normally open.
nc:normally closed

--(no)-----(out on)
--(no)--

--(no)-----(out on)
--(nc)--

--(nc)-----(out off)
--(nc)--

Show us what the messages that you wish to combine look like in a debug node.

are status messages with 3 event nodes. on off or true false

A description is not good enough.
Show us what they look like in a debug node, you can paste an image here directly.

sorry and thank you very much for your help. The library has found the node I need.
node-red-contrib-trigger-empty

node-red-contrib-trigger-empty directly send an "On" on the given topic, when it receives an "On", on any topic. Stores the "On" per topic and if all topics that send an "On" have send an "Off", sends an "Off" on the given topic. So basically a dynamic OR gate for topics. The actual "On" and "Off" value can be entered in Config. The send value is (case-insensitive) checked against the on or off value. The entered value is send.

You should be able to do it with an join node and a change node
e.g.

[{"id":"5614d1b2.942f9","type":"inject","z":"7760f563.ea0324","name":"e1 true","props":[{"p":"payload.one","v":"true","vt":"bool"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":220,"y":80,"wires":[["a4fb7373.782ed8"]]},{"id":"27a9f146.56ccc6","type":"inject","z":"7760f563.ea0324","name":"e1 false","props":[{"p":"payload.one","v":"false","vt":"bool"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":220,"y":120,"wires":[["a4fb7373.782ed8"]]},{"id":"c5fb5e15.d616f8","type":"inject","z":"7760f563.ea0324","name":"e2 true","props":[{"p":"payload.two","v":"true","vt":"bool"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":220,"y":180,"wires":[["a4fb7373.782ed8"]]},{"id":"95fd83ff.133b58","type":"inject","z":"7760f563.ea0324","name":"e2 false","props":[{"p":"payload.two","v":"false","vt":"bool"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":220,"y":220,"wires":[["a4fb7373.782ed8"]]},{"id":"15975971.aabf07","type":"inject","z":"7760f563.ea0324","name":"e3 true","props":[{"p":"payload.three","v":"true","vt":"bool"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":220,"y":280,"wires":[["a4fb7373.782ed8"]]},{"id":"d0852d7d.e52928","type":"inject","z":"7760f563.ea0324","name":"e3 false","props":[{"p":"payload.three","v":"false","vt":"bool"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":220,"y":320,"wires":[["a4fb7373.782ed8"]]},{"id":"a4fb7373.782ed8","type":"join","z":"7760f563.ea0324","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":430,"y":140,"wires":[["5f44a725.3436b8","b7b75c67.b4beb"]]},{"id":"5f44a725.3436b8","type":"change","z":"7760f563.ea0324","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$filter(\t   $each(payload, function($v){$v}),\t   function($v){$v = true }\t) ? true : false","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":140,"wires":[["b7b75c67.b4beb"]]},{"id":"b7b75c67.b4beb","type":"debug","z":"7760f563.ea0324","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":650,"y":480,"wires":[]}]

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.