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.
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.
I’ve booked marked your answer so hopefully I’ll get it right next time,
(Jason "The Enabler" as deemed so by @Smart)
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.
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.
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.
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!!!
It’s difficult to read as I have reduced the font to include as much as I can.
Here is the first piston. (Simple Piston Mode)
time is between 30 minutes before sunset and 10:10 pm
Using Light - Porch
Fade level from 100% to 40%
Using Light - Porch
Second Piston (Basic Mode)
any of iphones presence changes to present
Light - Porch switch is on
set level to 80%
Wait 3 minutes
Set level to 40%
This is the 3rd Piston (mode Basic)
any phone presence changes to present
time is between 10:15pm and 30 minutes before sunrise
Fade level from 100% to 80% in 3 seconds
Wait 3 minutes
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.
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.
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.
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.