CoRE - Get peer assistance here with setting up Pistons

What kind of piston is that (how do I make that) and any ideas on what is wrong with my piston?

Everything I know about setting up CoRE routines, pistons, loops, and variables has been picked up here on the boards. So, I’m thinking I’ve totally overcomplicated this piston to set up a simple Christmas color loop test with one of my Hue Blooms.

Here’s the piston, using a virtual switch as the trigger:


It worked the first and second times, cycling through the colors. But, turning the switch on and off threw out this exception:

I’m at a loss. Help!

Oh sorry… That’s a basic piston. Make sure you turn on expert mode in the settings.

I would remove the loop at the bottom, the Boolean, and the variable.

Then replace the loop at the bottom with ā€œfollow up with pistonā€ and choose this piston to follow up in itself after x number of seconds or minutes.

Should work just fine.

Ok, I must be missing something in my brain’s translation from RM to CoRE…

I have a very simple need - turn on the Christmas lights on my balcony (Z-Wave external outlet) if Time is after Sunset.

Simple Basic Piston… If-Then… however, I’m not sure when/how often this is evaluated, since it seems to refuse to fire after sunset time comes and goes. I searched the Wiki for an example on this, but didn’t find anything.

Thoughts anyone?

Thanks.

you can do this two ways… first…

is the switch on your local devices list? if yes, just use smart lighting… then it runs local.

if not…

use CoRE…

basic piston…

 IF
 Date & Time "happens at" sunset 
 THEN
  using "outside switch"
      > turn on
1 Like

The start and end of the times you specified would be the two times it would be evaluated. I cheat sometimes and add a device in the mix that I know would have some activity like a temperature sensor to force evaluation of the piston.

1 Like

So, I have been reading for the past few hours and have now published CoRE to my IDE through github integration.
I bought some OSRAM lightify bulbs yesterday and created virtual switches for red and green colors which can be activated using Alexa. I am looking to setup a scenario where a bulb stays on and alternates between red and green every 5 minutes once I tell Alexa to ā€˜turn on christmas’.
Could someone please walk me through how to setup this scenario using CoRE?
Thanks.

Hey Guys, I’m trying to sync circadian rhythms with turnable white Commercial Electric Zigbee Downlights…

Essentailly this is want I want to write with core… kind of simple, but I’m new.

If LightA becomes ONLINE
then If its Daytime, set value to BrightWhite (bluey white)
Else set value to SoftWhite (yellowy white)
End IF
end if

Its important that this doesn’t start with the ā€œwhen light turns ONā€ because from the application side this light is always on, in either a OFFLINE or ONLINE state (hooked up to a DUMB Swtich).

Thanks!

Hello, looking for assistance. Is there a way to have core intercept a signal sent to a light so it won’t turn on? I have several lights in the stairs that turn on with motion and there are 2 fixtures I want to not come on at certain times, any suggestions?

Check out the thread below @bubagump, just follow the examples with your color choice.

I’m not sure if that’s even possible. Why not create a piston that excludes those lights during certain times or create a virtual switch that you can turn on/off to exclude those lights.

How do you know Light A is online?

Still no go. I must’ve placed the ā€œfollow up with pistonā€ incorrectly. I tried putting it under ā€œusing locationā€ as well as under the lights as a task right after the last color change.

The lights cycle through the colors once but will not repeat. What am I missing?

Make this a basic piston. Delete the but if section.
And make the wait time for the follow up 20 seconds

@Lisa_262

I found my example… Set it up like this… sort of… g this I’ve sets three bulbs to three different colors and changes every few seconds…

You can try a BASIC piston:
IF motion changes to active THEN
task 1: turn on all lights (turn on action restrictions: from time to time)
task 2: turn on all lights except the 2 fixtures (turn on action restrictions: from time to time)

Thanks @eibyer… This is great!

In the IDE, there’s a field that sales, OFFLINE, ONLINE, ACTIVE, INACTIVE.

[cid:image001.png@01D24A38.EB9AA410]

When you build a piston in CoRE, where does this light fall under? Switches? Relay? I’ve never used one of this so please bear with all the questions :slight_smile: