CoRE - Get peer assistance here with setting up Pistons

Merge the two tasks into a single action:

Using Tv...
   Wait 20 minutes
   Turn on

It’s working now. Don’t k ow what the issue was

Thanks and how would you go about doing that?

I can’t seem to get this to work. I have seen others ask questions similar to this above, but I saw no responses.

I am trying to get a light to turn on (and be red) in my closet when motion is detected in my bathroom between 11pm and 5 am, then turn off a minute later. That way, my girlfriend can wash her hands in light while I am trying to sleep nearby.

However, next time I turn it on, I want the light to go back to being white, or blue, or what ever color it was before the motion. I can get it to turn on and be red, just not revert to its initial state. I am not sure if I am using the “Capture State” correctly.

This is what I have:

When you enter the Wait 20 minutes, scroll down and you’ll see another Add Tasks, that where you enter the Turn On

I’m not sure if Capture and Restore worked for others but I’d suggest using Save attribute color and level to variable instead, then to restore, use Load attribute from variable.

If it doesn’t work, try adding a 1 sec delay after Save attribute to variable, then Set your colors and level.

After entering the wait and scrolling down to add task I do not see any Turn on Option

Sorry, my bad
it should be

Using TV
 Wait 20 (scroll down) Add Task, then Turn On

Hi everyone,
I’m using CoRE to run a lot of my tasks. I like using routines a lot more than modes but routines are limited to the “executed” variable where modes and switches can use about 10 such as changed to or changed away from. Right now I’m using a dimmer @ different percentages to represent each mode so I can get more function out of it. Is there a better way to do this?

Much appreciated, working well now:+1:

1 Like

Hi! I need some creativity here :slight_smile:

Im using Broadlink RM Pro to control my rolling shades (sending RF codes as with the remote control), I can use it with Alexa through ST or directly with ST without a problem. How it works is as follows:

On-Off Swith for Up (on) and Down (off)
On-Off Switch for Stop (both on and off sends the stop comand)

I want in the morning the shade to roll up gradually, when I go to bed I always close it (off), so I want at ceratin time the shade to roll up, so I send the ON command (easy) but I want to send the stop comand (with the stop on/off switch) 5 or 10 seconds later. But so far I havnt been able to.

I have:

If virtual switch is on,
then turn Shade (on) --> at this point it works
then wait 8 seconds
then turn Shade Stop (on) --> this doesnt happens


Any clues?

Thanks!

I find that using CoRE is equal to or better than Routines. I find modes to be cool but crippling to good and quick changes. I find Variables to be super powerful without cluttering up your device page.

Saying all of that, Basic Piston in Expert Mode coupled with the proper use of Variables, I can get pretty much all the flexibility I need in one Piston to do many things and not eat up resources.

What are you trying to do here with the percentage thing and modes? Give an example.

iOS dashboard reports different information than browser

I started changing my pistons with time restrictions written deep into the code and moving that to the top-most Piston-level control. When I view the dashboard on my iOS, the time restriction line reads:

Time restrictions NaN:NaN PM to sunrise

When I view this on in Chrome browser, I see the correct 11:30 PM to sunrise.

Bug? Undocumented feature? Which is correct?

CoRE Version
v0.3.169.20170104

If I understood your conditions correctly
 the piston should look like this


IF
VirtualSwitch changes to on
Using Shade On...
  > Turn on

Using Shade Stop...
  > Wait 8 seconds
  > Turn on

I like triggering routines manually for some things. I dont know of a good way to do that through core without needing to create a bunch of new devices. So I want to trigger pistons based on a routine firing. But the only variable you get with routines is executed and it’s just not working for things like reporting if windows are open while in a specific mode because st doesn’t seem to hold what routine you’re in. It just executes the routine. I’d use modes but sometimes I want different things to happen when I’m home. Like good morning and I’m back have some different actions. Should I just trigger these outside a routine with a piston?

If you need more info about specifics I can post it

How do i do the following:
Crieteria 1: Time period must be dark i.e. An hour after sunset but before 11:59 for example
Criteria 2: Door was unlocked during the time frame above
Criteria 3: If 1 and 2 are true then wait 15 min
Criteria 4: After 15 min if door is still unlocked and contact sensor is currently closed then re-lock door
Criteria 5: send push notification $whichever lock locked type txt message

Here is what i have so far:

Ideally I could use one piston for all the locks in my house vs split out individually like i have today so bonus points for helping me out in that regard.

Thanks in advance
Automation Hoarder

Completely basic question but I’ve been scouring and haven’t been able to find an answer. I’m brand new to CoRE so I’m sure it exists


How do you turn off selected lights after xx minutes of no motion?

Thanks for your help!

@fm0nster
This can be easily done using the included smartapp, “Smart Lighting”. Choose lights to control, then, “turn off”, then choose the trigger, “Power Allowance”, then minutes.

The term “Power Allowance” makes this a hard one to find.

If you still desire to use CoRE, use a “Basic” piston, pick your lights, and set the condition to “Stays on”, then you can choose the number of minutes. Your “Then” would be “Turn off”.

I hope that helps.

Can anybody tell me why this piston fires out of the timeframe? As you can see, the time is 6:19 on the screenshot, But the piston is still firing and the lights that are supposed to be off are still on.