SmartThings Community

CoRE - Get peer assistance here with setting up Pistons

corelogic
core
pistonmaster
makemypiston

#8171

If you want to do this in webCoRE, it’s easier. This will cancel itself when mode changes away from Guest.

If $locationMode = Guest
  Send notification or SMS
  Wait 6 hours
  Execute piston name_of_this_piston
End if

(iamjezz) #8172

Anyone know if it’s possible to core and the core IFTTT function to use Google assistant to change modes ? Home , movie time ect


#8173

Can you help me pls to realice a logic in core.
i need a piston to turn a switch on every 4 days.
i have found:
“trigger happens at 4 am every 4 days” but this didnt work

thanks :slight_smile:


(RT) #8174

I am having an issue with a CoRE piston and wondering how to fix this. I have 3 motion sensors along a long hallway. I have a rule that says if any of the 3 sensors see motion then turn the lights on. That works just fine.

The issue is with another piston that says “if Any of the motion sensors stay inactive for 5 minutes” then turn off the hall lights. The issue is that if you are at one end of the hall and moving around the lights will still turn off on you, since the other motions have not see movement even tho the one motion sensor does see movement within past 5 minutes.

This creates an issue fairly often, where someone is in the hallway by motion 1, and motion 3 has not seen you for 5 minutes and turns the lights off on someone who is then in the dark.

So what is really needed I suppose is a rule like “If ALL of the motion sensors stay inactive for 5 minutes”. However I did not know how to do this with an “all”, only an “any”. Am I missing something obvious here? What do you guys recommend for a solution? Thanks!


(James) #8175

Thanks for the help! I’ve got it working most of the time, but periodically seeing the Spot Lights turning off and the under cabinet remaining on. Can’t quite figure out why, wondered if it was the TCP setting although still trying to understand its usage.


(Ron Talley) #8176

Instead of a Screen Shot, Use the image button to take a Screen Shot of the entire Piston, then hold the image and press save. This will add it to your pictures. This way we can see past just whats on your screen.

TCP-Cancel on Piston State Change is used in this case because you have a timer. Without the TC Policy, as soon as the motion is inactive, the Piston will Wait 60 seconds and then turn off the lights whether or not there is motion again. In other words, without the Cancel on Piston State Change, the timer has no way of restarting. With it on, as soon as motion starts again, the Wait period will cancel and restart once motion is Inactive again.

Weird, that one light will stay on…Take a SS as described above so I can see if there is something else going on that is causing a conflict.

You could also consider grouping the lights and only have 1 switch to deal with to control them all. This can be done via a Virtual Switch and a CoRE Piston. There is also a cool app called Trend Setter. It will group the lights and create the Virtual Switch for you! It will also turn the switch on/off even if only one light is on/off. I can control dim levels as well. Check it Out!


(Ron Talley) #8177

Try

If
All motion is inactive
Then
Wait 5 Minutes
Turn off
Cancel on Piston State Change

Since Stays is a trigger, you can’t use it for multiple motions as it will not work.


[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)
(Ron Talley) #8178

This should work. Post the piston so we can see where the error is.


(James) #8179

Thanks for the colour, I’ll definitely checkout Trend Setter.

Attached is a more useful screenshot, thanks for the tip! I’m a little confused how the two timers on the different conditions from the prior screenshot were active simultaneously…


( I hate Mondays) #8180

The $locationMode will not subscribe to location mode events, so the notification will be sent at random times after location mode changed (it runs every 6 hours, so whenever that 6 hours elapse, it checks). Use the virtual device Location Mode to get your loop synchronized with location mode. And use a while…

while
   Location Mode is Guest
do
   send notification
   wait 6 hours;
end while;

(Ron Talley) #8181

The only 2 potential issue here I see are:

  1. “Stays” is a trigger. Triggers have precedence over conditions. Shouldn’t matter much in your piston but lets get rid of the trigger in the 2nd Or.
  2. You don’t need the Turn On And Set Level…You just need to say Set Level to 100% which automatically turns the lights on.

If
Kitchen Motion Sensor IS Active
When True
Using Kitchen Spot 1 and Kitchen Spot 2
Wait 1 Minute
Set Level to 100%
Cancel on Piston State Change

The Wait timer will count all the way down…but once it gets to then end, it will evaluate whether or not the Piston State has Changed. If so then it cancels the action. If not then it executes the action. That’s why you saw 2 timers in the SS above.

Pssst…We are migrating over to webCoRE…


(RT) #8182

Thank you. I tried that, however it is not working properly because it is turning off the lights too quickly (not waiting 5 minutes). For instance I walked past all motions, then hung out (still) near motion 1 where the others couldn’t see me. Before the 5 minutes it turned off. I have no other rules that would have turned this off.

Perhaps I did not set it up right? Here is what I have:

Piston type: Basic

IF

  • Each of motion 1, motion 2, or motion 3 is inactive
    THEN
  • Using location…
    Wait 5 minutes
    TCP Ccancel on piston state change
  • Using Hallway Lights…
    Turn off

Did I set this up right? If so, why would it not be working right? Thanks!


(Jay) #8183

You have the wait and turn off in different actions.
Using xxx lights
Wait xxx
Turn off

TCP cancel on piston state change.


(RT) #8184

Ah, thank you! Its working now exactly like I wanted. Its a creative way to address the issue. I had read elsewhere where others had suggested using global variables and timers and some much more unnecessarily complicated compared to your elegant solution.

I’m just wondering though - is there any type of enhancement that could be made to CoRE (or to WebCoRE if CoRE is no longer getting enhancements?) that would make settings up rules like this easier and more intuitive for newbs? Seems like it would be easier if there was a way to write a straight-forward rule that just said “if all of motion 1, motion 2, motion 3 is inactive for 5 minutes then turn off lights”. Why can that not be done like that, and is there an enhancement to CoRE that would enable that? Thanks!


(Pablo Gux) #8185

Hi everybody, after reading hundreds to topics, it is not clear to me how can I run a CoRE piston from a Google Home voice command. I have tried to use some apps that are supposed to facilitate this process, but no luck.
Basic steps will be appreciated. Thanks a lot!


(Todd) #8186

QUESTION: Is it possible to create a Piston from the PC instead of having to use the Smarthings App and CoRE app?

Thanks,
TODDL


(Bob) #8187

In a word. No.
But you can with webCoRE.


(Todd) #8188

Is CoRE and WebCoRE compatible at the same time - or is it better to use one or the other?

thanks,


(Bob) #8189

They are two completely independent animals.
You can have a mixture of the both if you wish.
What most people are doing is gradually migrating their pistons over from CoRE to webCoRE.
WebCoRE is still in beta but is pretty stable.
I have found that webCoRE is easier to use as you can replicate existing pistons and just change the devices.
You can also import pistons from other people, backup your pistons and also recover them should you delete them by mistake.
Have a look and I’m sure you will start to convert.


(Pablo Gux) #8190

Ok, I found what I was asking in ady624 post from Jul '16 in this thread. It seems that I was not using the right search term :slight_smile: