Skip to content

Device Inactivity Alarm

Monitor HMI Device connectivity and automatically create or clear an alarm when a HMI Device stops sending data.

Thermometer A1 (thermostat profile) sends temperature telemetry to iRis Cloud. When it stops reporting data, iRis Cloud marks it inactive and raises a HMI Device inactive alarm. When the HMI Device reconnects, the alarm clears automatically.

This recipe uses an Alarm Rule approach: no-code, scoped to a device profile, and best for standard inactivity monitoring.

Create a HMI Device (see Register a License to a HMI Device for the access token and license steps), then set its profile from the details panel:

  • Name: Thermometer A1
  • Device profile: thermostat — open the HMI Device, click the edit (pencil) button, select the profile, and click Apply changes.

iRis Cloud’s Device State service automatically maintains two server attributes on every device:

  • active — true when the device is active, false when inactive
  • inactivityAlarmTime — timestamp of the last inactivity event

You can import a ready-made alarm rule or build it manually.

Option 1. Import alarm rule

  • Download the HMI Device Active/Inactive alarm rule as JSON file and import it into your instance.

When importing, set the thermostat as the target device profile.

Option 2. Create manually

Go to Alarms ⇾ Alarm rules and click + Add alarm rule ⇾ Create new alarm rule.

In the Alarm rule dialog, set:

  • Alarm type: Device inactive
  • Entity type: Device profile
  • Device profile: thermostat (here specify the device type of your device)

Click Add argument and configure it to read the active server attribute:

  • Entity type: Current entity
  • Argument type: Attribute
  • Attribute scope: Server attributes
  • Attribute key: active
  • Argument name: active

In the Trigger conditions section, set Severity to Critical, then click Add condition and configure:

  • Mode: Script
  • Script:
    return active == false;

Scroll down to Clear condition, click Add clear condition, and configure:

  • Mode: Script
  • Script:
    return active == true;

Click Add to save the alarm rule.

Open Thermometer A1 ⇾ Attributes ⇾ Server attributes. iRis Cloud writes active and inactivityAlarmTime automatically.

To simulate inactivity, edit the active attribute and set it to false:

Open Thermometer A1 ⇾ Alarms. A HMI Device inactive Critical alarm appears:

Set active back to true to clear the alarm: