Getting Motion Sensor to Flash an Aeon LED Bulb

I’m new Hubitat, having only been using it for a little over a month, so if you deem this question needs to be moved to the Beginner’s level, you will not upset me in the least.

Using RM 4.0, I am trying to have a Zooz 4-in-1 motion detector placed outside flash an Aeon LED bulb in the house. But I am not finding the option for flash in RM 4.0, yet I know there is a light effect (3=Flash) available from the bulb.

How can this be done?

During my research, before creating this post, I read someone who offer a similar Virtual Switch solution. But, I’ need a Novice level explanation how the Virtual switch will interact in my rule. Trying to remember the exact post; it had to do with creating 2 or 3 rules to get the bulb to flash and how those multiple rules interaction is why I ask for a Novice explanation.

Thanks for reading my post.

Bill

Update;
As I continue to experiment, I tried the solution below.

But, the results were unexpected. When motion is detected, it turns the bedside Aeon LED Bulb 10% Orange and then it stays on. I understand why it is staying on, I do not have an Off action in the rule.

But, what happened to the 7 seconds of 100% Green, and why did the Orange color only come on at 10%?

Thanks
Bill

That won't do anything close to what you are looking for. First of all, your repeat needs to be above the actions that you want repeated.
Second of all, RM schedules all the delayed actions at the beginning of the rule, so this will try to flash both colors at once. But be glad it didn't work, because you also have to stop the repeating otherwise it will repeat forever. What you want.

Trigger Driveway Sensor Changed:

Action 
If Active THEN
     Repeat actions every 14 seconds subject to cancel
          Set green
          Delay 7 seconds
          Set color Organge
     End-REPEAT
Else 
     Stop repeating actions
End-IF

Thank You Ryan780!!!!
I can clearly see your thought process and understand the code.

BUT, only using Hubitat for 1 month where can I actually edit this JSON code? Up until now, I have only used the menus and I am finding them a learning experience to navigate.

Thx
Bill

You can't. Hubitat does not make any of their code publicly available except for 2 or 3 things on the Hubitat github page.

Bummers

OK, I admit stupidity,
Please tell me if I should use Rulemaker 4.0 or 3.0 and how to get an IF-Then-Else...and Repeat (End-Repeat) from these menu options.

Or, can this only be done with IFTTT?

Thanks
Bill

Ryan’s example uses Rule Machine 4.

Thank You ogiewon.
But it still does not answer my question concerning Action menu options to find If, Then, Else and Repeat until End Repeat.

What is the secret code to understanding these menus?

Bill

They are under conditional actions.

THANK YOU JasonJoel,
That was the information I really needed...

Here is what I created:

Select Actions for Driveway Motion Detected

IF (Driveway Sensor active FALSE [FALSE]) THEN 
     Repeat every 0:00:14 
          Set color: Bedroom Table Lamp ->Green ->Level: 100 
          Delay 0:00:07 
          Toggle color: Bedroom Table Lamp ->Orange ->Level: 100 
          Delay 0:00:07 
     END-REP 
ELSE 
     Stop Actions:  **This Rule** 
END-IF

I looked and looked for a second SET color (i.e. Orange), but could only find TOGGLE color.
Will this work without locking the CPU? Or Smart bulb?

Thanks
Bill

1 Like

Unfortunately this does not work.
I'm wondering if it has something to do with the Double FALSE [FALSE].

Oh, and I took out the Level 100 parameters and replaced 'Toggle Color' with 'Set Color'.

No Joy

You have to have the Cancel enabled for your delays. Also, you do not need the second delay of 7 seconds. That will happen automatically because you have the repeat happening for 14 seconds.

What do you have as your Triggers for the rule to fire? You have to have a trigger otherwise the action won't happen. Your trigger should be the motion sensor changing.

Hi Ryan,
Thank You very much for your reply.
The motion sensor is a Zooz 4-in-1, mounted under the overhang of the garage to keep it out of the weather. It will get cold, but not wet.

Here is the current code.

I need to look around to find the Cancel enable setting.
Any suggestions where? Would it be under the If/Then initial setting?

New Question,
I have been playing around with the sensitivity of the motion sensor today. Just when I thought I had zeroed on the right sensitivity , it seems to change and become more sensitive, it notices cars driving down the street, rather than 5 minutes previously when only movement in the drive way triggered the sensor.

Can the temperature of the day change sensitivity?

THANKs for your reply's and information.

Bill

It's in the repeat. When you set up the repeat, after you enter the time, the cancel will show up as a toggle switch to the right of the repeat time.

Absolutely! PIR sensors detect changes in ambient temperature. So, the relative temperature of the background will greatly affect the performance if PIR sensors. In fact, when the background gets hot enough it will mask movement in the foreground. And when it gets cold enough, it will reduce the temp enough to make movement unable to be detected as well. PIR sensors are notoriously bad outside. There's the new Hue outdoor PIR sensor which is better but no outdoor motion solution is perfect.

I use mine to detect when someone has pulled into my driveway when I am expecting them. That way i know when guests have arrived before they ring my doorbell. But i live in a high traffic area and in a condo and my unit doesn't have any windows that look out over the garage/driveway area of the building. So, i have to have something to know when people pull in my driveway. There's no way that I could have a rule like yours set up for my situation. it would be flashing all day long. So, I limit my rule with an activation switch. It only does this when the switch is on so when someone is one their way over, I switch it on.

Will, that is some food (actually information) for thought.
So far, I added a little PVC pipe about 1.5" long to encapsulate the motion sensor. That worked for a little while. Then as the day got hotter, the sensor kept getting more sensitive and now I've got the sensitivity down to 7, which is 4 steps below the default 3. It continues to trigger on the occasional traffic driving down the street.

Maybe I need a combination of 2 different sensors to get some reliability.

Need to think on that one.
For the moment, to stop driving myself crazy, I paused the rule so I could think of a solution.

Made the changes to the code you suggested. Here is the current rule.

Name this Rule: 
Driveway Motion Detected

Select Trigger Events
Driveway Sensor *changed* 

Select Actions to Run 
IF (Driveway Sensor active FALSE [FALSE]) THEN 
     Repeat every 0:00:14 
          Set color: Bedroom Table Lamp ->Green 
          Delay 0:00:07 (cancel) 
          Set color: Bedroom Table Lamp ->Orange 
     END-REP 
ELSE 
     Stop Actions: **This Rule** 
END-IF 

What about the double FALSE [FALSE] in the If/Then. Should I be concern? What do they represent?

Thanks
Bill

If you're trying to pick up cars pulling into your driveway then that is fairly easy to achieve with a camera an one of the image processing applications out there like Blue Iris or iSpy. They all have algorithms that can detect only larger objects and only in a specific area of the image. Or they have virtual gates, so you only get motion when an object of a certain size passes through the gate. Sounds like that is what you need. These apps can then send a request to the Hubitat Maker API to activate a virtual motion sensor so it's just like a real motion sensor. It sounds like that application would be much more accurate if you are just trying to detect cars pulling in your driveway. You are never EVER going to be happy with a PIR in this case. You are always going to get false alerts.

No, you should not be worried., Look at an image, not a copy paste.

Untitled

The blue box is the current state of whatever attribute the rule is comparing. The red box represents the value the rule wants it to be to make it true. The yellow box represents the truth of the clause or sub-statement and the Green box is the overall truth of the entire statement.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.