CoRE - Get peer assistance here with setting up Pistons

Must be the v1 ST motion? Not sure the new ones have that.

As @eibyer mentioned, it’s a first gen ST motion device. How would the piston look?

I was over thinking it. I just use illuminance and motion. So if the illuminance is greater than 40 and any motion sensor has motion then run Routine.

1 Like

Awesome @bamarayne… It works well… Thanks for the suggestion!


@Mbhforum enable Expert Mode, select the motion sensor but select the powerSource attribute. You can then compare that to get actions to run when power runs out.

I have expert mode enabled but for a basic piston I only see motion, battery, rssi and lqi. I don’t see any attribute for power source.

What attributes do you see in the IDE for the device?

Hey guys - I ran into an issue that I wrote about here [RELEASE CANDIDATE] CoRE (Community's own Rule Engine) and JD suggested I try this thread. Can someone please have a look and let me know what they think may be wrong? Thanks!

1 Like


battery: 100 %
motion: inactive
lqi: 100 %
rssi: -70 dBm

I have a couple time-based pistons to arm SHM in evening and disarm in the morning. About once a week when I let the dog out, all my devices start beeping because of intruder detection for the door opening… piston failed to run.
IF Trigger happens 5:15 every day
THEN execute good morning

1–Can this be made more robust?

2–Also, I just realized I need to add some logic so this doesn’t turn off my “vacation mode” which core will hopefully detect to turn on/off lights randomly in the evening. Is it better to add to the IF (if 5:15&&not Vacation, then GoodMorning)… or is it better to use the “Piston Restrictions” like only “execute in these modes”?? I have had this question for a while when I notice these restrictions after adding several items to the IF.

Hi Kevin. I designed this piston to make sure any missed modes were corrected asap. It detects a missed mode, alerts me, and attempts to set the correct mode. It might help you.

Is there a way in an ELSE block to say…

Do “this” in x minutes?

“this” could be an action or run another piston.

OK, I am just having some dumb moments lately. So… I want a piston to turn on my living room lights when I’m home and illuminance is less than 50. I want the lights to turn off if the illuminance raises above 50 or the mode changes.

The turning off piece of this piston seems to work fine, but the turning on piece is not.

I previously had it set to:

Illuminance < 50


Mode is HOME or Disarm

turn on the lights. It was reliable when I woke up, lights always turned on. But about 25% of the time when I came home from work, the lights wouldn’t adjust. I was wondering if it had to do with the order of the conditions… like if home or dark happened first, but I couldn’t seem to nail it.

So now, I switched to the attached version which didn’t work this morning. Lights stayed dark.

I haven’t monitored logs yet, since I’m either returning home or waking up when the failure happens. It might be dumb piston, it might be dumb smartthings.

So I guess, what is the best way to have this set up so that:

I’m home and lighting drops below 50, lights on
Lighting is below 50 and mode changes to home, lights turn on

I’m guessing the way I describe above is better than the picture below? Thank you for any assistance!

It’s most likely the lux. Most battery operated devices will report lux once an hour or even less often. Plus, 50lux is pretty lit. What was the lux reading at the time you came home? I’d start there… Also, the dashboard will tell you which condition was true and which was false the last time the piston ran, just look for the gray/red/blue colors. Gray means the condition was skipped/not evaluated. Red means it was false, blue means it was true… Gives some clues, you know :smiley:

My outside Aeon Gen5 MultiSensor reported 0 lux at 10:04pm last night and then 285 lux at 8:53am this morning - no values between those two times… completely useless, but if I tell it to report more often, battery has a stroke. Both of my indoor sensors still report 0lux. Useless. UV index has always been 0, even when in direct sunlight…

Yeah, maybe it’s the lack of reporting. I know the lux was plenty low, especially at 5am today (it was probably sitting at 1 or 2) when it last didn’t cooperate. The lux meter I use is the motion sensor I also use to change modes… so I know the sensor is paying attention anyway.

Go in the ST app and look at its illuminance history in the Recent tab… how often did it report since last night?

It looks like it’s every minute while things are happening in the room. When we went to bed it stopped reporting lux until this morning when we woke up and it saw motion. There was a 3 minute delay in that first report. Not sure I waited 3 minutes before fiddling with stuff. Now it’s back to reporting light every minute or so

OK, I just went for every possible scenario… I’ll get these darned lights to be reliable… Basically, if there’s motion, or it gets dark, or I get home, or it just is dark and I’m home… I think that should cover it…

1 Like

Hi All,

I would set different camera preset base on sensor.

I have 1 PTZ camera in the corner of my living/dining room that cover 90% of the area.

Here are the trigger:
Stairs Motion - set camera preset 2 - only for 10 seconds
Window open/close sensor - set camera preset to 3 only for 10 seconds.
All other times - set camera preset 1
I can only set this to revert back to camera preset 1 only when motion stop or open/close sensor change.

Advance setting:
When in camera preset 4(Baby cam) after sensor trigger move back to preset 4
-I trigger preset 4(Nap Time) and preset 1(Home Relaxing) via routine… If this helps.
*I’m thinking I need to create a Nap Time Mode to do this.

Thanks for your help in advance.