CoRE - Get peer assistance here with setting up Pistons

You have it listed as any of those motions sensors is inactive. Split them up with “AND” between them.

I use the ecobee app for scheduling and I use ST for mode changes outside of the schedule.

1 Like

Stays is a trigger. Wont having multiple triggers separated by an And = an always false state?

Ignore my last, I understand what you’re getting at here. I can’t figure out how to get the elseif though.

Is what you are describing all done using CoRE? I’m trying to follow what you are suggesting. I see a ‘Then’ option under Location: Control location mode, Smart Home Monitor… If I select that and add a task I see ‘Make a web request’. But then that requires a URL. I can’t go the route of setting up an http server so hope that’s not what you are saying. What ‘dashboard’ are you referring to? CoRE’s? Sorry but I’m very nooby. :confused:
I can create simple SmartApps but that’s about it. I’ve got CoRE all installed and running but not seeing how to do this dashboard trigger in another location.

Thanks for your patience…

I ended up doing a refresh of my weather tile based on motion sensor triggers using Rule Machine, but look at the last two posts of this thread: [RELEASE] Smart Weather Station Tile Updater - Fix Broken Modes

Looks like a version there with refresh coded in…

Create a variable maybe "dryercount"
Every time your trigger occurs increment that variable by 1. Set variable dryer count =dryercount+1
Later send yourself the count in your message blah blah blah happened {dryercount} times.
Set your variable to 0 when your done sending message to start over.

I have a piston using something like this I can send if you need to see it.

Yeah, I probably need to see it. I am very new to variables.

I am also having an issue with this piston executing. I know that I can just use If Power “drops” below 10 watts. But I don’t want it to send a notification unless the dryer was on for at least 30 minutes and the dryer is stopped for 2 minute. This will allow it not to trigger if we go in and see that the clothes are not all the way dry or something needs to be thrown in the dryer for just a minute or two since it also steams.

So I have:
Was Greater Than 10 Watts for At Least 10 minutes
Stays Less Than 10 Watts for 1 minutes

1 Minute is just used for For testing purposes.

However, when the “Was” becomes true and then the stays starts its countdown, the piston resets on Pending…

Thoughts on how to overcome this?

Also, I would like for the "Counter to Reset after midnight daily.


Yeah, it’s a little unintuitive. You need to click back into the THENIF:

And then scroll a little down and select:

Once you get that group you can change it from AND to ELSEIF (or other logical comparators for that matter) in the Main THENIF Group. You should get something that looks like this (but with ELSEIF vs OR)

Then just add as many ELSEIF’s as you need.

@ady624, I did enable expert mode, but my Smart Weather tile is not selectable using the refreshable or pollable devices in CoRE. I’m using the SmartWeather Station Tile from the web IDE.

@underlircs , this is the code I just edited up to refresh the Weather Station. It does this triggered on motion detection events and is therefore much more reliable than relying on ST scheduling. You can install the app to yourself in the IDE, then open it up to select a motion sensor to trigger from. Motion or temperature change events from the selected motion sensor will refresh the Weather Station. It works for me as of tonight. Mike’s AutoDimmer app, combined with LUX input from a nearby Weather Underground allows me to control all of my lights based on outside light levels. I also measured power use of Zigbee bulbs when dimmed, and the power savings matches to dimming percentage in a fairly linear manner. This has helped us knock 38% from our home power consumption in combination with all the ST automations.

To summarize, Mike’s AutoDimmer app controls all my dimming based on LUX values from the Smart Weather Tile. This tile is configured to use a local Weather Underground station (about 2 kms away) for reference, and tracks very nicely to outdoor light levels. The app below just updates the Smart Weather Tile. Not sure why, but I can’t reference the Smart Weather tile in CoRE.

* Manual Weather Refresh
* Copyright 2015 Daniel Vorster
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
* for the specific language governing permissions and limitations under the License.
name: "Weather Updater",
namespace: "dpvorster",
author: "Daniel Vorster",
description: "Refreshes weather tile",
category: "Convenience",
iconUrl: "",
iconX2Url: "",
iconX3Url: ""

section {
input "devices", "capability.temperatureMeasurement", title: "When these devices sends events", multiple: true, required: true
input "weather", "capability.relativeHumidityMeasurement", title: "Update this weather device:", multiple: true, required: true

def installed() {
log.debug "Installed with settings: ${settings}"

def updated() {
log.debug "Updated with settings: ${settings}"

def initialize() {
subscribe(devices, "temperature", appHandler)
subscribe(devices, "motion", appHandler)

def appHandler(evt) {

Hi all, I am trying to control my dog door with smart things while simultaneously knowing the state the dog door is in, the steps I have taken are as follows

the dog door has a single button that allows me to press each time i want to change the state of the door, from automatic (based on dogs proximity collars), to locked, or to open.

I hard wired a Linear FS20Z-1 into the dog door and have successfully toggled the dog door between each state, auto, locked, open.

I have created a virtual momentary button to connect to the relay

I now need a way that a core piston can change the color of the virtual tile that Ive created to keep up with the state of the dog door… relay switched color green state open, relay switched color red state closed, relay switched color blue door state auto

any and all help appreciated thanks in advance

FYI all the great color ideas are from JDRoberts who suggested I come here for advice on incorporating pistons into the design

Hello everyone :slight_smile:
Without using IFTT, how can I get CoRE to see if its raining and turn lights to certain colors?


I have done this, two pistons:

The first “Using thermostat” is conditional on a virtual switch “Warm up” being on.
The second is for when it is off.

There are only the two of us, so this turns off the heat if we are both away or sleeping (lights off and bedroom door shut.)

The other piston for controlling heat is here:

First “Using Thermostat” if when the switch is on
Second is switch off and @dayheat is true
Third is if switch off and @dayheat is false

The “Warm Up” switch is for Alexa to “Turn warm up on”

1 Like

Ok, I tried that, but doesn’t work.

This (test) piston doesn’t work (doesn’t send notification/turn light on)

But the below piston does work …BUT it goes back to my original issue of the piston actions 1 minute after the first inactive sensor. I want the piston to action after the last inactive sensor.

I think I need to be approaching this in a different way but at the moment I’m stuck (because I have really limited CoRe knowledge)

I think I could probably use a virtual switch who’s state is controlled by both motion sensors, and then use that virtual switch state to run my piston…but I was assuming there was a direct way to achieve what I’m trying to do via a single piston

(To recap, I want a piston to action 1 minute after the last of 2 motion sensors become inactive)

As @rontalley pointed out above I made a mistake suggesting splitting them up. Having multiple triggers “AND” will produce a false every time.
Instead of the "AND"s try using “THEN IF” between them.

I will try and think on this some more today.

Edit: thinking about it the "THEN IF"s probably won’t give the time you are looking for. I think it might be 2 minutes then if 2 minutes then if 2 minutes totaling up to 6 minutes. But still worth a shot.

I use was for this.

If all “was” inactive for at least 1 minute.

Where do I setup time based actions in CoRE? I want to say if there is motion turn on switch for 6 minutes then if there isn’t motion turn off switch. I did this in smart lighting with 2 different automations but I wanted a more complex conditions such as or if gargage sensor is open and it is between sunset and sunrise turn on switch for 6 minutes then turn off switch.

You could try something similar to this.
This is done in expert mode which allows the when true and when false options.
Also use the restrictions which can be time, day etc.
Also in the false, activate the cancel pn piston state change. That way if there is motion in the time countdown the timer restarts when motion starts again.

1 Like


That’s helpful but how would I tell CoRE to leave the switch on for 6 minutes?

The wait argument is just to wait not hold a state and countdown I thought.

As soon as the piston becomes false the timer starts.
In your case 6 minutes.
When the 6 minutes matures it will then execute the turn off.

1 Like