# Flow with Hue motion sensor

**URL:** <https://community.homey.app/t/flow-with-hue-motion-sensor/2983>\
**Category:** Devices\
**Created:** [October 18, 2018, 8:47pm UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983 "2018-10-18T20:47:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rafi/32/4052_2.png) [@rafi](https://community.homey.app/u/rafi)\
**Post date:** [October 18, 2018, 8:47pm UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/1 "2018-10-18T20:47:17Z")

</div>

I just set up new hue motion sensor to turn on the LED lights in the kitchen where’s a movement. It really sucks. The flow is set up to keep the lights on when there was a movement for 15 minutes. The light goes off when the movement is off. No disapointment. That product is a c r a p. So many issues. €300 gone. It’s ben like that for over a year. Issue after issue w  
th no reply from support. Classic.

---

<div class="post-metadata">

**Author:** ![Marcel\_Visser](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_visser/32/66024_2.png) [@Marcel\_Visser](https://community.homey.app/u/Marcel_Visser)\
**Post date:** [October 19, 2018, 7:08am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/2 "2018-10-19T07:08:14Z")

</div>

And what is your question exactly?

---

<div class="post-metadata">

**Author:** ![arnizzle](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arnizzle/32/9485_2.png) [@arnizzle](https://community.homey.app/u/arnizzle)\
**Post date:** [October 19, 2018, 8:20am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/3 "2018-10-19T08:20:43Z")

</div>

Not using motion sensors from Philips, but is it possible you’ve configured turn off lights in the app from Hue?

---

<div class="post-metadata">

**Author:** ![rafi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rafi/32/4052_2.png) [@rafi](https://community.homey.app/u/rafi)\
**Post date:** [October 19, 2018, 11:10am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/4 "2018-10-19T11:10:02Z")

</div>

No. The only Hue device is the motion sensor. I have a flow that is configured as follows:

- when - The motion alarm turned on (Hue motion sensor)
- and - Luminance (Motion Sensor) is less than 50
- then - Kitchen lights - Turn on and Turn off - Delay 15 minutes

I set the delay to still have the lights on when I stand still when doing something in the kitchen.  
The Hue Motion sensor is unpredictable with Homey. E.g. when there’s movement the lights turn on for the period when the sensor detects movement than they go off despite the setting in the flow. Sometimes they stay on for 2 or 4 minutes. I tried both Hue App available in Homey Apps and there’s no difference in the way they work.

And the question is if the Homey OS will ever be stable?  
I have another multisensor just beside the door to the garden - outside and sometimes it turns on the lights in the garden and sometimes it only detects movement and the lights stay off. I’ve been having issues with Homey since I bought that.  
Another thing is its Apps. Updates to them are very rare. I bought Ikea Tradfri gateway and motion sensor but read about what type of devices it supports and it was too late - motion sensor not supported.

I could multiply the issues but it’s too late I have to live with that device. I’ve invested too much money just to dump it.

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [October 19, 2018, 11:33am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/5 "2018-10-19T11:33:06Z")

</div>

Are you sure you don’t need the count down timer, it kinda sounds like the flow is being triggered whenever it detects motion (regardless of whether or not the light is already on) which in turn means that every 15 minutes after it detects motion … the lights are turned off …

ie, you walk into the room at 13:00pm - light turns on, at 13:15 the light is scheduled to turn off.at 13:02 you turn around to open a draw, the light is already on, but the light is now also scheduled to turn off at 13:17, etc etc etc. It was cause some pretty ‘sucky’ behavior.

You might want to have a look at :

[https://apps.athom.com/app/nl.bevlogenheid.countdown](https://apps.athom.com/app/nl.bevlogenheid.countdown)

Create a flow, if motion - and light off and lux turn on light, set timer to 15min.  
On motion and light on reset timer to 15 min  
When timer = 0, turn off light

---

<div class="post-metadata">

**Author:** ![rafi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rafi/32/4052_2.png) [@rafi](https://community.homey.app/u/rafi)\
**Post date:** [October 19, 2018, 12:49pm UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/6 "2018-10-19T12:49:05Z")

</div>

As per your example re flows, do I need three of them?

---

<div class="post-metadata">

**Author:** ![TedTolboom](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tedtolboom/32/12081_2.png) [@TedTolboom](https://community.homey.app/u/TedTolboom)\
**Post date:** [October 19, 2018, 2:28pm UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/7 "2018-10-19T14:28:19Z")

</div>

Yes, there are multiple examples shared on this forum before showing the 3-flow approach commonly used:

1. turning on the light is based on the motion alarm trigger (and light intensity and possible time)
2. timer is (re)set at each motion alarm cancellation
3. turning off the light is when the timer reaches zero.

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [October 19, 2018, 5:36pm UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/9 "2018-10-19T17:36:22Z")

</div>

I have hue motion sensor set up to switch the lights on at low lux. And switch radio on at movent and off after 15 min if no movement.

Works fine!

So I think you have an issue in you flow.  
I would avice you to add logging ( papertrails) so you can log the behaviour of your flows

---

<div class="post-metadata">

**Author:** ![rafi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rafi/32/4052_2.png) [@rafi](https://community.homey.app/u/rafi)\
**Post date:** [October 19, 2018, 7:53pm UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/10 "2018-10-19T19:53:11Z")

</div>

You’re probably right. I was so frustrated and wrote this. I did what Jamie advised but still something wrong. The light goes on but never turns off.  
Flows are as follows ( I had to merge them as one file as I’m not allowed tpo attach more that one file as a new user):

 ![04](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/e/ea20b71d80d23e68b6522b9ca52eda75b999e7d2.jpeg)  
Any one could help, please?

Thanks

---

<div class="post-metadata">

**Author:** ![johan\_bendz](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_bendz/32/10344_2.png) [@johan\_bendz](https://community.homey.app/u/johan_bendz)\
**Post date:** [October 19, 2018, 8:31pm UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/11 "2018-10-19T20:31:35Z")

</div>

The way you trigger those flows will not work, Turned off is a momentary situation and the flow will only fire precisely then. You should rather trigger the flow with motion and have a check in AND if the light is on or not.

Your second flow should be changed into one that checks for movement during the countdown and if so resets the countdown, this to ensure you don’t end up in the dark when walking around in your kitchen late at night. 🙂

---

<div class="post-metadata">

**Author:** ![rafi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rafi/32/4052_2.png) [@rafi](https://community.homey.app/u/rafi)\
**Post date:** [October 19, 2018, 9:29pm UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/12 "2018-10-19T21:29:22Z")

</div>

If I trigger with motion then in the second column “…and” I can’t change the light behavior. It only allows - Is turned on - can’t change to anything else.

---

<div class="post-metadata">

**Author:** ![rafi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rafi/32/4052_2.png) [@rafi](https://community.homey.app/u/rafi)\
**Post date:** [October 19, 2018, 9:32pm UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/13 "2018-10-19T21:32:52Z")

</div>

The second flow checks if there was a movement and light were on and resets the countdown, I guess. I can’t see the exact option to reset. It’s only - Start countdown timer, which I believe is the one that is required here. Sorry, for you it’s easy-peasy but I have only just started. Thanks

---

<div class="post-metadata">

**Author:** ![TedTolboom](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tedtolboom/32/12081_2.png) [@TedTolboom](https://community.homey.app/u/TedTolboom)\
**Post date:** [October 19, 2018, 9:33pm UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/14 "2018-10-19T21:33:11Z")

</div>

@rafi check the flow example of the first search result; it shows the exact 3 flows to rebuild with your Philips HUE motion sensor:  
[https://community.homey.app/search?context=topic&context\_id=2983&q=Motion%20flow&skip\_context=true](https://community.homey.app/search?context=topic&context_id=2983&q=Motion%20flow&skip_context=true)

direct link of @Rocodamelshekima’s flow example: [Motion flow](https://community.homey.app/t/motion-flow/1764/5)

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [October 20, 2018, 5:20am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/15 "2018-10-20T05:20:40Z")

</div>

I agree with johan, your flows will not work this way (and they dont).  
The way you created them they wil only be triggered at the precise moment that you turn of the cupboard.  
Thats not what you want.  
Flow 1 you want to trigger (WHEN) every time your motion detector does not see motion anymore. to prevent a lot of switching use a countdown timer. (See example flows mentioned above)

---

<div class="post-metadata">

**Author:** ![TedTolboom](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tedtolboom/32/12081_2.png) [@TedTolboom](https://community.homey.app/u/TedTolboom)\
**Post date:** [October 20, 2018, 7:19am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/16 "2018-10-20T07:19:08Z")

</div>

Your flows are almost right… but you’ll need to swap the motion alarm to the IF column and the Cupboard condition to the AND colum.

1. **WHEN…** `the motion alarm turned on` (Motion sensor) | **…AND…** `LUX < 60`, `Is turned off` (Cupboard) | **…THEN** `Reset countdown timer` (Kitchen Cupboard), `Set brightness` (Cupboard)
2. **WHEN…** `the motion alarm turned off` (Motion sensor) | **…AND…** `Is turned on` (Cupboard) | **…THEN** start countdown timer
3. **WHEN…** `timer reaches zero (0)` | **…AND…** `Is turned on` (Cupboard) | **…THEN** `Turn off` Cupboard light

In 1. it is for the Fibaro dimmer-2 not needed to first turn on the cupboard light and then set brightness, setting brightness when the device is turned off, will automatically turn on the light.

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [October 20, 2018, 8:12am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/17 "2018-10-20T08:12:42Z")

</div>

Typo?

> Blockquote **WHEN…** `the motion alarm turned off` (Motion sensor) | **…AND…** `Is turned ✅ON✅` (Cupboard) | **…THEN** start countdown timer

---

<div class="post-metadata">

**Author:** ![TedTolboom](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tedtolboom/32/12081_2.png) [@TedTolboom](https://community.homey.app/u/TedTolboom)\
**Post date:** [October 20, 2018, 8:31am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/18 "2018-10-20T08:31:26Z")

</div>

Where? 🕶

---

<div class="post-metadata">

**Author:** ![rafi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rafi/32/4052_2.png) [@rafi](https://community.homey.app/u/rafi)\
**Post date:** [October 20, 2018, 9:20am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/19 "2018-10-20T09:20:55Z")

</div>

Thanks a mill for that. All worked as a charm.Lesson learned.

I had to set up the brightness as this is Fibaro rgb controller and behaves oddly. Sometimes it sets brightness to the lowest level.

---

<div class="post-metadata">

**Author:** ![TedTolboom](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tedtolboom/32/12081_2.png) [@TedTolboom](https://community.homey.app/u/TedTolboom)\
**Post date:** [October 20, 2018, 9:33am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/20 "2018-10-20T09:33:02Z")

</div>

@rafi cool!  
Now it is solved, do you mind changing the title of this topic to a bit (?) less explicit??

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [October 20, 2018, 9:46am UTC](https://community.homey.app/t/flow-with-hue-motion-sensor/2983/21 "2018-10-20T09:46:11Z")

</div>

And pls give the solution credit by marking it solved 😉

[Next page](https://community.homey.app/t/flow-with-hue-motion-sensor/2983.md?page=2)
