Skip to main content
All CollectionsUser Guides
Create a Runtime Widget
Create a Runtime Widget

Learn how to create a Runtime widget that will allow you to track for how long your device has been active in a given period of time.

Sergio M avatar
Written by Sergio M
Updated over 2 months ago

Information such as the total active time of a machine, whether it's performing up to its potential or not, and how long it’s been running since its last maintenance, are all key to improve an operation and to get a better picture on metrics such as OEE.

Ubidots Runtime widget allows you to effortlessly monitor how long your devices have been active within a specified timeframe. With this widget, you can visualize device activity, identify trends, and make data-driven decisions.

In this guide you’ll learn how to create a Runtime widget.

Requirements

1. Runtime modes

With the Runtime widget, you can currently keep track of the activity of your device in two ways:

  • ON/OF: Ideal to keep track of a variable that represents the status of a machine, in this mode you provide the values for both the ON and OFF states. Based on the configuration, the widget will display the total the device has been either ON or OFF.

For example: Every minute your machine reports if it’s ON with a “1” or OFF with a “0”. After configuring a Runtime widget based on those values, the machine delivered ten consecutive ONs before sending its first OFF. At that point, the widget displays a value close to “10·00” until a new ON value arrives and, once it does, the time count we had left at 10 will increase again.

  • Uptime: This mode tracks the time the device has been active by relying on the expected data delivery rate. Instead of specific values, the widget monitors the rate at which your device sends data to Ubidots.

For example: If your machine is expected to "report" an output value every minute, and it delivered ten consecutive outputs before stopping data delivery, the widget will display a value of "10·00" until a new output value arrives, once it does, the time count left at 10 will increase again.

The widget can display either percentage or time values. Changing the data format of the widget can be done in the "appearance" section of its configuration.

  • If "time" is selected, the widget will display the total time the device has been active for over the selected timespan.

  • If, on the other hand, "percentage" is selected, the widget will display the percentage of time the device has been active for over the selected timespan.

An example of a percentage value being displayed:

2. Creating a Runtime widget

1. While in a dashboard, click on the “+” button at the upper right corner of the screen.

2. Look for the “Runtime” option and click on it.

3. While on the “settings” tab, click on the “+ add variable” button and look for the variable you want to keep track of within its containing device.

4. Click on the “runtime type” button to define the behavior of the widget.

5. Select the widget’s mode of operation. There are currently two available options, “ON/OFF” and “uptime”, which are explained in the first section of this guide.

If “ON/OFF” was selected, follow these steps:

  • Enter the values that correspond to the ON and OFF status of your device.

  • Select whether the widget will display the time sum of the ON or the OFF values.

  • Select the time unit in which the widget will display its values. Click on the “accept” button to continue with the widget configuration.

If “uptime” was selected, follow this step:

  • Select the “uptime period” at which the widget will check for activity. This value should ideally be the same as the rate at which your variable/device is expected to send data to Ubidots.

  • Select the time unit in which the widget will display its values. Click on the “accept” button to continue with the widget configuration.

6. Select the time span in which the widget will actively check the activity of the device.

7. Finally, configure how your widget looks by moving into the “appearance” tab.

Important note:

In the "appearance" section you can configure whether the widget will display its values as time or as a percentage. For example, our device has been active for 1799.01 hours in the past three months and we've configured the widget to work on an hourly basis. This is what would be displayed, depending on the selected data format, in this example:

  • Time: 1799.01

  • Percentage: 82.14%

Did this answer your question?