[SHARE] CoRE - show & tell all about Pistons

Resume HVAC When Someone Arrives

Overview: Resumes the thermostat’s program when someone arrives home.

Implementation: Does not resume when: doors are open; someone is already home; outside temps are within the thermostat’s operating temp range. Uses the Ecobee3 thermostat and @StrykerSKS 's Ecobee (Connect) service manager. Uses the BloomSky Outdoor Weather Station and @slagle 's Bloomsky (Connect) app to provide the outdoor temperature.

Note(s): This piston has never failed!

1 Like

Run Mode Routines

Overview: Switches Modes depending on the time of day and presence. This piston pretty much does the same thing as the ST Market app, Routine Director.

Implementation: I only need/use three Modes: Day (essentially home-day, sunrise to sunset); Night (essentially home-night, sunset to sunrise); Away, when everyone is gone. Switching to any mode is done through presence (cell phones) throughout the day and night; the appropriate ST Routine is then executed. Uses ST Routines to change to your modes, to change states of your lights/locks, etc. To prevent the actions from repeatedly being executed by the coming and going of the present sensors, an Action Restrictions is used (“Only execute on condition state change”).

Feature(s): The definition of “day” and “night” is not restricted to sunrise and sunset, respectively — unlike Routine Director. You can use custom times in the piston’s conditions. You can easily add conditions/actions for more modes.

Note(s): Your ST Routines (for Mode changes) should NOT be automatically executed by ST — that’s what this piston is for :wink:


Thanks for posting this… I’m going to put this stuff on the wiki.


A very simplistic Piston integrating IFTTT maker. Also posting this for @atlwolfpack as example of retriggering while in Home mode…

Just an Or-If piston to monitor the battery levels of my devices.
Tested and it works OK for me.


PM me a write up on this and I’ll put it on the wiki.

Thanks for posting these examples!!

1 Like

This is very basic piston to send me a push notification when my A/C isn’t working properly.


This is a basic piston to turn on the hall light when either my wife or I get up in the middle of the night to use the toilet. After 8 minutes of no movement it then switches itself off.


I know some people have asked about turning on outside lights when it’s raining (including me) so I created a piston that will do just that and also created a separate piston that will turn on my lights at sunset and then turn them off at sunrise. I’m using IFTTT to trigger a virtual switch called “Rain” when it’s raining outside and then turn the switch off when it’s cloudy or clear.


Here is my first CoRE project, a logic based load controller for my two AC units. I have two of the GC-TBZ48 Z-Wave thermostats that are priced right and integrate well with ST but it was difficult to tell what mode it is in until I would manually refresh the tile. In order to have just one unit operating at a time I really did need to know when one or the other was running. The thermostats did reliably provide an event for each and every temperature degree change. CoRE allows me to infer the running state by subscribing to the temperature events and comparing them to the cooling set point. If the downstairs unit is above the set point it must be running and I turn off the upstairs unit. Using the Simple piston type I can use the ELSE clause to turn the unit back on when the temperature hits the set point and the downstairs unit stops cooling. I setup one piston for each unit.

I was almost ready to start writing a smart app on my own when I discovered CoRE. THANKS!!!

I’m sure I’ll refine the logic a bit to make sure one does not hog all of the operating time but for now it’s working great.

1 Like

Great stuff. I’m getting Aeon labs siren and will be modeling what I do after many of these examples. Can someone tell me what it means when the TCP (Task Cancellation Policy) is set to cancel on piston state change? Does it mean that whatever is being evaluated in the ‘THEN’ statement is canceled IF something changes in the ‘IF’ statement?

Ever thought of using the SmartWeather Tile as a source of raining status rather than using IFTTT?

Is this possible to use the SmartWeather Tile to get precipitation status? Back when I was using Rule Machine, I was told precipitation status wasn’t a standard device capability and thus wasn’t possible. Is there something different in how CoRE works to obtain this status? If so, could you provide some hints on how to get it?


I’ve heard of it, but I thought I had to purchase an extra device to get it working? Is this not the case?

I used the guide here, worked just fine:

1 Like

I got Weather Station set up, but how do I set up the rain status in CoRE?

EDIT: Nevermind. I used the Sensor switch and found the water option. This is very nice.

Ok, I think I misunderstood. It seems like you mean really raining, as opposed to forecast rain. My apologies.

This Piston sets my hue lights in the TV room to dim when play is pressed on KODI and bring the lights up to 50% when Pause is pressed in KODI. When show is stopped the lights come up to full. This also disables the motion detections during this time and reactivates when not watching KODI.


Hi pcgirl65,

Could you tell me how to fetch the status of KODI?