Device Inactivity Alarm
Monitor HMI Device connectivity and automatically create or clear an alarm when a HMI Device stops sending data.
Use case
Section titled “Use case”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.
Prerequisites
Section titled “Prerequisites”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—truewhen the device is active,falsewhen inactiveinactivityAlarmTime— timestamp of the last inactivity event
Alarm Rule
Section titled “Alarm Rule”You can import a ready-made alarm rule or build it manually.
Option 1. Import alarm rule
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.
Step 1. Configure general settings
Section titled “Step 1. Configure general settings”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)
Step 2. Add argument
Section titled “Step 2. Add argument”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
Step 3. Add trigger condition
Section titled “Step 3. Add trigger condition”In the Trigger conditions section, set Severity to Critical, then click Add condition and configure:
- Mode:
Script - Script:
return active == false;
Step 4. Add clear condition
Section titled “Step 4. Add clear condition”Scroll down to Clear condition, click Add clear condition, and configure:
- Mode:
Script - Script:
return active == true;
Click Add to save the alarm rule.
Step 5. Verify
Section titled “Step 5. Verify”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:
See also
Section titled “See also”- HMI Device connectivity status — how iRis Cloud tracks HMI Device state
- Alarm rules — full alarm rule reference
- Create & clear alarms — threshold-based alarm recipe