CoRE and Piston Rules Engine, first design steps

v0.0.050.20160527 - Alpha test version - Load Attribute from variable done and partially tested. Missing: color support - this is a complex data type…

2 Likes

Glad to know, and I sure have enough other things to try over the weekend. The piston I mentioned flat out won’t “auto cancel” turning off the light if the motion sensor stays active. A simple piston works fine. Is that feature only available with the simple? I can do the cancel on state change, but that still (obviously) doesn’t help when motion stays active anyway. So many options… :dizzy_face:

1 Like

Well the stays trigger isn’t doing its job. It’s supposed to work like this.

Switch stays on for at least 2 minutes

Switch turns on >>> set a time event for two minutes, return evaluation as false
Switch turns off during the wait time >>> cancel all pending events
But if the switch really stays on for the two minutes, the time trigger comes in, identify the source trigger (switch turns on). This time, evaluate true if the switch is still on. Bam!

So like you see, it’s a bit more complicated than a simple switch == ‘on’…

But it’s coming… :wink:

2 Likes

Is it possible to create tasks using both location and devices? Just wondering because when the location toggle is switched on the device options disappear.

EDIT: Nevermind figured it out.

1 Like

Is anyone else using a power meter in their system? I’m trying to nature down what’s going on with mine.

Use is basically this… Power meter raises above 1 watt, turn on stuff. Power meter drops before 1 watt, turn off stuff. I can’t get it to consistently detect the power changes and I’m getting generic have.class error in the logs.

1 Like

I’ve created one Piston with a power meter, have not extensively tested but it was working ok last night. It’s in the other CoRE thread. Uses it as a condition, not trigger. Will be trying a few triggers this weekend.

1 Like

Even though you figured it out, for all who have the same question, just add multiple actions.

Still getting errors? Even with .04f+?

1 Like

Hello all,

OK, curious to see if someone would like to take a shot at this use case

If between sunset and sunrise
If Any of 3 doors opens, turn on lights
Door closes, light stays on
If Any of the same 3 doors opens, again leave lights on
when the door closes, turn off lights

This one is affectionately known as the Doggie Door Light that @bamarayne so expertly created in RM

Thanks in advance
Rick

2 Likes

Yep…

1 Like

Uh oh! ! ! ! @ady624… The challenge… Make the binary system behave in a non binary way! Should be easy!

2 Likes

1 watt, is this for 120 Volts AC?
If so that’s a pretty small load, can it even read current that low?
Have you tried increasing your threshold (say 5 watts or something)?
I think the WeMo defaults to 5 watts as its threshold.

1 Like

This is an aeon dsc6106 switch. It can detect 0.1 watts.
I’m also using the iris smart outlet with zigbee and zwave repeater.

Both can detect the power draw above and below 1w.

1 Like

Yep same here - what I did though as I had the ZLL/Hue and the ZigBee RGBW device handler chosen by my bulbs - I set all to ZigBee RGBW and reset/re-attach them not removing them just re-attach them, ID changes but that was easy to deal with - no errors since …

1 Like

I am using the SmartPower outlet as a power meter but what I did, I changed the device handler to report less frequently - on a minute basis - and use a vSwitch that is being turned on/off when the condition changes - reduces fluctuation and reports less messages - so the piston monitors the other conditions and the virtual switch - works flawlessly for me now prior it was a matter of too many changes and on/off …


What you need to do though - after changing the power meter device handler reset and re-attach the meter - not removing it from ST so it takes all settings correctly …

1 Like

Is this in a normal run or only when simulating?!

I already gave @bamarayne the solution:

Latching piston

If door changes to open and (extra conditions) then
Turn light on

But if (same exact conditions as for If)
Wait 1 min
Turn light off

Why do you need the light to turn off at door close? You are walking in already… The piston above would turn the light off with a delay after you open the door to come in.

An alternative solution is

Simple piston
If door is open >>> when true set number variable openDoor = 1 - {openDoor}
and
time is between sunrise and sunset >>> when true set variable openDoor = 0 (this ensures we do not turn the light on at day)
and (
Door is open
and
variable door is 1
) >>> when true turn light on
And (
Door is closed
And
Variable doorOpen = 0
) >>> when true turn light off

They should both work :wink:

UPDATE: see below for a working example

v0.0.04f.20160527 (note: problem has been on all versions to date)
SmartThings: Platform v1
Device: Samsung Galaxy S4

I am just starting to get into this new rules engine and noticed a problem creating a CoRE piston.

Simple rule;

Creating Condition #1
if [Acceleration Sensor] is active…

Problem: When pressing done I receive a red caution popup "Please fill out all required fields"
The only way I can bypass this error is to turn on “Negate condition” and then press DONE

Once it saves then I must go back into Condition #1 and turn off the “Negate condition” option and press done again. Then I can continue with the rest of the rule.

1 Like

Known issue with Android, could just hit the back button without having to do negate

3 Likes

@bamarayne v0.0.051.20160528 - Alpha test version - More fixes for casting and variable condition description

Still getting the error? Is it a simulation? Can I see the piston so I can simulate?

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.