CoRE - Get peer assistance here with setting up Pistons

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

Another option is create a virtual motion sensor, same process as making a vs :slight_smile:

1 Like

I am new to ST and got have CoRE installed. I am trying to figure out how to setup a piston. Basically, I want Dimmer2 to come on at 5% when motion1 is triggered b/w 10pm and sunrise. Dimmer2 should turn off after there is no motion for 2 minues. I want this to run only when Dimmer1 is in off mode. Can someone please help?

Hi all,

Quick question on setup and performance. Do I create one piston to control the lighting for my entire house or is it better to create many different piston for each room?

I have motion sensors, buttons and Alexa all controlling my lights so wondering what the best configuration would be. One huge piston. One piston per room. One piston per input device. Or does it not matter too much?

Thanks.

You might need to turn on advanced mode but this is how I would do it.

Set conditions if motion1 is active

Now within the conditions you will have “when true” and “when false”

When true use dimmer2 and brightness to 5% (setting brightness turns on my dimmers so no need to also turn on)

In the same when true page you will have restrictions where you can set the timings you need and only when switches are off. Set the times you need and add dimmer1 to the “only when these switches are off”

When false add dimmer2 and set actions to wait 2 minutes and then turn off.

Thanks. Which piston mode do i need to use with this?

A basic should do it. In this instance just leave the “then” part blank

My Fibaro just died and many of my pistons use Lux value. Can I use the Lux value from Weather Underground or Accuweather in a piston? If so, how would I do that.

i just took a read through the default dimmer switch device handler and think i’ve spotted the issue -

def setLevel(value) {
log.debug "setLevel >> value: $value"
def valueaux = value as Integer
def level = Math.max(Math.min(valueaux, 99), 0)
if (level > 0) {
sendEvent(name: “switch”, value: “on”)
} else {
sendEvent(name: “switch”, value: “off”)
}
sendEvent(name: “level”, value: level, unit: “%”)
delayBetween ([zwave.basicV1.basicSet(value: level).format(), zwave.switchMultilevelV1.switchMultilevelGet().format()], 5000)

it looks like the “if (level > 0)” lines are where the switch on/off are coming from, so do you think i could just build a new DH based on that code and cut those out? if so, that would likely fix the problem.

my only concern is in modifying the DH, since any updates to the default stuff won’t get updated into my modified DH.

thanks for your thoughts here

If you have WeatherTile in your things list, you can substitute it in your current pistons. Just go back to the piston and select WeatherTile and deselect your Fibaro.

Perfect. Thank you!

1 Like

One more question. Does WeatherTime update automatically? Or will the piston receive an update when it run?

It updates based on your zip code I believe, so your piston should evaluate the lux change.

of course. Sorry wasn’t thinking.

I have a bunch of routines that at this point do nothing but set a mode that triggers a piston. It just occurred to me that it would be so much easier to do away with them and just use virtual switches.

1 Like

I have the following Core Piston defined. Occasionally the lock will LOCK when the door contact (front door) is OPEN. Is this Core Piston setup correctly so that ALL THREE conditions have to be TRUE for the lock to LOCK? Essentially, I would like Core to LOCK the door lock when the door contact is CLOSED and motion in the Entryway/Hallway is INACTIVE after 1 minute, If any STATE changes, start over again waiting for all THREE conditions to be TRUE. Thanks!