# Motion sensor and light

**URL:** https://discourse.nodered.org/t/motion-sensor-and-light/36267
**Category:** General
**Created:** [20 November 2020 23:25 UTC](https://discourse.nodered.org/t/motion-sensor-and-light/36267 "2020-11-20T23:25:20Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [22 November 2020 03:22 UTC](https://discourse.nodered.org/t/motion-sensor-and-light/36267/8 "2020-11-22T03:22:56Z")

</div>

For light sensor? Or motion sensor? Search for NR direct i2c stuff driving a light sensor, I posted a flow to support the light sensor I used at the time.

> [@So you have a tsl2591 sensor? Have I got a deal for you!](https://discourse.nodered.org/t/so-you-have-a-tsl2591-sensor-have-i-got-a-deal-for-you/31480):
>
> The following flow can drive the tsl2591 light intensity sensor. This flow is a bit more involved, based on nodes, than functional code, this was done by design to better illustrate how to use the i2c nodes in NR. Refer to the tsl2591 data sheet for details on gain and integration time settings. This flow does explicit validation for the tsl2591 chip, so it will not work as is with the tsl2561. If someone wanted to send me a tsl2561, I would develop a similar flow for the tsl2561. I have te…

I also now have a '26' sensor, where my original flow above was for the '29' variant. But the flow logic is almost identical, and I as I recall there are a couple of examples for the '26' variant posted already.

For motion sensors there are many variants, PIR, SR04, US-100, even a few fancier ones. At some point I will get around to posting NR examples for each. Even have an IR sensor flow I am testing I use for my garage door controller.

---

_[View the full topic](https://discourse.nodered.org/t/motion-sensor-and-light/36267)._
