# Boolean Logic Ultimate only arrive 1 Topic

**URL:** https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778
**Category:** General
**Created:** [28 March 2020 10:43 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778 "2020-03-28T10:43:26Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![mimk97](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mimk97](https://discourse.nodered.org/u/mimk97)
#### Post date: [28 March 2020 10:43 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/1 "2020-03-28T10:43:27Z")

</div>

Hi,

could someone tell me why Boolean Logic Ultimate receive only 1 Topic?

 ![Anmerkung 2020-03-28 114111](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/3/a3aba7c2ede2293454e6f1610791f86827fdc6c4.jpeg)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 March 2020 11:01 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/2 "2020-03-28T11:01:29Z")

</div>

Add a debug node showing what is coming out of the intermediate nodes when you click the inject and check that the topics are different.  
Set the debug nodes to Show Complete Message to make it easier to see what is there.

---

<div class="post-metadata">

### Author: ![mimk97](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mimk97](https://discourse.nodered.org/u/mimk97)
#### Post date: [28 March 2020 11:15 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/3 "2020-03-28T11:15:47Z")

</div>

The trigger nodes give both true as output.  
but logic ultimate recognize only one topic

 ![Anmerkung 2020-03-28 121132](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/f/ffd9b90c82e16e4960b3c7ff1150d35cf9ccdf49.jpeg)

---

<div class="post-metadata">

### Author: ![mimk97](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mimk97](https://discourse.nodered.org/u/mimk97)
#### Post date: [28 March 2020 11:18 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/4 "2020-03-28T11:18:39Z")

</div>

I want to do following:  
call action if power is between 1-3 watt

that´s all  
but i´m a newbie ☹

the Inject´s 0, 2 and 10 sould simulate (just to Test) the Power which i read from Wall Switch later

---

<div class="post-metadata">

### Author: ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)
#### Post date: [28 March 2020 11:30 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/5 "2020-03-28T11:30:27Z")

</div>

It says that 1 out of 2 TOPICS arrived.  
So I think the topics in kalibrierung 1 or 2 don't match the topics set in boolean logic.

Post you code so we can test.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 March 2020 11:31 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/6 "2020-03-28T11:31:38Z")

</div>

As I understand it you have a value in msg.payload and if that is between 1 and 3 then you want to send a message on, but otherwise don't send anything? If so then you can do that with a Switch node configured as below. If the value is between 1 and 3 it sends the message to output 1 (in fact the only output as this one is configured) otherwise it does nothing.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bb56243b8f010a5f57f9fd966211fb38d7849298.png)

---

<div class="post-metadata">

### Author: ![mimk97](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mimk97](https://discourse.nodered.org/u/mimk97)
#### Post date: [28 March 2020 11:34 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/7 "2020-03-28T11:34:26Z")

</div>

here´s the code

```auto
[{"id":"5024232.88595dc","type":"tab","label":"Waschmaschine Status","disabled":false,"info":""},{"id":"891b4301.a2fc5","type":"server-state-changed","z":"5024232.88595dc","name":"watt auslesen","server":"63bce175.9acd","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.switch_waschmaschine_energy_power","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":230,"y":700,"wires":[[]]},{"id":"3e764739.6a5898","type":"combine-bangbang","z":"5024232.88595dc","upper":"0.6","lower":"0.5","invert":false,"name":"kalibrierung 1","x":280,"y":120,"wires":[["44378067.4a2bf","ca3fd02a.f481a"]]},{"id":"80735402.e5e828","type":"stoptimer","z":"5024232.88595dc","duration":"10","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":450,"y":420,"wires":[["daf7fc1d.b37ae"],[]]},{"id":"ab34d74d.4fe758","type":"api-call-service","z":"5024232.88595dc","name":"led an","server":"63bce175.9acd","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"sensor.switch_waschmaschine_status","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":910,"y":360,"wires":[[]]},{"id":"daf7fc1d.b37ae","type":"switch","z":"5024232.88595dc","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":670,"y":420,"wires":[["ab34d74d.4fe758"],["e22d6e9b.c0a04"]]},{"id":"e22d6e9b.c0a04","type":"api-call-service","z":"5024232.88595dc","name":"led aus","server":"63bce175.9acd","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"sensor.switch_waschmaschine_status","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":920,"y":460,"wires":[[]]},{"id":"3cc64077.48fa7","type":"combine-bangbang","z":"5024232.88595dc","upper":"3","lower":"2.9","invert":true,"name":"kalibrierung 2","x":280,"y":200,"wires":[["44378067.4a2bf","a233b49d.d941e8"]]},{"id":"e036939.fb62d7","type":"inject","z":"5024232.88595dc","name":"","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":160,"wires":[["3e764739.6a5898","3cc64077.48fa7"]]},{"id":"6fdd833b.8d568c","type":"inject","z":"5024232.88595dc","name":"","topic":"","payload":"2","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":220,"wires":[["3e764739.6a5898","3cc64077.48fa7"]]},{"id":"d30878b5.a80638","type":"inject","z":"5024232.88595dc","name":"","topic":"","payload":"10","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":280,"wires":[["3e764739.6a5898","3cc64077.48fa7"]]},{"id":"29ee64e9.4d19cc","type":"debug","z":"5024232.88595dc","name":"output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":690,"y":140,"wires":[]},{"id":"44378067.4a2bf","type":"BooleanLogicUltimate","z":"5024232.88595dc","name":"","filtertrue":"both","persist":true,"sInitializeWith":"WaitForPayload","triggertopic":"trigger","outputtriggeredby":"all","inputCount":2,"topic":"result","x":480,"y":160,"wires":[["29ee64e9.4d19cc"],[],[]]},{"id":"ca3fd02a.f481a","type":"debug","z":"5024232.88595dc","name":"kalibrierung 1","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":470,"y":80,"wires":[]},{"id":"a233b49d.d941e8","type":"debug","z":"5024232.88595dc","name":"kalibrierung 2","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":470,"y":280,"wires":[]},{"id":"63bce175.9acd","type":"server","z":"","name":"Home Assistant","addon":true}]

```

---

<div class="post-metadata">

### Author: ![mimk97](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mimk97](https://discourse.nodered.org/u/mimk97)
#### Post date: [28 March 2020 11:39 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/8 "2020-03-28T11:39:51Z")

</div>

yes, but is it possible to call action 1 if value is between 0.5 and 3  
and call action 2 if else ?

---

<div class="post-metadata">

### Author: ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)
#### Post date: [28 March 2020 11:43 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/9 "2020-03-28T11:43:24Z")

</div>

In the 3 inject nodes at the left you have to fill in the topic, for all 3 a different topic name.  
Then it works.

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/2/f28366dcaaff86abf60fab96522f7f78e9a86aaa.png)

---

<div class="post-metadata">

### Author: ![mimk97](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mimk97](https://discourse.nodered.org/u/mimk97)
#### Post date: [28 March 2020 11:59 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/10 "2020-03-28T11:59:42Z")

</div>

hhm, it´s not working.  
if i press a again only 1 topic arrived.

 ![Anmerkung 2020-03-28 125518](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2e1650df3668c3afcf1e397e62a717eda98fed74.jpeg)  
But Isn't there an easier solution for my case?  
I just want to do the following:  
call Action 1 if value between 0.5 and 3  
otherwise call Action 2

---

<div class="post-metadata">

### Author: ![mimk97](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mimk97](https://discourse.nodered.org/u/mimk97)
#### Post date: [28 March 2020 12:27 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/11 "2020-03-28T12:27:05Z")

</div>

i think i done it 🙂

```auto
[{"id":"6693685b.6ad928","type":"stoptimer","z":"5024232.88595dc","duration":"1","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":340,"y":200,"wires":[["9cbd3876.19f9e8"],[]]}]

```

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 March 2020 13:27 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/12 "2020-03-28T13:27:08Z")

</div>

> [@mimk97](#):
>
> call Action 1 if value between 0.5 and 3  
> otherwise call Action 2

Did you look at my example with the Switch node? What you want can easily be done using that.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [11 April 2020 13:27 UTC](https://discourse.nodered.org/t/boolean-logic-ultimate-only-arrive-1-topic/23778/13 "2020-04-11T13:27:15Z")

</div>

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