Datacake Docs
  • Welcome
  • Get Started
  • Changelog
  • Best practices
    • Best practices: Getting started
    • Best practices: Resolution (Timeframe)
    • Best practices: Dashboards
    • Best practices: Reports
    • Best practices: Grouping Devices
  • Datacake LNS
    • Getting Started
    • Gateways
      • Milesight LoRaWAN Gateway - UG6x
      • RAKwireless WisGate Edge Light 2
    • Devices
    • Add Devices without Gateway
  • Device
    • Product
    • Configuration
    • Claiming
    • Historical Data
    • Database
      • Configuration Fields
      • Fields
        • Manual input
        • Field Roles
        • Formulas
        • Mapping Fields
      • Data retention & Datapoints
      • Examples
        • Mapping 4-20mA Signals
        • Converting Units
  • Dashboards
    • Global Dashboards
      • Setting Homepage
    • Device Dashboards
    • Multi-Device Dashboards
    • Widgets
      • Value Widget
      • Chart Widget
      • Image Map
      • Map Widget
      • Text Widget
      • SOS Widget
      • Boolean Widget
      • iFrame Widget
      • Downlink Widget
      • Set Value Widget
      • Measurement List Widget
      • Heatmap Widget
      • Table Widget
      • Image Widget
  • Portal
    • Multi-Tenancy (Workspaces)
    • Reports
      • Energy Report
    • Administrators
    • Members
      • API Users
    • Security & Privacy
    • Billing
      • Support Packages
      • VAT Exemption / Tax ID
      • SMS Credits
      • Access Invoices
      • Unused time and Remaining time in Invoices (Prorations)
      • Codes
    • White Label
    • Rules
      • Legacy Rule Engine
        • Sending notifications via Telegram
      • New Rule Engine
        • Rule Engine Table Overview
        • Copy/Paste and Template Functionality
        • Advanced Rule Engine E-Mail and Webhook Templates
        • Time Restrictions
    • Zones
  • Cake Red
    • Get Started
    • Overview
  • LoRaWAN
    • Get Started
      • CSV Import
      • Custom LoRaWAN Device
    • Configuring LNS
      • The Things Stack (TTN / TTI) Automated Setup
      • The Things Stack (TTN / TTI) Manual Setup
      • Loriot
      • Kerlink Wanesy
      • Helium
      • ChirpStack
      • Tektelic
      • Actility ThingPark
      • Senet
      • Milesight Gateway
      • KPN
    • Downlinks (LoRaWAN)
      • Set Time Frame
    • Securing Webhooks
    • Payload Decoders
      • Location and GPS
      • Access Gateway Metadata
      • Access Measurements
      • Global Variables
    • Using Cayenne LPP
    • Converting Payload
  • Generic API Devices
    • HTTP Downlinks
  • Integrations
    • MQTT
    • Particle
      • Get Started
      • Adding Integrations
      • Decoding Payloads
      • Calling Functions
      • Templates
        • Particle Tracker One
    • Incoming Webhooks
    • Outgoing Webhooks
      • Securing Outgoing Webhooks in Datacake
    • Golioth
    • Blues Wireless Notecard
    • Sigfox
    • Swarm Asset Tracker
    • Grandcentrix Modbus Cloud Connect
    • YuDash LYNX IoT Gateway
    • Dragino NB-IoT
      • Changing NB-IoT Bands
    • Hardwario CHESTER
    • 1NCE OS
  • API
    • Exporting Data
    • Record Measurements via API
    • Node RED to Datacake
    • Generate Access Token
    • Internal MQTT
      • Get Started
      • MQTT Documentation
      • MQTT over WebSocket
      • Example Code
    • GraphQL API
      • Using GraphQL
      • Device Creation
      • Tutorials
        • Read Group via Tags
  • Guides
    • Python
    • Send Slack Notifications
    • Forward Data to Cake Red
    • Multiple Data Feeds
    • Automated Dynamic Downlinks
    • Ingesting JSON Data into Datacake API Devices
    • Working with Default HTTP Decoder on API Devices and Code Examples
    • Accessing Measurements in Decoders
    • Connecting Datacake to Notion Using Zapier
    • How to set up and use location on non-GPS devices
    • How to integrate with AWS IoT Core
    • How to Schedule Mass-Downlinks (Multicast) using Datacake Rule Engine
    • How to Map Sensor Values to Ranges or Booleans, Strings using Mapping Fields
    • Understanding Internal vs. External MQTT Brokers on Datacake
    • Sending UDP Messages between 1NCE OS and Datacake
    • Concepts of LoRaWAN Payload Decoders on Datacake
    • How to check if a value stays above or below limits for given time
Powered by GitBook
On this page
  • Overview
  • Video Guide
  • Differences Between Single-Device Downlink and Multi-Device Downlink
  • Single-Device Downlink
  • Multi-Device Downlink
  • Scheduling Mass Downlinks on a Time-Based Schedule
  • Step 1: Create a New Rule
  • Step 2: Select the Product
  • Step 3: Define the Time-Based Trigger
  • Step 4: Configure the Mass Downlink Action
  • Summary
  • Multi-Device Downlink based on external Measurements
  • Step 1: Create a New Rule
  • Step 2: Select a Product
  • Step 3: Define the Trigger
  • Step 4: Configure the Action
  • Summary
  • Example Scenario: Morning Temperature Adjustment
  • Objective
  • Steps
  • Result
  • Conclusion

Was this helpful?

  1. Guides

How to Schedule Mass-Downlinks (Multicast) using Datacake Rule Engine

This document provides a detailed guide on triggering mass downlinks (multicast/broadcast) on a time-based schedule using the Datacake Rule Engine, allowing you to send downlinks to multiple devices.

Last updated 11 months ago

Was this helpful?

Overview

This document provides a detailed guide on how to trigger mass downlinks (also known as multicast or broadcast downlinks) on a time-based schedule using the Datacake Rule Engine. This capability allows you to define a schedule for sending downlinks to multiple devices at once, addressing a common and critical use case for many customers.

Video Guide

Differences Between Single-Device Downlink and Multi-Device Downlink

It is very important that you read this section before we start showing you how setting up downlink schedulers or multicast downlink works.

On the Datacake rule engine, we have two different types of actions for downlinks: Single device downlink and multi-device downlink. Essentially, single device sends a single downlink and multi-device sends a downlink to a group of devices. You might assume that for sending a multicast downlink, you would choose the multi-device downlink. However, this is only the case if you are not working with time-based actions. We will explain the difference between the two, but it is important to read this section beforehand.

Single-Device Downlink

A single-device downlink is used when the product you create the rule on contains multiple devices. This setup is common for time-based schedules. For instance, if you set a rule to trigger every morning at 9 AM for a product with 100 devices, the rule will execute for all these devices simultaneously.

When configuring the action for a single-device downlink:

  • Select "Single Device Downlink": This is necessary because the rule will apply to each device in the product.

  • Choose "Triggering Device": The triggering device is the device or all the devices on which the rule is executed. Each device in the product triggers the downlink action individually according to the schedule.

This approach ensures that each device in the product receives the downlink at the specified time.

Multi-Device Downlink

Multi-device downlinks are used when the product you are creating the rule on does not contain the devices you want to send the downlink to. This scenario typically occurs with measurement-based triggers from an external sensor.

For example, you might have an outdoor temperature sensor and set a condition that if the temperature falls below 10 degrees, you want to switch off all heating devices. Since the triggering device is the single temperature sensor, you need to:

  • Select "Multi-Device Downlink": This allows you to send a downlink to multiple devices based on the condition met by a single triggering device.

  • Select the Target Product: Instead of specifying each device individually, you can select a product (group of devices) and define a single downlink action.

In both single-device and multi-device downlink cases, this setup ensures that you can control a large number of devices (hundreds or even thousands) with a single rule. This method is efficient and scalable, making it easy to manage extensive IoT deployments with minimal effort.

Scheduling Mass Downlinks on a Time-Based Schedule

Step 1: Create a New Rule

  1. Log in to the Datacake platform and navigate to the workspace containing your devices.

  2. Click on "Rules" in the left-hand menu.

  3. Click on "Create New Rule".

Step 2: Select the Product

  1. Choose the product that includes the devices you want to control. For instance, select the "McClymit Viki" product, which contains all 108 devices you want to manage.

  2. Optional: Define device groups using tags if you only want the rule to apply to specific subsets of devices.

Step 3: Define the Time-Based Trigger

  1. Select "Time-Based Schedule" as the trigger type.

  2. Configure the Schedule:

    • Deselect "Saturday" and "Sunday" if you do not want the rule to run on weekends.

    • Set the time to 5:00 AM for the rule to execute each weekday morning.

  3. Confirm the Trigger: Ensure the rule is set to activate at the specified time for all selected devices.

Step 4: Configure the Mass Downlink Action

  1. Add a New Action and select "Single Device Downlink".

  2. Configure the Downlink:

    • Select the downlink type relevant to your needs (e.g., "Set Temperature").

    • Define the parameters for the downlink (e.g., set the temperature to 22 degrees).

  3. Set the Action Scope:

    • Since the rule is triggered based on a time schedule for all devices in the selected product, the downlink will be sent to all devices.

  4. Name the Action: For example, "Weekday Morning Temperature Set".

  5. Save the Rule: Click "Save" to finalize the rule.

Summary

By following these steps, you will have created a rule that automatically sends a downlink to all selected devices at 5 AM on weekdays, setting the temperature to 22 degrees.

Multi-Device Downlink based on external Measurements

Step 1: Create a New Rule

  1. Log in to the Datacake platform and navigate to the workspace containing your devices.

  2. Click on "Rules" in the left-hand menu.

  3. Click on "Create New Rule".

Step 2: Select a Product

  1. Choose the product that contains the external sensor. For example, select the "SenseCAP" product which has an outdoor temperature sensor.

Step 3: Define the Trigger

  1. Select "New Measurement" as the trigger type.

  2. Define the Condition:

    • Choose "Average of Last Hour" for the temperature measurement.

    • Set the condition to "greater than 15 degrees".

Step 4: Configure the Action

  1. Add a New Action and select "Multi Device Downlink".

  2. Configure the Downlink:

    • Select the target product (e.g., "McClymit Viki").

    • Define the downlink parameters (e.g., set temperature to 12 degrees).

  3. Name the Action: For example, "External Temperature Shutdown".

  4. Save the Rule.

Summary

This rule will monitor the external temperature sensor and, if the average temperature over the last hour exceeds 15 degrees, it will send a downlink to all devices in the selected product to set the temperature to 12 degrees.

Example Scenario: Morning Temperature Adjustment

Objective

Set all "Mclimate Vicki" devices to a specific temperature every weekday morning at 5 AM.

Steps

  1. Create a Time-Based Rule:

    • Navigate to "Rules" and create a new rule.

  2. Select the Product:

    • Choose "Mclimate Vicki Product" which includes all relevant devices.

  3. Define the Time-Based Trigger:

    • Set the schedule to weekdays at 5 AM.

  4. Configure the Downlink Action:

    • Select Single Device Downlink

    • Set the action to adjust the temperature to 22 degrees.

    • Name the action and save the rule.

Result

At 5 AM every weekday, all "McClymit Viki" devices will automatically receive a downlink to set their temperature to 22 degrees.

Conclusion

The Datacake Rule Engine's capability to schedule mass downlinks on a time-based schedule is a powerful feature for managing large groups of devices. By following the steps in this documentation, users can efficiently create rules that automate downlink scheduling, ensuring consistent and synchronized control over their IoT devices. This functionality is crucial for applications requiring regular and simultaneous updates across multiple devices.