CoRE and Piston Rules Engine, first design steps

The level of brightness.

Have you tried with Set level? Set color should normally set the level as well, but not all DTHs respect that. Add a setLevel to whatever percent you want it to go.

Ive tested that set level changes the overall brightness of the light output. As seen in the screenshot above.

Think I figured it out.

Instead of calling the light to turn on, just calling the channel appears to be working.

So:

Next I think I’m gonna setup the police lights to come on if a contact sensor is opened while shm is armed/stay.

Police lights. LOL

Like so:

@ady624 Will this fire like I think it will?

@ady624 - its it in the roadmap to be able to use $currentEventDevice as an Action?

The use case I’m thinking about right now is:

If…
Any of Light #1 or Light #2 changes to on

Then…
Using $currentEventDevice…
Do something

My stays notification randomly fired roughly an hour after I tested it. Just an FYI, it could be ST randomness, but if you are rooting around in the code or hear it from someone else… data.

It hasn’t done it again. and I’ll keep an eye on it.

Thanks. Piston details so I can replicate?

I am not sure what you’re trying to achieve. Can you please explain?

Hey Adrian,

I’m gonna throw this out there cuz well… ST support says it’s not on their end and must be something with CoRE/Piston… (Where have we heard that before? Can you say RM) OK here goes

I have a Sunset routine to turns on some lights. It fires virtually every night, only missed once since I set it up. What is has done like 3 times now is run again at 11:59PM. The scheduler does show it gets scheduled each night but the logs do not show the lights actually came on, except for those 3 times. After it ran light night at 11:59PM, it didn’t reschedule it so I guess it won’t run tonight.

Here is the scheduler in the IDE

Here is the Piston and the Recent history



Thoughts?
Rick

@ady624 The"if" time has changed to between 2300 and 0445, but if master bedroom motion between that time is sensed, turn red light on, wait, turn off but if any contact sensor is opened between the times listed in the “but if”, police lights will come on.

The last thing I need is for the police lights to come on when they aren’t supposed to.

Ok I’m stumped. Here is the scenario: I have a motion sensor on back porch and a contact sensor on the door. I want the light to turn on when contact opens (that works) and then either stay on if there is continue activity by the motion sensor or turn the lights off after 2 minutes of no motion .

I tried the piston state change on latching, however the light still turns off even if there is motion.

Rick, time after x triggers twice a day: at x (when it becomes true) and at midnight (when it becomes false). That is normal. If you want things happening at x only, I would recommend using a trigger. The reason the light is not turned on at midnight is because the IF is false. It appears that sometimes the time scheduler is early, making the interval happen right before midnight - therefore turning the light on. I will fix it so that even if the scheduler is a bit early, I still consider it off.

The way you built this, the light will come on only if the door is open and there is motion and it is dark. But it can turn off if motion stops. But then if motion starts again, you’re again conditioned by dark and door open. And the door is closed, according to your piston’s red color… Maybe you mean Motion sensor is inactive and door is closed in the BUT IF?

You are using a time trigger in the IF. Try using the contact changes to open in the BUT IF. If you use triggers, they’re the only ones responsible for reevaluations. So go triggers then :slight_smile: and leave the time as condition.

You. yoooou. you are good you. yoou.

That did it. Thanks!

So I should remove the time trigger from the “but if” and just use the contact “changes to open” trigger (in but if)?

Not sure of your last sentence due to the :slight_smile: being in there.

v0.0.071.20160606 - Alpha test version - Added custom commands for @RBoy’s Blink camera integration.

Just make the door is open a trigger: changes to open.