CoRE - Get peer assistance here with setting up Pistons

You need webCoRE for that and you can import this piston:

Then change the devices variable to contain the list of lights you want to turn off when they hit a level < 5%
There is a variable for the threshold as well, just in case you need that changed.

1 Like

It shows up. I have been using them for months. I have lots of different pistons working with them. I just want to know if there is a way to tell if one of these bulbs (or any device for that matter), has gone ā€œofflineā€. The example I mentioned was if I were to kill the power with a regular ā€œdumbā€ single pole switch. Now the bulb is un-powered and not communicating with the Smartthings hub. Is there a way to use this to trigger a piston/event? And if there is, how often is the bulb polled? Can I change how often it is polled? Maybe…methinks… once I figure out how to do it I will find that the device is only polled every 20 minutes or so… and this would not be useful as a trigger for something that I want to happen right away. So, if I can change the polling frequency to every couple of seconds, that would be better.

Thanks for fast reply. I am still on regular Core; guess it’s time to dip a toe into WebCore.

1 Like

Not sure sorry.

1 Like

I have been using webCoRE for about a week. I LOVE it! It’s my personal opinion that ady624 should win a Nobel prize for his work on CoRE and webCoRE. Using webCoRE I replaced about 45 CoRE pistons with about 9 webCoRE pistons… and in about 1/10th the time.

2 Likes

I agree it is incredible! So simple and easy to use. SOOOOO much easier than CoRE. Thanks @ady624!

I enhanced it to send a push notification including the name of the device that was turned off. Took me 1 minute to figure out how. So simple! Thank you!

1 Like

Hello, first time poster here. Been using SmartThings for maybe 2 years now, and now that I’ve collected a bunch of devices I’ve really been getting into it. I started using CoRE just about a month ago (haven’t looked at webCoRE yet).

I’ve set up a piston that will control my fan speed based on motion and the temperature. I’m storing the temperature from a multisensor in a variable (or at least I think I am) and it’s actually being set to the status of the motion sensor. It all looks correct from me so maybe a second (or third or fourth) set of eyes can help me on this one.

The logic is supposed to be:

if motion is detected and temp >= 70 then
if temp <= 75 set fan speed to low
else if temp <= 80 set fan speed to medium
else if temp > 80 set fan speed to high
else set fan speed to low ## added this to use low as the default if the temp variable is not a number

What’s happening is that the variable I set is being set to ā€œinactiveā€ instead of a temperature value. Piston below:

I know this is not going to help with your piston, but I would leap straight into webCoRE.
I wouldn’t mind betting that what you want has already been done by somebody and unlike CoRE, you can import other peoples pistons and modify to suit your needs.
Also it is more powerful than CoRE and you can use your laptop to copy and paste statements etc.

Can anyone verify if the second IF statement in the below pistion is setup correctly please? I debated whether to use a While Loop or just the If. Basically once motion stops and the other two conditions are true, I want the 30 minute wait to start, but if motion occurs it should stop waiting and then should restart the 30 minute timer when motion again stops and the other two conditions are true. Im worried that the way I have set it up may cause repeated instances of the 30 minute wait to be scheduled. I do Cancel Task on Condition State Change set. Thanks.

Firstly this is the CoRE thread not the webCoRE thread just for future reference. :wink:

On this part…

Click on your ā€˜with’ and in the settings set TCP to never. You will see a red ā€˜N’ next to the statement when you have set it this way.
Then the timer will stop if there is motion and restart when it stops again.

Cheers! Where is the webcore thread please?

Did it work OK?

I can’t test it out until tonight, but I did get the red ā€˜N’ to show up, yes thanks - see below. I have to say that this seems counter-intuitive though; if the 30 minute wait is not cancelled when the motion changes to active, and another 30 minute wait is scheduled when motion stops again, won’t I then get multiple 30 minute waits scheduled?

I know what you mean about not quite sounding right. You can read Never cancel task to mean whatever happens the task will mature, but that’s not how it works.
Just for testing, change the timer to, say, 2 minutes. Then when your piston runs the first time you will see a trace button at the bottom.

When you enable that you will see the timer on the left hand side of the piston.
When motion stops you should see the timer start counting down.
When the timer matures the light should turn off.
If you get active motion before the timer matures, you should see it disappear and the when motion stops, it will start again from 2 minutes.

OK will give it a try tonight. Thank your for all your help, much appreciated.

I have a door that has a habit of not latching shut properly, which has resulted in it swinging open a few times. I need to get the door adjusted, but in the meantime I wanted to create a seemingly pretty simple piston to help alert me.

If the door closes, and then opens within 2 seconds, generate an alert.

Being new to Core I’m struggling slightly. Can anyone point me in the right direction?

Hey Guys,

I’m using yvesracine Automatic Manager and Device Type. The device type keeps track of the vehicles fuel level using fuelLevelPercent. What i’m trying to do is use CoRE to setup a automation to notify me whenever that level is below 25%. How would I add fuelLevelPercent as a variable that CoRE will keep tabs on?

Didn’t get a chance to test this last night unfortunately. I do have a follow up question if you don’t mind. How would I integrate a cancellation of the 30 minute timer as opposed to a restart? What I am trying to achieve is if the lights are turned off manually while the 30 minute timer is counting down, then the 30 minute timer should be cancelled.

You could just let the timer run down.
If it’s already off then it will just mature and do nothing.
EDIT: You could add a 4th statement in your if.
If light ā€˜x’ is on.
This way if the light is turned off manually the statement will become false and stop. (I think).