This article describes the creation of a Device Cloud Scheduled Task which can be used to update the Remote Management and NTP server address configurations, of various devices capable of connecting to Digi Device Cloud or Remote Manager.
A Scheduled Task is a powerful tool which can be accessed via the Schedules tab, when logged-in to Digi Device Cloud or Remote Manager, under the Device Management area. A Scheduled Task can be used for many things, but in this article, we discuss creation of a Task which can be used to update the settings of multiple devices via RCI Request. A Scheduled Task can can also be used to schedule an update for devices which are currently in a “Disconnected” state (as long as they connect within a week of starting the task).
A Device Cloud or Remote Manager account (free or subscribed) is required to run a Scheduled Task. Also, any devices which need to be updated by the Scheduled Task will need to be under that account, and will need to attained a "Connected" state within a week of the Scheduled Task being launched.
Reference Article: Digi International Device Cloud/Remote Manager Notice: November 23, 2015 - End use of Etherios domain names in device configurations
Update Task Instructions
When first creating a Scheduled Task, we recommend that you initially try it out on a single device, just to get a feel for the Scheduled Task, and to understand how it works. By starting with a single device, you can better understand if any bugs need to be worked out prior to targetting a larger number of devices, or if you want to write the task differently (there is no specific order of events one must follow when creating a task, as long as the XML code of each individual element is complete).
Once a script performs to your liking, it can be run on many devices simultaneously, by targeting more than one device through use of a Tag, Group, or just by tagging more than one Device ID target at a time from the Devices area. By effectively using Tags and/or Groups (found under Device Management --- Devices --- Groups subtab/"Add A Group" dropdown), a strategy can be developed to update as many or as few devices as you choose.
Preface to Settings Update Task tutorial:
Scheduled Tasks should be saved with an .xml filename extension (in the following tutorial the file you create will be named DCRM-Settings-update.xml for example). XML files can be viewed as plain text, or in an XML editor designed for use with them.
Device Cloud/Remote Management Settings Update Task tutorial:
- Login to your Device Cloud or Remote Manager account
- Go to the Device Management --> Schedules area and click the New Schedule button:
- When the New Schedule editor pops up, give your task a Description (example: DCRM Settings Update is used in the example below):
- Under the Devices section of the menu on the left, click RCI Command and observe the RCI command content populate in the "Commands" area on the right, below your Description:
- Copy the RCI code section relevant to your device from this file into the RCI command window entry area on the right (in place of the example listed there from step 4).
- At the bottom of the Commands window on the right, verify that On Error: End Task is selected and that the Allow Offline box is checked.
- Select the Save As drop-down, and enter filename DCRM-Settings-update.xml, then hit OK to save it.
- Select the Schedule >> button, and highlight the devices to run your new Scheduled Task on (Groups and Tags can be used to run the Task on multiple devices).
- Select the Immediate option on the left and the Run Now button if you want to run the Update Settings Scheduled Task immediately, or select Future and select a Date and Time then Schedule, to run the task at some time in the future.
You should see the message Operation Submitted Successfully
if your new task was successfully scheduled to run on the devices you selected.
If scheduling a Task on a device, the Scheduled Task will time out (fail) after one week, if the target device(s) never attains a "Connected" state with Device Cloud or Remote Manager, to receive the settings update launched by the Task.
Once the Update Task has been tested and verified to work, it can be used to easily update multiple batches of devices via Digi Device Cloud or Remote Manager. You can also look at the Scheduled Task file in any text or XML editor, if you want to learn more about how Scheduled Tasks work (or modify this task to do other things, as you learn how to use different commands to accomplish other Scheduled Tasks). Executing DCRM-Settings-update.xml on Gateways from Device Management --- Devices
How to check on Scheduled tasks which have run
- Log into your Device Cloud account
- Go to Device Management -> Devices
- Highlight, then right-click on any Gateway(s) you want to update
- Go to More… -> Tasks -> DCRM-Settings-update.xml
- When prompted at the Scheduled Operations popup, click Yes.
- Browse to Device Management -> Operations
- Look for listed operations which are called "DCRM Settings Update"
- Double click on an operation, to observe the details of the scheduled task which was run on the targetted devices
- Verify whether the Task was successful or failed.
Keep in mind that a Scheduled Task operation can only have complete success, if all devices target(s) selected to run the Scheduled Task on were successful at doing so. If a status of Failed is listed for your operation, it means that one of the steps which was part of your Scheduled Task failed, or that any of the device targets selected for the task weren't successful at connecting and receiving the update after a week (though other device targets may have succeeded).
An operation with a status of Successful means that all commands within the Scheduled Task ran on all the device targets selected for update by the Task successfully, i.e. complete success for all devices, not partial.
NOTE: The article above discusses how to update the Remote Management and Time Server address configuration settings of your devices. Please note however that the default settings within the OS/Firmware for your device (especially CP-X2e SE and XBee Gateway ZB gateways) may still contain "etherios.com" settings. For this reason, factory defaulting your device should be avoided, unless you have verified that the device's OS/Firmware has been updated to a version which contains no "etherios.com" settings.
Device Cloud Documentation page – Tech Support page for Device Cloud documentation
Device Cloud User Guide – see Operations and Schedules sections
Device Cloud Programming Guide – see Scheduled Operations
HOW TO: Example for Configuring a Device Cloud Task to Set a Gateway XBee PAN ID
HOW TO: Remove a Task listed under the My Tasks tab when creating a new Device Cloud Schedule