Skip to main content
The alarm system monitors variables continuously and triggers notifications when values exceed defined thresholds. Configure simple or combined alarms to ensure timely response to critical conditions.

Alarm Types

The system supports two alarm types:
Monitor a single variable against a threshold condition.Use Cases:
  • Tank level too high/low
  • Pressure exceeds safe limits
  • Temperature out of range
Example: Alert when Tank A level drops below 100L

Creating an Alarm

1

Navigate to Alarms

Access Configuration > Alarmas in the main menu.
2

Click Create Alarm

Click the “Crear alarma” button in the top-right corner.
3

Choose Alarm Type

Toggle “Alarma combinada” switch:
  • Off = Simple alarm (single condition)
  • On = Combined alarm (two conditions)
4

Configure Alarm Parameters

Fill in all required fields based on alarm type.
5

Save Alarm

Click “Crear alarma” to save. The alarm is activated immediately.

Alarm Configuration Parameters

Basic Parameters

name
string
required
Descriptive name for the alarm (e.g., “Tank A Low Level Warning”)
id_influxvars
number
required
Primary variable ID to monitor
condition
string
required
Comparison operator for the thresholdAvailable Conditions:
  • > - Greater than
  • < - Less than
  • = - Equal to
  • >= - Greater than or equal to
  • <= - Less than or equal to
  • entre - Between (requires two values)
value
number
required
Threshold value for comparison
value2
number
Second threshold value (required only when condition is entre)
repeatInterval
number
required
Minutes between repeated notifications while alarm condition persistsRecommended Values:
  • Critical alarms: 5 minutes
  • Warning alarms: 15-30 minutes
  • Information alarms: 60 minutes

Combined Alarm Parameters

logicOperator
string
Logical operator combining both conditions (required for combined alarms)Options:
  • AND - Both conditions must be true
  • OR - Either condition can be true
secondaryVariableId
number
ID of the second variable to monitor (required for combined alarms)
secondaryCondition
string
Comparison operator for the secondary variableOptions: >, <, =, >=, <= (NOT entre)
secondaryValue
number
Threshold value for the secondary variable

Time Restrictions

hasTimeRange
boolean
default:false
Enable time-based alarm restrictions
startime
string
Start time for alarm activation (24-hour format: “HH:MM”)Required when hasTimeRange is true
endtime
string
End time for alarm activation (24-hour format: “HH:MM”)Required when hasTimeRange is true
Alarms with time restrictions only trigger notifications during the specified hours. The condition is still evaluated 24/7, but notifications are suppressed outside the time range.

Alarm Configuration Examples

Simple Alarm: Low Tank Level

{
  "name": "Tank A Low Level",
  "id_influxvars": 15,
  "condition": "<",
  "value": 100,
  "repeatInterval": 10,
  "type": "single"
}
This alarm triggers when variable ID 15 (Tank A Level) drops below 100 units, repeating every 10 minutes.

Simple Alarm: Temperature Range

{
  "name": "Water Temperature Out of Range",
  "id_influxvars": 23,
  "condition": "entre",
  "value": 15,
  "value2": 25,
  "repeatInterval": 15,
  "type": "single"
}
Triggers when temperature is between 15°C and 25°C (outside the normal range).

Combined Alarm: Pump Malfunction

{
  "name": "Pump Running with No Flow",
  "type": "combined",
  "id_influxvars": 42,
  "condition": "=",
  "value": 1,
  "logicOperator": "AND",
  "secondaryVariableId": 43,
  "secondaryCondition": "<",
  "secondaryValue": 10,
  "repeatInterval": 5
}
Triggers when Pump Status (ID 42) equals 1 (running) AND Flow Rate (ID 43) is less than 10 L/min.

Time-Restricted Alarm

{
  "name": "Daytime High Usage Alert",
  "id_influxvars": 30,
  "condition": ">",
  "value": 500,
  "repeatInterval": 30,
  "type": "single",
  "hasTimeRange": true,
  "startime": "08:00",
  "endtime": "18:00"
}
Only triggers notifications between 8:00 AM and 6:00 PM on weekdays.

Alarm Table Interface

The alarms table displays all configured alarms with these columns:
ColumnDescription
NombreAlarm name
CondiciónComplete condition statement with variable names and values
Tipo”Simple” or “Combinada” (Combined)
Repetir / HorarioRepeat interval and time restrictions if configured
Estado”Activo” (Active) or “Inactivo” (Inactive)
AccionesEdit and Activate/Deactivate buttons
Source Reference: /src/modules/ConfigAlarms/views/index.jsx:23-179

Managing Alarms

Editing an Alarm

1

Click Edit Button

Click the blue “Editar” button in the Actions column.
2

Modify Configuration

Update any alarm parameters in the modal form.
3

Save Changes

Click “Guardar cambios” to update the alarm.

Activating/Deactivating Alarms

Alarms can be temporarily disabled without deletion:
1

Click Status Button

Click “Activar” (green) or “Desactivar” (red) button.
2

Confirm Action

Confirm the status change in the dialog.
3

Status Updated

The alarm’s monitoring state changes immediately.
Implementation:
const { data: res } = await request(
  `${url}/changeStatusAlarm`,
  'PUT',
  {
    id: alarmId,
    status: currentStatus
  }
)
Source Reference: /src/modules/ConfigAlarms/views/index.jsx:136-160
Deactivated alarms do not monitor conditions or send notifications. Reactivate them when needed.

Condition Display Logic

The system displays alarm conditions in human-readable format: Simple Alarm Display:
{alarm.var_name} {alarm.condition} {alarm.value}
// Example: "Tank_A_Level < 100"
Range Condition Display:
{alarm.var_name} entre {alarm.value} y {alarm.value2}
// Example: "Water_Temp entre 15 y 25"
Combined Alarm Display:
{alarm.var_name} {alarm.condition} {alarm.value}
{alarm.logicOperator}
{alarm.secondaryVarName} {alarm.secondaryCondition} {alarm.secondaryValue}

// Example:
// pH_Level > 8.5
// AND
// Chlorine_Level < 0.5
Source Reference: /src/modules/ConfigAlarms/views/index.jsx:28-57

API Endpoints

EndpointMethodDescription
/getAlarmsGETRetrieve all alarms
/createAlarmPOSTCreate new alarm
/updateAlarm/:idPUTUpdate existing alarm
/changeStatusAlarmPUTActivate/deactivate alarm

Create/Update Alarm Request

const payload = {
  name: "Tank A Low Level",
  id_influxvars: 15,
  condition: "<",
  value: 100,
  repeatInterval: 10,
  type: "single"
}

// For updates, include the alarm ID
if (alarmData?.id) {
  await request(`${url}/updateAlarm/${alarmData.id}`, 'PUT', payload)
} else {
  await request(`${url}/createAlarm`, 'POST', payload)
}
Source Reference: /src/modules/ConfigAlarms/components/ModalAlarm.jsx:110-161

Payload Cleanup

The system automatically removes unnecessary fields before sending:
// Remove value2 if not "entre" condition
if (form.condition !== 'entre') delete payload.value2

// Remove combined alarm fields if simple
if (form.type === 'single') {
  delete payload.secondaryVariableId
  delete payload.secondaryCondition
  delete payload.secondaryValue
  delete payload.logicOperator
}

// Remove time fields if no time range
if (!form.hasTimeRange) {
  delete payload.startime
  delete payload.endtime
  delete payload.hasTimeRange
}
Source Reference: /src/modules/ConfigAlarms/components/ModalAlarm.jsx:115-133

Best Practices

Use clear, action-oriented names:Good Examples:
  • “Tank A Low Level Warning”
  • “Pump 2 High Temperature Alert”
  • “Filter Pressure Drop Critical”
Avoid:
  • “Alarm 1”
  • “Test”
  • “var42_check”
Balance between notification frequency and alarm fatigue:
  • Critical (life/safety): 5 minutes
  • High priority (equipment damage): 10-15 minutes
  • Medium priority (efficiency): 30 minutes
  • Low priority (information): 60+ minutes
Consider increasing intervals for persistent conditions to avoid notification flooding.
Use combined alarms for:
  • Detecting equipment malfunctions (status + performance)
  • Validating sensor readings (cross-check variables)
  • Complex operational conditions
AND Logic: All conditions must be true (stricter)OR Logic: Any condition can trigger (broader monitoring)
Use time-restricted alarms for:
  • Business-hours-only notifications
  • Different thresholds for day/night operations
  • Maintenance windows (suppress alarms during scheduled work)
Create two alarms with different time ranges if you need 24/7 monitoring with different parameters for different times.

Troubleshooting

Checklist:
  1. Verify alarm status is “Activo”
  2. Check variable is receiving data
  3. Confirm threshold values are correct
  4. For time-restricted alarms, verify current time is within range
  5. Check repeat interval hasn’t suppressed notification
Solutions:
  1. Increase repeat interval
  2. Adjust threshold to reduce false positives
  3. Add time restrictions to limit notification windows
  4. Review if condition is too sensitive
Troubleshooting:
  1. Test each condition separately with simple alarms
  2. Verify both variables are updating
  3. Review AND vs OR logic choice
  4. Check that secondary condition operator is correct
Alarm evaluation happens continuously in real-time. Changes to alarm configuration take effect immediately without requiring system restart.