Middleage beginner not to good in english needs help, it´s never to late

Hello Community,
I started a couple of years ago with some Hue lights and switches "programmed" with the Hue app. After a while I found out that I wanted to do more than the Hue app was able to do so i started to use the iConnecthue app instead. I have now bought a HE because I want to get to the "next level" . I have a automation I want to try, but I don´t know ho to do it and would appreciate som suggestions how to start. What I want to achieve is that a bulb should light up in hue x, saturation y, level x for 30 seconds when a motiondetctor dectects movement and the lux-value is 10 or less, after 30 seconds the bulb should return to its previous state again.
I hope you understand my idea and would really apprecite some tips. The bulb is a philips hue connected via Hue Bridge Integration and the motionsensor is a Hue outdoor sensor connected to HE.

Thank you very much.
I think I understand almost everything that you have written, but there is one thing I don´t understand. Which part in your rule will get the current status of the lamp before setting the 30 seconds color and put it back in the previous state after the 30 seconds?

1 Like

Try the community app Lights On Motion Plus. It probably will be much easier to use. I think it does everything you requested.

It is available to install via Github, but I would suggest the Hubitat Package Manager instead. It is a much easier way to install and maintain apps.

Thanks a lot for giving fast and very useful information, really appreciate it.
My plan is to learn how to use the RM, I know it won´t be easy, but I
will give it a try. What is the languge used for programming i HE?
I´m going to try to find som beginners guide in Swedish to start learning.
I have started making the rule in RM and this is what I have done so far.
(Don´t know if i uploaded the picture right)

What I´m looking for now is to find the Off:... action.

1 Like

Perfect, will try that.
I have been thinking about your first row "Cancel Delayed Actions".
Is the reason to ensure that you always get 30 seconds light?
If it wasn´t there and the rule was acitivated 10:00:00 the light will turn on and
the timer start to count, if the rule was acitivated again 10:00:20 the light would only
be set for 10 seconds?

Another question if it´s ok, if I unpair the motion sensor and the pair it again, will the rule still work or do I have to write it again? I have problems with the sensor, it doesn´t report the lux value.
In device preferences the value is for Lux Reoirting is deafult: 10 Lux change, but that doesn´t work.

You are fast, very fast to answer :smile: I think that we are saying the same thing but in different words.
I think its easiest for me to think that always start a rule that includes delays with Cancel Delayed Actions.
I think I now have made the rule, but it doesn´t work, can you see anything that is wrong?
Should it start working immediately?

Don´t exactly understand your answer, do you mean that everything looks fine except for a missing "End if" which I suppose should be under Restore line?
I have been looking around and I can´t find out how to insert that.
When I compare your rule with mine your IF line ends with Exit rule, mine with THEN could it be that simple that I create my rule in a never version of RM than the one you have used?

I realise when looking att your rule and comapre it to mine that I have to rename all of my devices to get a better structure in my devicelist :smile:. I managed to get the END-IF in the right place. Even if it´s not necessary it looks better. At this moment I update my outdoor sensor because i find som information on the forum about some issue with lux-reporting:
"ya i needed to connect my outdoor hue motion to the hub just to get a recent firmware update as there was an update to fix lux reporting..

you dont need to removre from hubitat. just reset it after f/w update and add back to hubitat. I did notice that is was added even though the add device didnt show it.. there seems to be a bug in that regards when re-adding zigbee devices that were never removed. I hope this would solve my problems.

Once again, thanks for your support, it´s great.

1 Like

Platform documentation for developers is here:

Developer Documentation

Good luck, and welcome!

Thank you

1 Like

yes noticed that too. when adding it back in.. it never shows done but it is added back sucessfully.

Good evening furom.
Finally it started to work, for a while. And I think I know what the problem is, but not how to solve it, of course.
For example at 10:00:00 the rule is activated, the lamp is on with ordinary white light. The rule starts with capture that white color, then change to the color in the rule. at 10:00:15 the rule is activated once again and it starts with capture the light wich now is the color in the rule wich means it won´t change back to white after the delay. The way I´m thinking of using this rule it´s ok if it activates once and the is blocked for another activation until the timer has come to and end. I think the rule should be something like this, if its >10 lux and motion is detected and timer is not activated, run the rule. Maybe this is a situation when not to start a rule with Cancel Delayed Actions?

I understand how the function works when I read it, but I don´t know where to put it, as a virtual device?

I´m not looking for the best solution always. It´s more important for me to understand and learn :smile: . I became happy when I understood why the rule didn´t work, that showed me that I start to understand how HE "thinks/works".

1 Like

Ok, so it´s a 3 step operation then? 1 Create vSwitch as virtual device(done that, I think ). 2 make a rule that includes that vSwitch like the one that you have written. 3 use that new rule in the previous rule that turns on the lamp for 30 seconds? Is the label of your vSwitch "dampener Timer"?

I understand, when I should make the vSwitch-rule, what Action Type should I choose?

I think I've finally got the feature I want. What I want to achieve is that if it is dark outside and the sensor detects movement, a lamp should indicate this for 30 seconds before the lamp returns to the same status as before. What do you say, does the rule look right? Many thanks to Furom who helped me along the way.