|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.|
- 1 General
- 2 Getting started
- 3 Installing webCoRE
- 4 Understanding the basics
- 5 Anatomy of a webCoRE Piston
- 6 Creating your first piston
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.
A few steps need to be completed befoure 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.
You must complete all of these steps.
- GitHub Install or Manual Install of webCoRE source code into the SmartThings Cloud
- Enable webCoRE OAuth in the SmartThings cloud
- Install webCoRE in the SmartThings mobile app
- Enabling webCoRE dashboard
- 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 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 made of of several components. They are listed below.
Variables are used in the traditional sense of the word. They hold a value to be used during the execution logic of your piston.
Local variables are declared within a piston's define block. They are not visible beyond the scope of the piston, however they are available to concurrent and future executions of the same piston. If a variables is initialized in the pistons's define block the initialization will occur each time the piston is executed.
<Not implemented yet>
Variable Data Types
webCoRE supports a variety of data types, please review the webCoRE Variable Data Types.
Creating your first piston
Once you finished the installation steps above, let's go ahead and create the first piston, the famous Hello World.