Hue Bridge, ST and resetting to last colour used


(Martin Newham) #1

Ok, here’s the scenario:

Two motion sensors, #1 and #2. One Hue bulb (colour).
Person walks past #1, Hue turn on/blue for 2 seconds
Person walks past #2, Hue turn on/red for 2 seconds

Seems simple? If the Hue is at white with no movement, it’s fine. Person walks past (slowly), it will go from white to blue (or red), and return to white (or off depending on initial state).

Here’s the problem, if the person moves between #1 and #2 quickly within the 2 second window…

Light white
Sensor #1, motion; light blue
Sensor #2, motion; light red
Light red.

… Problem seems to be that when a new event is triggered while one is already in progress, as it looks at the current light values before setting the new one. So it reverts back to the wrongly noted colour after the event. Instead of reverting back to white it will go from red to blue.

Not sure if anyone else has experienced this or connecting Hue bulbs directly to ST will fix this issue… any suggestions welcome.


(Tony - SmartThings Unpublished Contributor ) #2

Set up the motion events to run only when the state of something is false / off.

If you have Rule Machine, try using a private boolean flag. If you don’t, try using a virtual switch.

In either case, have your two motion event rules trigger only if the boolean is false / virtual switch is off. If either motion event runs, then (1) set light to color you want, (2) set boolean to true / virtual switch to on, and (3) using a delay of [X time], set boolean to false / virtual switch to off.


(Martin Newham) #3

Excellent, I haven’t installed Rule Machine yet, will install it tonight (still a bit green with installing stuff–fingers crossed).

Thanks for your prompt reply.


(Martin Newham) #4

I was looking for Rule Machine, found this:

… but the links aren’t working. I’m sure I read that the author has removed the SmartApp?


(Tony - SmartThings Unpublished Contributor ) #5

That’s why I said IF you had Rule Machine… :sunglasses:


(Martin Newham) #6

Oh right, that’s a no then.


(Tony - SmartThings Unpublished Contributor ) #7

Then try using virtual switch option.


(Daniel) #8

@mjn, which app do you use to set the color of use when motion is triggered, and then back to the color that it was previously after motion stops?


(Martin Newham) #9

It’s the “Notify me with Hue” SmartApp, one of the supplied apps.