webCORE or Smartapps ? which to use for lighting

a general question as i build up my devices and automation
before i drive the wife completely mad whic is better for automation ?
move all to webcore or have some in smartapps amrt lighting ?

If I’m not mistaken, the smart lighting app takes advantage of local processing for supported devices.

So for my very simple lighting requirements, simple motion or lux on and off, I stick with that standard smartapp. For anything else, I use wc.

4 Likes

For easier maintenance I’ve found using WebCoRE for as much as possible to be best. I then don’t have to try and remember which app I use for which reason. I’ve got a number of simple lighting pistons, such as turn on/off at specific times, including sunrise/sunset, that work very well.

thank you both.
now to figure out the commands to turn the kids lights off when they leave the house

I haven’t found any significant delay in using webCoRE vs SmartLighting. What I have found is that webCoRE has been very reliable while SmartLighting sometimes misfires…

In webCoRE I tend to keep the naming as simple as possible: Dining Room Light (webCoRE)
This way, when I go to recent events in the ST Device Page,I can easily identify what did what.

Remember most of this stuff is If This Than That (IFTTT)

If presence Sensor changes to not present
Then using (device you specify)
Do (something you specify)

SmartLighting kinda walks you through it. WebCoRE you have to have an idea of what you are trying to do.

The beauty of webCoRE is that you can import Pistons (the script that makes things happen) that other users have already created.

Triggers are "actions"
Conditions are “a certain state”

For Example:
If time happens at…
This is a trigger because the time has to happen

If time is between…
This is a condition as there is no specific time that has to happen in order for the condition to be met.

Another example:
If presences sensor changes to away…
Trigger!

If presence sensor is away
Condition!

You can have a combination of triggers and conditions but you can not have an argument that is trying to satisfy 2 or more triggers in one If argument as it will always be false.

In webCoRE, you can have as many If arguments as you like. Just remember one trigger per If.

1 Like

I have individual WebCore pistons that control 25+ lights at the same time. I can’t imagine trying to configure and manage that with a Smart Lighting app. Even my very simple automations are now in WebCore because the ability to sort routines into categories and include comments and descriptions in each routine makes things much easier to understand and manage.

1 Like

have you ever shared any i could look at and adapt ?

There’s a section on the WebCoRE community forum that’s dedicated to examples that users have created. See the Example Pistons category. There’s a code at the top of each example that you can use to import it by using the Restore a Piston Using a Backup Code option. Once you import it, you have your own version of it and you can then make whatever changes you want. There’s also a category where you can post a piston that you’re working on and get help with it.

seen those, have been working through them. just wondered what peoples preference was. seems webCORE

1 Like

My preference is simplicity. By me being an early adapter of webCoRE, its stupid simple to me…Others might see it as this big scary nerd supercharged programming language. Actually, its the rule engine that should have been included in ST. It’s pretty straightforward once you understand the terminology and concept. For the basic user, it’s just a matter of If and Then. Really that’s it.

SmartThing has to have a way of knowing that the kids left the house.

  1. Do they have smartphones?
  2. Do they have any other kind of presence sensor?
  3. Do they all leave at a certain time?
  4. Do you have contacts on the doors they leave out of?
  5. Do you have a motion sensor?

There has to be something that webCoRE can evaluate to determine if they are gone or not. Let’s assume they have smartphones.

If all of presence sensor are not present
And
Light is on
Then using light
Turn off

Yep that’s it.

I am also a big fan of motion sensors. I have 1 or 2 in EVERY room.

If motion changes to inactive
Then using light
Wait 2 minutes
Turn Off

It would literally take about 1 minute to write that rule in webCoRE.

Now, let’s assume that they don’t have smartphones but they all leave during a certain period and you have a contact sensor on the door that they leave out of and there is not a motion sensor…

If time is between 8am and 8:30pm (condition)
And
Contact Sensor was closed for at least 10 minutes (condition)
Then using light
Turn Off

See that one is a little more untrustworthy because there are assumptions being made. You rules are only as good the amount of devices you have.

I use the one below to see if my son has left for school on time. He does not have a smartphone or presence sensor but it works pretty darn great. The import code is what you use to use this a template for your Piston if you so chose to.

Notice the above Piston has 3 If arguments. All 3 arguments have 1 trigger and 2 conditions to satisfy. Remember, you can only safely have 1 trigger per If argument.

The 1st Argument, the trigger is the contact changing to open
The 2nd Argument, the trigger is the time happens at
The 3rd Argument, the trigger is the contact changing to open

In any of the3 If arguments, if all 3 statements become true, the Then is executed. Each one of these have a time window for the Then to happen.

Hope this helps you. Good Luck!

i’ll have a look, they have smartphones which sms me when they are home. so i thought can’t be that hard to adapt. will play now

Here is a simple time-based lighting piston I’ve built.

I totally agree with this. Early on, I had trouble figuring out why a light was turning off. It was some other SmartApp that I had forgotten about. Never again.

ill move this to the correct forum apologies