# Light on by opening the door

**URL:** <https://discourse.nodered.org/t/light-on-by-opening-the-door/48060>\
**Category:** General\
**Created:** [5 July 2021 19:36 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060 "2021-07-05T19:36:34Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wurmi](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Wurmi](https://discourse.nodered.org/u/Wurmi)\
**Post date:** [5 July 2021 19:36 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/1 "2021-07-05T19:36:34Z")

</div>

I have a little logic problem. I want to turn on the light, when someone is opening the door.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/6/062b70a0bee4b30ba1954177e5d02366004838d3.png)

On the busmonitor i receive the msg from the binary input, if the door is open.  
In Node-red i get also a true on the debug. But nothing happens at the KNX Output.  
Binary Input is 4/0/0 and the Light is 2/0/0 - in the ETS i see a msg. from 4/0/0 but nothing for groupadress 2/0/0

Unfortunately i don't see my problem at the moment. Does anyone have an idea

Thanks

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [5 July 2021 23:29 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/2 "2021-07-05T23:29:22Z")

</div>

Can you paste your flow so we can see it and also maybe put a couple of injection nodes for testing inputs - and lastly a screenshot of the debug window when it is NOT doing what you want

Craig

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [6 July 2021 02:38 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/3 "2021-07-06T02:38:33Z")

</div>

I would get an `inject` node and connect it to the `Kino` node (the right most one in your flow) and send stuff into it until I get it working.

> [@Wurmi](#):
>
> Binary Input is 4/0/0 and the Light is 2/0/0

I don't understand that. BINARY input means - to me - `1` and `0`. and only one at a time.  
`4/0/0` isn't binary.

What is the `ETS` where you see the message?

---

<div class="post-metadata">

**Author:** ![Wurmi](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Wurmi](https://discourse.nodered.org/u/Wurmi)\
**Post date:** [6 July 2021 15:33 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/4 "2021-07-06T15:33:05Z")

</div>

Thanks for your help guys 🙂

Here is the Flow:

```auto
[{"id":"369c808a.1fe6f","type":"tab","label":"Kellergeschoss","disabled":false,"info":""},{"id":"5596e60b.bc55b8","type":"knxEasy-in","z":"369c808a.1fe6f","server":"760c366a.fbe128","topic":"2/0/1","dpt":"1.011","initialread":true,"notifyreadrequest":false,"notifyresponse":false,"notifywrite":true,"name":"Kino_RM","x":200,"y":80,"wires":[["f5c9be58.3b65b"]]},{"id":"8c47a322.7a12b","type":"knxEasy-out","z":"369c808a.1fe6f","server":"760c366a.fbe128","topic":"2/0/0","dpt":"1.001","name":"Kino","outputtype":"write","x":770,"y":80,"wires":[]},{"id":"f5c9be58.3b65b","type":"ui_switch","z":"369c808a.1fe6f","name":"","label":"Kino","tooltip":"","group":"26c81c4f.0f1b24","order":1,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","topicType":"str","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":true,"x":430,"y":80,"wires":[["8c47a322.7a12b"]]},{"id":"65df26e8.1ddc88","type":"alexa-home","z":"369c808a.1fe6f","conf":"9930540e.c98528","device":"148310","acknoledge":true,"name":"Licht Kino","topic":"","x":200,"y":140,"wires":[["16a18e76.4c5712"]]},{"id":"16a18e76.4c5712","type":"change","z":"369c808a.1fe6f","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"true","tot":"bool"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":140,"wires":[["8c47a322.7a12b"]]},{"id":"c25bcf87.bc661","type":"knxEasy-in","z":"369c808a.1fe6f","server":"760c366a.fbe128","topic":"4/0/0","dpt":"1.011","initialread":true,"notifyreadrequest":false,"notifyresponse":false,"notifywrite":true,"name":"Kinotür_RM","x":210,"y":200,"wires":[["38a1e8cb.bb21d8"]]},{"id":"38a1e8cb.bb21d8","type":"switch","z":"369c808a.1fe6f","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":200,"wires":[["db019ab6.703538"],[]]},{"id":"db019ab6.703538","type":"trigger","z":"369c808a.1fe6f","name":"","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"30","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":570,"y":200,"wires":[["ab8bf09a.7030c","8c47a322.7a12b"]]},{"id":"ab8bf09a.7030c","type":"debug","z":"369c808a.1fe6f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":820,"y":260,"wires":[]},{"id":"760c366a.fbe128","type":"knxEasy-config","host":"192.168.1.x","port":"xxxx"},{"id":"26c81c4f.0f1b24","type":"ui_group","name":"Kellergeschoss","tab":"2f200dad.13de02","order":3,"disp":true,"width":"6","collapse":false},{"id":"9930540e.c98528","type":"alexa-home-conf","username":"xxx"},{"id":"2f200dad.13de02","type":"ui_tab","name":"Licht","icon":"lightbulb_outline","order":2,"disabled":false,"hidden":false}]

```

Debug:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/5/553085ecf7fbce0417ff25bfe9b0dcaac9d5ac3e.png)

KNX:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/e/ae3a7952abd3ade9fc785fd99d2b8bd4c0678657.png)

If i connect an inject node and send true, it finally works - the light turns on.  
But if the command comes from the door (KNX input left) nothing happens.

With binary input i mean something like this:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c39d0d8d8f6eaea18ec5a2695f33cc3b8b418e22.jpeg)

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [7 July 2021 01:11 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/5 "2021-07-07T01:11:34Z")

</div>

OK put a debug node on the output of the KNX node and send us a screenshot so we can se what it is pushing out in the debug panel

Craig

---

<div class="post-metadata">

**Author:** ![Wurmi](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Wurmi](https://discourse.nodered.org/u/Wurmi)\
**Post date:** [7 July 2021 08:13 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/6 "2021-07-07T08:13:46Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/3/b3e8414a7c77746558092c55c62e7176f1d74af7.png)

That happens, when I send a true by ETS on address 4/0/0

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/1/a17a5b0b4e8105083bc70151370933ecd48d9270.png)

after 30s i get the false message in the ETS monitor

---

<div class="post-metadata">

**Author:** ![Wurmi](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Wurmi](https://discourse.nodered.org/u/Wurmi)\
**Post date:** [10 July 2021 14:17 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/7 "2021-07-10T14:17:46Z")

</div>

Any ideas?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [10 July 2021 15:33 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/8 "2021-07-10T15:33:22Z")

</div>

In your `trigger` node you tell it to send `false` after 30 seconds so it is doing exactly what you have told it to do (but maybe not what you want it to do.)

---

<div class="post-metadata">

**Author:** ![Wurmi](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Wurmi](https://discourse.nodered.org/u/Wurmi)\
**Post date:** [10 July 2021 16:23 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/9 "2021-07-10T16:23:25Z")

</div>

The Flow didn´t work without the switch and the trigger. So imho it´s a problme with the KNX Input Node.  
But i dont know how to fix it. The information i get from the KNX Input is correct (Boolean "true")  
Is there a way to log the complete msg.object and not only the payload?

Thanks

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [10 July 2021 17:12 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/10 "2021-07-10T17:12:38Z")

</div>

> [@Wurmi](#):
>
> Is there a way to log the complete msg.object and not only the payload?

Yes it’s one of the debug node options  
 ![Screen Shot 2021-07-10 at 2.24.31 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fda0ac7c87ce8f95e291e5a28f4c56f4038de443.png)

---

<div class="post-metadata">

**Author:** ![Wurmi](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Wurmi](https://discourse.nodered.org/u/Wurmi)\
**Post date:** [10 July 2021 18:31 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/11 "2021-07-10T18:31:50Z")

</div>

Thank you for your help and for the very helpful picture.  
i got the following msg. back:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/3/43dd7c32151bb8e30cf67e092091bc802cac2018.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/9/29f9934d5b51c2aa9b5fcf9a0224eff181cc9cf3.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/c/cc65b552643f52cff0c9ed7a2cce8161d6cc5cf0.png)

Could this be helpful?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/a/aac73edc85f1180a456bdb96bc80e43c61281fe5.png)

where i have to type in the command?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [10 July 2021 23:59 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/12 "2021-07-10T23:59:50Z")

</div>

> [@Wurmi](#):
>
> Could this be helpful?

Sorry but I have no idea. Up until I looked at your post, I had never heard about KNX so you know more about it than I do.

Hopefully someone else with knowledge of it will respond.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [11 July 2021 04:57 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/13 "2021-07-11T04:57:19Z")

</div>

OK - so are you saying if you put an inject node to the KNX output node and send a true - it will turn the light on i.e. nothing else needed other than what is configured on the KNX node ?

I would take the output from the KNX node into a switch node

Check msg.payload for True or false

Send the output to 2 change nodes

Set the msg.payload to True (which should blank out all the other KNX stuff in case that is messing you around) and then send the output to the KNX node and see if it turns the light on - also obviously put a debug on it so we can see what is happening

Craig

If so i would take the change node from the KNX input and simply set the msg.payload to

---

<div class="post-metadata">

**Author:** ![Wurmi](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Wurmi](https://discourse.nodered.org/u/Wurmi)\
**Post date:** [12 July 2021 16:32 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/14 "2021-07-12T16:32:41Z")

</div>

I correct

i have tried various conditions without success - also what you suggested.  
The Debug show "bool true" but nothing happend.

i would like to switch from knxeasy to ultimate soon. Maybe this will solve my problem.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [12 July 2021 20:22 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/15 "2021-07-12T20:22:06Z")

</div>

Put up your flow and screeshots of the debug windows again

Craig

---

<div class="post-metadata">

**Author:** ![Wurmi](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Wurmi](https://discourse.nodered.org/u/Wurmi)\
**Post date:** [13 July 2021 07:20 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/16 "2021-07-13T07:20:38Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/8/984fd516e30f856a6480f2afd377934046f63307.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/e/0e2f2343651a5e3975560177b1386c398bbc0f14.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/c/8cb04ea7db061646adce1058edf23d9dec51eace.png)  
3 is my message from the ETS to GA 4/0/0  
4 is a message from Node Red to GA 4/0/0

For testing i have connected the aktor (light) with GA 4/0/0 in the ETS and sent a true (dpt 1.001 / active 1.011) and it worked.

---

<div class="post-metadata">

**Author:** ![Wurmi](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@Wurmi](https://discourse.nodered.org/u/Wurmi)\
**Post date:** [13 July 2021 07:57 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/17 "2021-07-13T07:57:22Z")

</div>

I have solved the problem

It have to be a problem with KNX easy - i have installed the latest version of KNX Ultimate and now it works as it should 🙂

Thank you for your support - I am very grateful to you!

---

<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:** [27 July 2021 07:58 UTC](https://discourse.nodered.org/t/light-on-by-opening-the-door/48060/18 "2021-07-27T07:58:09Z")

</div>

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