SmartThings Community

CoRE for Dummies (How to get started and make your first Piston)

core
echo

(Steve) #6

What exactly do you mean by “overhead”? If it’s tied to the second question, I’d really have to say that rolling your own app can be easy or can be significantly difficult. It will depend on variables like how much coding experience you have. Groovy is fairly easy to learn if you have had really any type of coding experience. I personally have (VERY BASIC) knowledge of C++ and Obj C and can follow things I’ve seen others do. It will of course also depend on how sophisticated your program needs to be.

I’d certainly first look into CoRE as it is pretty full of rule options, and probably as close to “everything but the kitchen sink” as anything out there presently.

And of course with most open source projects with the ST community, you can adjust and tinker with the code to suit your personal needs. Hopefully finding something new and cool in your own fork that can be rolled back into the core (no pun intended) code.


(Glenn Brockett) #7

I now have a couple of pistons running, I like CoRE. As a simple logic engine it works well. And is fairly easy to build with.
Overhead is the amount of resources it occupies that are there regardless of your pistons. Overhead is why I don’t run Windows.

The lack of documentation on CoRE is the only downfall as far as I can tell. It’s kind of difficult to find examples.


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

Have you done a search and noticed the literally thousands of posts about CoRE, along with the hundreds of examples?

Just curious… @Ac7ss ???


(Steve) #9

You’re best bet for examples are in the “CoRE - Get peer assistance here with setting up Pistons” link I have in the top of the post. There are tons in there and I’ve found some interesting ideas and things that got me thinking about new ideas for my own situation.

The documentation is a little bare, but I think it’s more because the smartapp is still in beta and the guy(s) writing it are of course doing it on their own time and giving it away for free. But it was hard for me to find info about it which of course is why I opted to create this post, hopefully giving people some basic info.

I do find what I can do with this smartapp to be great (compared to other rule engines I’ve tried). But like any other beta software it’s not going to be perfect. Scratch that, after working with computers since my very first Apple IIe…NO software is going to be perfect.

:wink:


(Glenn Brockett) #10

Thousands of posts is a daunting number. Needle in a haystack daunting. The poor choice in forum software doesn’t help either. Has anyone put together a Wiki for user examples and documentation of the app? This could help take some of the load off of the developers.

I do learn best by doing. But I also have a hard time figuring out just what is possible. Is there a notification option in the “Then” section? Can I change the color of a HUE lamp using the engine?

I now see what my main use for it will be, simple logic switches. “One off” apps as it were. It is simpler to do a “If everyone is gone and it’s daytime, turn off all lights.” with CoRE than an app. It is better, for me, to write an attic fan controller than use CoRE. (Deeper logic tree).

I could not figure out how to nest logic in CoRE for the first couple of days. “If (X && (Y || Z))” for example.

Thank you for the thread @smgran it is educational.


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

@Ac7ss

Try this thread… CoRE is much much more than you are seeing.

I challenge you to find a scenario it can not do in the current version.


(Glenn Brockett) #12

Thanks @bamarayne . As I said, the barrier to me is knowing what is possible.


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

I’ve yet to find a scenario that was not possible with CoRE. And then with the askAexa integration, all of it voice controlled!


#14

Just ask and someone will probably say it is or it isn’t possible :slight_smile: – and maybe point you to other resources that may make it possible.


#15

This thread started by @bamarayne, back in June, has the potential to provide tons of example CoRE pistons. Unfortunately, it’s not being used very frequently :disappointed:


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

True, everyone keeps posting their piston questions in the build threads, which makes them impossible to follow.


(Glenn Brockett) #17

Where do I send a minor bug report?
When building a piston, When building the condition, it requires entering the comparison twice.
i.e.

  • presence sensor
  • user1
  • user2
  • Evaluation mode
  • All
  • Comparison
  • is
  • Value
  • not present

I have to clear the Comparison value and re-enter it for the condition to be accepted. Is this normal?


(Steve) #18

Well, again the thread you should be on is…

My thread is just a very basic primer and I’m afraid is just not intended to answer all questions you might have with CoRE. Whereas the other thread is viewed by the developer and he often provides help and answers. And I totally understand that thread is a bit long (number of posts) but it is the better place to go IMO.


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

@smgran

Steve,
Great job on your tutorial… All help is appreciated by everyone.


(Glenn Brockett) #20

Ok, Now I can see why apps can be better. Server outages.


(Jane) #21

Wouldn’t you be able to do the same thing with the smart lighting app in smartthings?


(Steve) #22

Only a very basic rule. The walk thru above is just an example to get you started with CoRE. But it is extremely robust in terms of options (types of triggers, layering of conditions, etc.), so it can far exceed anything you could ever do with just the standard Smart Lighting app.

That being said, if all you require is a very simple “turn on lights at sunset” type of rule, then something like Smart Lighting would both work and might be a better way to set it up.


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

@pcgirl65

Smart Lighting is extremely limited, extremely.

But, if your devices are eligible for local processing and you are looking for simple automations, then smart lighting is the way to go.

Every app has a purpose and every propose is different.


(Jane) #24

Would I be able to use a piston as a widget on my phone? The reason I ask is because if I want to quickly dim the lights to watch a movie it would be better to just click on my phone and press one button.


#25

Maybe you can set it up as a Tap piston, it will take a couple extra clicks though.

A shortcut to the Dashboard on your phone (this is probably where your delay would be), click it, then Click the Tap piston.