CoRE - Get peer assistance here with setting up Pistons

Perfect. Thank you!

1 Like

One more question. Does WeatherTime update automatically? Or will the piston receive an update when it run?

It updates based on your zip code I believe, so your piston should evaluate the lux change.

of course. Sorry wasn’t thinking.

I have a bunch of routines that at this point do nothing but set a mode that triggers a piston. It just occurred to me that it would be so much easier to do away with them and just use virtual switches.

1 Like

I have the following Core Piston defined. Occasionally the lock will LOCK when the door contact (front door) is OPEN. Is this Core Piston setup correctly so that ALL THREE conditions have to be TRUE for the lock to LOCK? Essentially, I would like Core to LOCK the door lock when the door contact is CLOSED and motion in the Entryway/Hallway is INACTIVE after 1 minute, If any STATE changes, start over again waiting for all THREE conditions to be TRUE. Thanks!

Back in the early days of CoRE I set out on a project… It was called the ultimate piston… It turned out to be the ultimate failure.

I have it a valiant attempt…But I was not worthy…

But seriously, I highly recommend you keep your pistons simple, and as non complex as possible. Go for a categorized type of set up. Do each room individually. Keep your pistons independent of other pistons and automatons when possible. There will be times that you can’t, but try to avoid it.

I found the most success with this approach over large complex pistons.

Also, rebuild your pistons to find better ways of doing things.

Does anyone have some insight on why the 2nd IF in this Then-If statement does not seem to be working? I’m getting a push notification saying: “Office Motion: active (Inactive for 0 minutes)”

IF condition for that action clearly requires the inactiveSince variable to be greater than or equal to 1, yet the action is somehow executing even when inactiveSince is 0.

Whoa! I need to step up my Piston Game…Don’t know what the heck is going on in this Piston but I sure want to know!

Where do I go to read about all of this Variable stuff?

I don’t know why you’re getting the notification but your variables are wrong, activestart and inactivelast aren’t number variables so inactivesince will always be null (0)

I don’t understand the second IF condition, if motion changes to active won’t the $previousEventValue always be inactive? If it’s not null. I’d try without that condition.

I set up CoRE to notify me if I change modes to Away AND a door or windows if left open

I have it set for

If Contact Sensor X Y or Z ( any) is open

AND

Mode CHANGES TO AWAY.

Then send push notification {$currentEventDevice}

The only problem is the notification actually says {$currentEventDevice} instead of the name of the device.

If I remove the “Mode” requirement it sends the actual device name in the notification. As soon as I add the AND “Mode” requirement, it seems to send the code instead of the value,

What should I be using instead of {$currentEventDevice} to get it to work with the mode requirement too?

This is how I have mine set up.

You guys are killing me! Where do I get the information on this “{$…}” stuff? I so want to learn this!

How does it work?

OK,

I’ve had this piston set up for a while thanks to some help much earlier in this thread. I’m noticing as it’s gotten cold that it’s not working as expected lately. I’m guessing, after keeping the dashboard open for a while, that it keeps resetting as the temperature sensor reports that it’s still under 75…then reports again…and again…


Curious as to whether anyone has an idea to lock it in–basically, if the mode is home and the fan is on, turn off after 30 minutes. I was thinking about a variable, but seems like it’d run into the same issue (temp sensor reports, timer resets). I thought about “mode changes to” but then what happens if I’m already in home mode and I switch on the fan manually?

If you look at the dashboard view, all the system variables ($…) available are listed below the piston. Locals, Global, and System, in that order.

In the task, try enabling “only execute on piston state change”.

I’ve seen this but didn’t really understand what I was looking at. So, each time you build a piston, in dashboard view, you can see the variables that are related to just that piston? Then from there, you can substitute naming stuff for the variables and then it will automatically name?

How do you know how to code it? Is there any documentation that I can read to better understand it?

Hmmm. Turned that on and it already is reacting better. I’ll know in about 20 minutes if it’s working!

How do you do the AND and XOR? I can’t figure out how to do both.

The system variables are hard coded and they’ll populate depending on the piston you created and yes, you’ll only see the variables related to that piston with the exception of the global variables that are available to all. You can then use or manipulate the data in those variables by setting your own with calculations etc…

Not sure if Expert Mode has to be enabled, it’s been a while. Create first condition, Add another condition, within that condition, add a group. This is what it looks like on ST app.