CoRE - Get peer assistance here with setting up Pistons

corelogic
core
pistonmaster
makemypiston

(Jason "The Enabler" as deemed so by @Smart) #1

Welcome to the CoRE Logic Thread. Here you will find many community members that are more than willing to help you with the Logic and Programming of your Pistons.

**There will be another thread for “How are you using CoRE?” and “How are you using the CoRE/AskAlexa integration?”.

So, this is the place to ask your questions and the place to get the answers.


CoRE and Piston Rules Engine, first design steps
CoRE and Piston Rules Engine, first design steps
Sonos Welcome Home Message
CoRE for Dummies (How to get started and make your first Piston)
[SHARE] CoRE - show & tell all about Pistons
[RELEASE CANDIDATE] CoRE (Community's own Rule Engine)
CoRE for Dummies (How to get started and make your first Piston)
CoRE - Help with piston - Set dimmer to 100% if the switch is already on
How to add DIM WITH ME to MySmart Apps in IDE
CoRE and Piston Rules Engine, first design steps
Room control and Osram White Tuning?
Google Home
How to control TV volume with Alexa, Harmony Hub & Smartthings
[RELEASE] Aeon Labs Multifunction Siren
Writing CoRE Logic
Using Motion Detector to keep lights on?
Remind me if I forget something at home?
Smart Lighting unless light is on?
Harmony Ultimate Home and Z-Wave Duplex Outlet?
Motion Lighting
Question about routine triggers
Turn on a switch but under specific conditions?
Post your working CoRE Pistons here
Capability for Ring/Bells
New user struggling with automating switch with presense
Help Needed with leaving/returning from work automations
Smart Lights turn on only if off feature?
Turn on zwave switch, delay 5 seconds change hue color to xxx and dim to 20%?
[RELEASE] Smart Weather Station Tile Updater - Fix Broken Modes
Using an open/close sensor to send notice if open at time X
Is there a SmartApp to open/close Add-A-Motor curtains?
Is there a SmartApp to open/close Add-A-Motor curtains?
Is there a SmartApp to open/close Add-A-Motor curtains?
Skybell integration
Smart Home Monitor - Feature Requests
CoRE for Dummies (How to get started and make your first Piston)
[RELEASE CANDIDATE] CoRE (Community's own Rule Engine)
Returning home after sunset, would like SHM to trigger I'M BACK, then trigger EVENING when walk through door
Skybell not turning on lights in SmartThings (want a timer)
Toggle increase button?
Rotating states virtual switch
Req: notify if light left on for more than x seconds
Turn on lights if door opened and *all* lights are off?
Turn on lights if door opened and *all* lights are off?
Options on Hue Lighting Integration - Scenes etc
Lighting Automation with Stages
Alexa ST Combined Routine [Newbie]
Iris Motion Sensor (2nd gen, 3326-L)
Help Needed: Logic for A or B or C
Z Wave Blinds controlled depending on weather?
N00bs guide to ST & GD00Z (Garage Door Controller)
Smart app to control group of lights with motion sensor and not turn on those that were off originally?
Raise or lower relative temperature on multiple thermostats at once?
Automation Dim Below 10%?
Connect door sensor to socket?
Fibaro Smoke Sensor Actions
Push buttons to select light scene for Lifx bulbs?
Door Open Alert - does this exist?
CoRE http local request help
2 doors open (not 1) triggers immediate Echo/Google voice warning?
How to Use HVAC Thermostat FAN MODE as Trigger in Automations?
Simple Notify - Water Valve
Using Tempeature Differential to Activate a Switch When Above a Certain Temperature?
Play Sonos on arrival IF TV not on AND time between x and y?
Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support
Need help with a Motion Senson SmartApp
How to curl in Smart Things
Control GE Z-wave fan with a single push button?
SmartApp bounty? Can/will you write code for others?
Time scheduled events missing in Core
Lighting Control Limitations
CoRE Assistance
SmartThings Freakout last night
WeMo Switches & SmartThings
Hot Water Tank control? Jasco vs Intermatic vs?
Calling all community members: New SmartApp Ideas
SHM - Scount Alarm - Cleaning Lady?
FAQ: Creating a virtual Device
Requirement - Help needed (1 second button)
SimpliSafe Alarm Integration (cloud to cloud)
Triggering Smartthings From An External Program
Sonos Party Switch
Ecobee3 help
How to make SmartThings do what I need it to? Is it even possible?
Help needed creating piston with light switch override
[DEPRECATED][Alpha] Hampton Bay/Home Decorators Zigbee Ceiling Fan Controller
New Ecobee lite Thermostat - much cheaper-
Presence fails all the time--is there a CoRE solution?
Need help with motion sensor light setup (resolved)
Invisible Fence Doorman Pet Door controlled with Relay Switch--tracking its state?
How do I schedule two sets of lights independently?
FAQ: Philips Hue and Other Smart Bulbs - What sort of light switches to use with them? (Long FAQ)
<Deleted - wrong thread>
Aspire Cooper RF9500 Device Type (basic DTH in post 6)
FAQ: What is WebCoRE? (And what was CoRE?)
New to SmartThings, need some help
Date criteria
Tips for alarming that Fridge door is open
#@@##$%#$#% Help me not have this happen again (monitor wine cooler?)
Getting started with Core (for Dummies)
Alexa flash light when timer hits zero?
Auto Close Garage Door After 15 min open?
SmartThings SkyBell HD Integration Released
Over riding Motion Sensors?
Ways to control HVAC? (Mode, presence, motion etc)
Can Samsung Multipurpose sensor detect knock ONLY when closed?
Contact Sensor Status Alert Triggered By Another Device?
Help with CoRE not triggering correctly
Color Fix? (Osram)
[OBSOLETE] [BETA MILESTONE 1] CoRE (Community's own Rules Engine)
Alarm On Specific (Current) State, Rather Than Change Of State
Mobile Presence and iBeacon (discussion beginning 2015)
[RELEASE CANDIDATE] CoRE (Community's own Rule Engine)
PetSafe dog door closed IF garage door is open?
Door Code Usage Log
Using core to simulate motion?
Newbie - Need Guidance - thermostat control and other questions
Changing mode manually by virtual device
Fortrezz Siren?
CoRE and Piston Rules Engine, first design steps
Control color on 2x Lightify bulbs at the same time using SmartThings?
CORE: how to set a delay before or inbetween actions?
Routine Hours Filter
Off - power allowance , less than 1minute
Dim Hue Bulb when turned on at night
Multiple voice notifications on 1 trigger issue?
3 pistons running one device does it matter
CoRE and Piston Rules Engine, first design steps
Help Configuring CoRE
Fibaro dimmer 2 with toggle light switch
Brighten light with motion then dim after motion stops
IFTTT trigger to execute a CORE piston with maker channel?
CoRE Piston state duration help
HomeSeer HS-WD100+ and more (Simple DTH in post 27, advanced feature DTH in post 32)
HomeSeer HS-WD100+ and more (Simple DTH in post 27, advanced feature DTH in post 32)
CoRE for Dummies (How to get started and make your first Piston)
CoRE - Party mode pistons
Trying to set up some simple heating and lighting scenarios
Rule Machine - Get peer assistance here with setting up rules
[BETA] Hue (Re)Connect - with scene handling
Garage door opener - delayed automatic close?
Notify when door contact is opened only during time window
CoRE and Piston Rules Engine, first design steps
CoRE - this is where you find it
[OBSOLETE: [BETA MILESTONE 2] CoRE (Community's own Rules Engine)
State Changes twice or X times?
Take a shower?
Power outlet off at zero power?
(Bobby) #2

Jason, I know you were trying to use the power meter but ran into issues, were you able to set up a piston like:

IF power greater than X
THEN do something

without firing every time the power changes above X


(Fast, Good, Cheap...pick two.) #3

I haven’t got the hang of the capture / restore state.

What I want is if lamp is off than turn on when closet door is open and off when closed (got that part easily).

What I cannot get working is using capture / restore state if the lamp is already on as the level would need to ramp from 20% to 100% and back to 20%

I tried this but no workie:


(Gil) #4

Hi,
First, thank you for everything you doing for this community!

I’m trying to see I can count the number of toggles form a specific switch with in a specific time.
something like -

IF
Switch is toggle
and then 
Switch is toggled again within 2 sec
and then 
Switch is toggled again within 2 sec

THEN
do something

I know I need to use the variables in some way, but I can’t understand how…
I did try to set a $second variable, but I don’t now how to use it…

Can you please give me some directions on where to start?

Gil :slight_smile:


(Jason "The Enabler" as deemed so by @Smart) #5

I found that the power meter like to fluctuate on the reading, so when I was using the conditions “is greater than” or “is within range” the piston would evaluate every time the power reading changed.

I had to go with triggers to get it to behave.

Changes to, raises above, enters range - these triggers worked well, I just had to excitement and find the best one for my use case.

I actually used “raises above” to initiate the piston and then “enters range” turn it off.


(Jason "The Enabler" as deemed so by @Smart) #6

I’ve been working on this as well, but I think there is still a bug.

I’m using a latching piston that captures the state of my bulbs when a switch turns on. It then restores them when the switch is turned off.

It does everything as programmed, but it does not restore the lights back. It is setting the levels properly, just not the colors.

Try this piston as it may work well for you.

@ady624


(Jason "The Enabler" as deemed so by @Smart) #7

Hi Gil! !

Take a look at this piston and see if you can modify it to work for you.

This piston counts the number of times the dog food container has been opened, sends a message when it reaches 3 times it more, and resets the counter at midnight.

****note - not positive the counter reset is working. I have this one as an example I helped someone else with and I don’t actually use it.


(Gil) #8

Thank you, I will try to see what I manage to achieve and report back.

Gil :slight_smile:


( I hate Mondays) #9

Jason, a lot of the attributes you selected override each other. colorTemperature for example affects hue and saturation. Try using only hue, saturation and level. Those three fully describe the color. Or try color alone, though I noticed that uses RGB.


(Jason "The Enabler" as deemed so by @Smart) #10

I’ll try that and let you know. Fyi - This is using Phillips hue color bulbs


#11

I took a stab at what you want to do, see if this makes sense. You will have to edit it since it counts 2 for each toggle I tested :slight_smile:

Edit: Looking at it now, it seems I should have put the Tasks outside of the group.


(Gil) #12

Thank you, I will try this one as well…

Gil :slight_smile:


#13

I fixed my double count


(Jason "The Enabler" as deemed so by @Smart) #14

@ady624

I can’t find a combination of the attributes that makes this work…

Not sure what’s up.

I do know when Bruce was setting this up in RM it would act differently with different brands of lights… I’m not sure what he had to do to get it to work.

Maybe there should be a dedicated capture and restore just for bulbs?


(Michael Hess) #15

I just posted about this in the original thread, I thought it was similar to what you saw but for some reason didn’t connect the dots. Seems to me this shouldn’t be an issue with historical conditions vs current conditions. Like CoRE is evaluating the conditions as “did it change” followed by “is it in bounds” instead of the historical “did this go over/under in time specified.” Will try my other rule with trigger instead, thank you!


(Hobbyboy) #16

This was for me :slight_smile: I added it but couldn’t get it to work. My biggest problem in troubleshooting - how do I check the value of the variable? I can’t find anywhere to read the value, thus can’t tell why it’s not firing the audio. I can tell in notifications that upon the container changing to open, the piston fires, but that is all.

Thanks


( I hate Mondays) #17

The dashboard lists all variables for the piston. Also the Local Variables page in the piston


(Gil) #18

Secsess!!
Based on the exemples of @bamarayne and @eibyer, I have managed to create something that works for me…
So far it works great!

Do I have any major mistakes in there?
Can I make it more simple?

Thanks!
Gil :slight_smile:


(might be my fake name?) #19

Does anyone know why this extremely simple piston makes the light come on instantly at

100% instead of fading over 50 seconds like I programmed it to?


(Jon) #20

How is it switched off… By setting level to 0% or by switch turning off