CoRE - Get peer assistance here with setting up Pistons

Yeah, its my CoRE pistons. Not sure who’s fault it is, but the Conditions in some of my pistons are/were disappearing. Rebuilding or recovering them got them back in most cases but in at least one case that didn’t seem to work. In another case, where I’d already re-added the conditions by hand, the recovery caused me to have 2 copies of everything.

I’d feel a lot better about this if there were a way to dump my pistons to a txt file or something. Some way to back them up then reimport. The thought of having to remember then retype 24 pistons by hand should something go wrong, is not a happy one.

This would also be cool because then you could potentially write pistons in a text editor rather than clicking around on the phone like an idjit.

Yeah that’s ST not the CoRE app or code. I know the CoRE developer is working on a web version to create/modify these, and backups was a target, not sure if it’s possible though. We’ll see what he comes up with. Best thing to do is get the dashboard up and running in Chrome with the plugin, then save a copy of the screen cap pic for each one.

Ouch. But thanks for the answer.

1 Like

@ady624
What is the easiest way to make a rule that does the following:

If Door X changes to Open;
Then Turn Switch Y On;

Then If, Motion sensor does not detect motion for 5 minutes
Turn Switch Y Off.
Else do nothing.

I was thinking:
If Door X changes to Open;
OR
Door X is Open
Then Turn Switch Y On;

Then If, Motion sensor does not detect motion for 5 minutes
Turn Switch Y Off.
Else follow up with piston in 5 minutes.

Wouldn’t that mean this piston is constantly running every 5 minutes though?

Hello! I am attempting to disarm Smart Home Monitor for 60 seconds and then rearm it by flipping a GE light switch by the door off then on OR on then off.

I have managed to get three other pistons working how I want them: light on motion, disarm for 5 minutes when any presence sensor arrives home, and control my cameras based on smart home monitor modes. You would think with this combination of things I’ve done I could get this working but for some reason it eludes me.

Any guidance would be appreciated.

this seems simple but I need help. Would like to get a notification if a certain presence sensor is away for more than 24 hours. I dont see the option for “stays” using the IF operator on presence. If I use a wait command it fires even if the presence changes back to present before 24hrs. Is there a easy way to do this?

I use a simple piston with expert mode enabled and have done this.
Have TCP active and this will stop the lights turning off and reset the timer should motion start again within the 5 minute period. The timer resets.

Can someone please explain why my simple piston doesn’t trigger? When I execute the routing either in the ST app or via a widget on my phone I would expect this piston to run, but nothing happens.

I would imagine the “was” is the issue. At the time of evaluation, if the motion sensor “was” active in the last 15 minutes, you have lost the opportunity for the action to happen because it will not be evaluated again in the future after the 15 minute wait period…

Try Motion Sensor “stays” inactive for 15 minutes. You shouldn’t need the “wait” in the “If” because the “stays” acts as a timer and trigger.

Thanks but I do not see a “stays” comparison for the motion sensor. I have; changed, did not change, is, is not, is not one of, is one of, was and was not. Is this an advanced option somewhere?

Also I thought the first If part would trigger anyway regardless of the “was” as that’s in a later “Then If” section, so should only come into play after the first bit.

Sorry if I’m being a bit thick but it’s rather new to me!

Another quick question; why do some task options have a black bullet point before them and some don’t? There’s obviously something different about them but I’ve no idea what.

EDIT: I see the “stays” option in a Basic piston but not in a Then If one. Any suggestions

Enable Expert Mode

Basis Piston

If Routine was execute
When True
Set color to " "
Fade

Then If
Motion “stays”…
When True
Turn off

You can change the “And, Or, Then-If, etc…” in expert mode even with a Basic Piston. So Cool!

Knowing the difference between a trigger and a condition will aid you in building you pistons. That is what the bullets represent. Solid Bullet is a Trigger. Hollow Bullet is a condition. Triggers takes precedent and it can be tricky when adding multiple triggers as they can and most of the time make it impossible for your piston to work correctly.

Read the Wiki here:
http://thingsthataresmart.wiki/index.php?title=CoRE

It goes over the various pistons, triggers, evaluations, conditions, etc… It took me 3 good reads to finally have a “Oh-OK!” moment and I am still trying to figure out all of the logic.

Also, you are correct. The Then-If will only be evaluated once the “If” is true. However, you don’t need the wait in this scenario because the motion activity will determine the wait period which will start counting once the motion sensor becomes inactive. This is accomplished with the “Stays”

Good Luck.

Brand new to Core/ST and trying to figure out if this is possible as i just purchased two HS WD-100+ Dimmer switches.

Here’s what im looking to accomplish, if doable:

My Setup:

  • I have a WD-100+ in my house that controls my house outdoor soffit lighting
  • I have a WD-100+ in my garage that controls my garage outdoor soffit lighting

My Plan:

When turn on House Switch it just controls the house lighting (like a typical switch).

When i double tap ON the House Switch it turns both House & Garage lights on, as well as sync’s the dimmer brightness between both switches.

When i double tap OFF it turns both House and Garage lighting off.

Is this possible?

Thanks for your help. I’ll have a go at rebuilding in export mode, and I’ll do some more bedtime reading :slight_smile:

I had a similar(ish) issue… when we would fall asleep on the couch, really comfortable couch, the dogs walking through the house would turn on various lights at 3am when motion was detected. Normally we launch a ‘goodnite’ routine when going to bed properly that takes care of this.

I created two intents with Alexa. One is to “stop motion” which will pause the pistons that detect motion and action the lights and a “start motion” which will resume the motion detection.

Possibly a ‘stop motion’ intent followed by pressing the physical light switch on the way out to resume the pistons?

I have a few virtual switches that are checked in CoRE for lighting on motion actions. The VS’s turn on under certain conditions, if a Harmony activity is running it will turn on the VS for that area (bedroom, living room, theater room) then I also have them named in Alexa Groups, so I say “Alex Turn on Motion Off” and all VS’s will turn on disabling motion throughout the house.

I also have motion only activate in the modes I need it to, so Night mode only allows the halls and living/dining room to turn on, and the living room is a lamp that turns on instead of the full blown overhead lights that turn on during the day and evening.

There are VERY few times I have to manually disable the motion as the rules I have read power on devices that show I’m being lazy and know I don’t want them on. :wink:

3 Likes

How can I hook up a piston directly to a virtual switch?

Just make the virtual switch a condition or action in the piston, it’s no different than a normal switch. You can use boolean variables for the same function but those aren’t linkable to things outside core.

I’m trying to get core to simulate motion in my motion sensor when a virtual switch is flipped. Is it possible? It would be either an Iris motion sensor or v2 smartthings sensor

You can use the uDHT to do this I think, if I understand your request.

1 Like