# A simple motion -\> lights

**URL:** <https://discourse.nodered.org/t/a-simple-motion-lights/66752>\
**Category:** Share Your Nodes\
**Created:** [22 August 2022 12:14 UTC](https://discourse.nodered.org/t/a-simple-motion-lights/66752 "2022-08-22T12:14:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![10der](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/10der/32/1202_2.png) [@10der](https://discourse.nodered.org/u/10der)\
**Post date:** [22 August 2022 12:14 UTC](https://discourse.nodered.org/t/a-simple-motion-lights/66752/1 "2022-08-22T12:14:50Z")

</div>

hi!  
In place of TL;DR; 🙂

Right now I am living not at home. My home with above 120 devices and cool HA now is occupied territory. ☹  
I am living in my friend's apartment and from the boredom I'm building him a small HA here.  
So, let me introduce a small node for "motion light" action.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/740de2b6aed132a87a6e3c5b7a38cd447a3d0625.png)

This node can help you a simple automation with lights in your house / room.  
Just drop on the flow motion-light node and configure behavior by profile  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/a/7acca1c87577995695809c56270660c45710385b.png)  
current version support only three parameters:

```auto
    "lux": 1,
    "brightness": 50,
    "timeout": 10

```

`lux` - min lux for lighting (opt)  
`brightness` - if you use dimmer - that value for you =)  
`timeout` - how many times the node should be waiting another "on" motion before sending "off" command

You can pass lux value by external entity and mark this event via motion-light-event node  
Also, you can prevent "on" by mark motion-light-event as "exclude" event.  
For example, you wouldn't be lighting "night lamp" if basic / main lighting already on.

See example for more details.

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

[node-red-contrib-simple-motion-light](https://flows.nodered.org/node/node-red-contrib-simple-motion-light)

WBR, 10der

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/253b7ff456a0e4d5cb8bb0639a8fdeec85c86700.jpeg)

---

<div class="post-metadata">

**Author:** ![tve](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tve/32/59475_2.png) [@tve](https://discourse.nodered.org/u/tve)\
**Post date:** [22 August 2022 19:54 UTC](https://discourse.nodered.org/t/a-simple-motion-lights/66752/2 "2022-08-22T19:54:27Z")

</div>

That looks pretty cool! 😃

I wish you good luck recovering your home someday 😢
