SmartThings Community

3 pistons running one device does it matter


(Eric) #1

I have 3 pistons running one device (porch light).(it works) Is it better to leave it this way or try and create one piston that does it all. Does it matter?

my 1st piston turns on the porch light between time, sets the level and turns off.
my 2nd piston reset the level (if light is on) when present occurs for xx minutes then reset back to original level.
my 3rd piston turns on the light after hour upon present for xx minutes then back off.

I tried to incorporate all three into one, but I’m just not there yet, couldn’t get light to turn off and wasn’t sure which piston mode to use.


#2

The core experts hang out in their peer assistance thread. If you ask your question there, someone will be glad to help you. :sunglasses:


(Eric) #3

Well, I contemplated on where to put this, I guess I missed the mark again, I’ll would delete it and repost there,but can’t find the delete for the original post.


#4

Projects is good anytime you have an individual question where there might be multiple answers and you’re trying to decide what combination of devices to use for your specific question.

Smartapp Ideas is where you put questions about how to accomplish specific rules using either the official features or when you’re just not sure if there is custom code that will do what you want.

Once you are using a specific custom app, you ask questions in that author thread.

Core is very powerful, but also very complicated, so they have set up their own peer assistance thread for help with pistons. :sunglasses:


(Chris) #5

If it works, I’d say leave it alone. Several of us have tried to make large single pistons that do lots of different things and have decided that smaller separate pistons are easier to build and manage. If you run into different pistons conflicting with each other’s actions, you can always change the Task Override Scope for the actions. By default, a piston can override/cancel it’s own actions, but you can set it so pistons can cancel each other’s actions.

One of the great (and sometimes overwhelming) things about CoRE, it’s so flexible that there are often several different ways to accomplish the same thing. It generally comes down to your personal preference rather than right way vs wrong way.


(Eric) #6

I’ve booked marked your answer so hopefully I’ll get it right next time,


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

This can be done in a single piston that would not be large at all. I recommend you play with CoRE and honestly figure out what works for you. Read through the forum threads and do a lot of searches to answer your questions. There is a huge amount of valuable information here… and yes, ask a lot of questions… we are happy to answer them.

Now, to your question…

It doesn’t hurt to have multiple pistons using one device, but it also doesn’t help. According to the author of CoRE having multiple pistons working on one device adds stress to the network. I’m not going to go into the specifics of it, but it isn’t recommended.

Also, check out the community Wiki for some valuable information and a bunch of examples of CoRE in use.

http://thingsthataresmart.wiki/index.php?title=Category:Unpublished_SmartApps


(Eric) #8

Thanks for the reply, still trying to get my head around smartthings and core, I thought it would be better as one, but had problems with it shutting off. I knew I could do it in 2 or 3 pistons. I’ll try it again to do it in 1.


(Eric) #9

If you are wondering how to combine these into a single piston, here is a piston that I have for my garage. Not the same use case, but you can easily see how to do this…

I prefer to put this in a single piston as if I didn’t instead of having 37 pistons, I’d likely have around 200. Hard to manage.


(Eric) #10

Well I’ve got one written and so far it’s not coming on when it’s not suppose to and going off when it’s suppose to. Have to wait till it comes on to check the rest of it in about an hour from now. Your code seems like it would work and a whole lot simpler that mine. I got to wait and see if mine works. I’ll probable pause it and try a variation of yours, thanks for the reply.


(Chris) #11

Can you give the exact scenario you’re trying to create? Or post screenshots of the 3 individual pistons?


(Bob) #12

I’m only posting this screenshot to give you an idea of how much you can include in one piston.
This is only half of it!!! :wink:
It’s difficult to read as I have reduced the font to include as much as I can.


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

post a picture of your piston from the dashboard view … then we can really help you out.


(Eric) #14

Here is the first piston. (Simple Piston Mode)
If
time is between 30 minutes before sunset and 10:10 pm
Then
Using Light - Porch
Turn on
Fade level from 100% to 40%
Else
Using Light - Porch
Turn Off

Second Piston (Basic Mode)
If
any of iphones presence changes to present
And
Light - Porch switch is on
Then
set level to 80%
Wait 3 minutes
Set level to 40%

This is the 3rd Piston (mode Basic)
If
any phone presence changes to present
and
time is between 10:15pm and 30 minutes before sunrise
Then
Turn on
Fade level from 100% to 80% in 3 seconds
Wait 3 minutes
Turn off.

In layman terms
I want the light to come on at xx time before sunset and go off at xx time, at a certain brightness level
however If I leave when I come back (presents)I would like the light to get brighter for xx minuets and then go back to the original level so I can see to put the key in the door and get inside.
If the light is already off because it’s past the time then I want it to come on for xx minutes at a certain level and then go back off after 3 minutes. Just not come back off if after sunrise.

I’ve been close to getting it all correct, but alway end up having one part not working.


(Chris) #15

Try this, replace Kitchen Overhead Lights (and the white-out switch on/off restrictions) with your outdoor lights. I haven’t tested but I think it will work.


(Eric) #16

Instead of using presence, I bought a motion sensor and got what I wanted done.
Thank-you all for looking at my problem
@JDRoberts, I promise I’ll try really hard next time to get it in the correct area.

Eric


#17

Glad you got it working!

Don’t worry about the subcategories, as long as you’re not creating duplicate threads it’s easy to get sorted out. It’s just that you’ll get the quickest answers if you post it in the right place. :sunglasses:

SmartThings is extremely flexible, but that also means that there are community members with all different kinds of backgrounds and interests. Some are very interested in coding, some are more interested in the devices.

Core is very popular for those with a strong technical background, but many people who are looking for simpler solutions don’t use it. And core discussions can be very confusing if they start popping up elsewhere since it has a lot of its own terminology. :stuck_out_tongue_winking_eye: