Stop the war

Stand with Ukraine flag

Support Ukraine

Try it now Pricing
PE Edge
Community Edition Professional Edition Cloud Edge PE Edge IoT Gateway License Server Trendz Analytics Mobile Application PE Mobile Application MQTT Broker
Documentation > Rule Engine > Rule Chain Templates
Getting Started
Installation Architecture API FAQ

Rule Chain templates

What Is an Edge Rule Chain Template?

An Edge Rule Chain Template is a predefined Rule Chain in ThingsBoard, designed specifically for use with ThingsBoard Edge. It is important to note that the rule chain template itself does not execute on the server. Instead, it serves merely as a template. The actual rule chain, derived from this template, begins functioning and processing data from devices according to its configuration only after it is assigned to an Edge instance and delivered to it.

Creating Rule Chain Template on the Server

  • Sign in to your ThingsBoard PE instance and navigate to the “Edge Management” -> “Rule chain templates” page. Click the “+” icon in the top right corner and choose “Create new rule chain”.

  • Enter a name for your rule chain, such as “Remote Farm”. Click “Add” to confirm the creation of your new rule chain template.

  • Your new rule chain template will now be listed, typically at the top. Click on this newly created template to start editing it.

  • Within the template, configure your rule nodes and flow. After setting up, click the “Apply Changes” icon. Remember, this step will not activate the rule chain on the server; it merely readies it for deployment to an Edge. Let us proceed to the next step to assign this template to an Edge.

Assigning the Rule Chain Template to ThingsBoard Edge

  • Navigate to the “Edge Management” -> “Instances” page. On the row corresponding to your Edge instance, click the “Manage rule chains” icon.

  • In the top right corner, click the “+” icon “Assign to edge”.

  • From the list, select the rule chain you have recently created and then click the “Assign” button.

  • The assigned rule chain template will now appear at the top of the list. This action triggers the process of delivering the rule chain template to the Edge. Once the template reaches the Edge, it becomes an active rule chain. It then starts processing data from connected devices according to the configurations set within the template.

Verify Assigned Rule Chain on the Edge

  • Sign in to your ThingsBoard Edge PE instance and navigate to the “Rule chains” page. Click on the rule chain that was recently assigned to open and view it.

  • Ensure that the rule chain appears as it was configured on the server, verifying that all settings and configurations are accurately reflected.

Next Steps