Difference between revisions of "webCoRE"

From webCoRE Wiki - Web-enabled Community's own Rule Engine
Jump to: navigation, search
Line 3: Line 3:
  
 
== General ==
 
== General ==
The ''web Community's own Rule Engine'' (or for short, webCoRE) is a general rule engine for SmartThings. It works by allowing users to create scripts that are interpreted and executed by the SmartThings SmartApp, allowing for complex decisions. webCoRE is currently a work in progress. Please review the [[webCore_todo]] list.
+
The ''web Community's own Rule Engine'' (or for short, webCoRE) is a general rule engine for SmartThings. It works by allowing users to create scripts that are interpreted and executed by the SmartThings SmartApp, allowing for complex decisions. webCoRE is currently a work in progress. Please review the [[webCoRE todo]] list.
  
 
== Getting started ==
 
== Getting started ==

Revision as of 20:47, 27 March 2017

Warning Warning: webCoRE is currently in the Alpha phase of the software release lifecycle which means it might be unstable. Crashes, bugs, and potentially data loss are expected. Anyone is welcome to try it out, but it should not be used for production purposes.


General

The web Community's own Rule Engine (or for short, webCoRE) is a general rule engine for SmartThings. It works by allowing users to create scripts that are interpreted and executed by the SmartThings SmartApp, allowing for complex decisions. webCoRE is currently a work in progress. Please review the webCoRE todo list.

Getting started

A few steps need to be completed before you can use webCoRE. First, webCoRE needs to be installed in your SmartThings account, then automations need to be configured. These are called pistons and will be detailed later. So let's start by installing webCoRE, please follow the 5 steps below.

Installing webCoRE

You must complete all of these steps.

  1. GitHub Install or Manual Install of webCoRE source code into the SmartThings Cloud
  2. Enable webCoRE OAuth in the SmartThings cloud
  3. Install webCoRE in the SmartThings mobile app
  4. Enabling webCoRE dashboard
  5. Enable webCoRE on Another Device

Understanding the basics

webCoRE is comprised of the three main components listed below.

The webCoRE child SmartApp (webCoRE Piston)

The webCoRE child SmartApp is also known as a piston. It is responsible for executing the automation script that the user creates and does the heavy lifting in the whole webCoRE ecosystem. It is directly managed by the webCoRE parent SmartApp, which can create, maintain, and delete a Piston.

The webCoRE parent SmartApp (webCoRE)

The wabCoRE parent SmartApp is the component responsible for managing the child SmartApp instances and their relationship with the Dashboard. It is the middle man that allows adding new Pistons, maintaining them, or deleting them. It is also responsible with the security of the whole ecosystem, allowing password secured access from the Dashboard.

The dashboard

The Dashboard is an HTML interface for webCoRE that allows users to manage their webCoRE installation. It is the central hub to controlling webCoRE, allowing the user to create, modify, test, and delete Pistons.

Anatomy of a webCoRE Piston

A piston is a script that contains a collection of statements, arranged so that the logic and flow of the piston perform tasks in a desired sequence. It is broken down into several sections, described below.

The settings section

This section allows configuration of how certain aspects of the piston function. These settings control low-level functionality and can alter the way a piston reacts to events. [todo: describe the settings]

The define section

A very powerful feature of webCoRE is the ability to use variables. Think of variables as temporary pockets where you can store information and are able to later retrieve and use this information for any purpose. Variables do just that, they store information that can be later used, either during the current piston run, or at a later time, when another event occurs.

The execute section

Restrictions

Execute Block

Creating your first piston

Once you finished the installation steps above, let's go ahead and create the first piston, the famous Hello World.