Skip to content

Alert Connector

The Alert connector sends notifications when conditions are met.

Connector Type: MeddleAlert

Notification Types: Email

{
"type": "MeddleAlert",
"config": {
"name": "High Temperature Alert",
"condition": "temperature > 80",
"minDuration": 10,
"cooldown": 300,
"notification": {
"type": "Email",
"smtpHost": "smtp.example.com",
"smtpPort": 587,
"smtpUser": "alerts@example.com",
"smtpPass": "password",
"fromEmail": "alerts@example.com",
"toEmails": ["operator@example.com", "manager@example.com"],
"subject": "Temperature Alert",
"body": "Temperature exceeded threshold"
}
}
}
  • name: Alert name for identification
  • condition: MXL expression for trigger condition
  • minDuration: Minimum seconds condition must be true before alerting
  • cooldown: Seconds to wait before sending another alert
  • notification: Notification configuration
  • type: "Email"
  • smtpHost: SMTP server hostname
  • smtpPort: SMTP server port (typically 587 or 465)
  • smtpUser: SMTP username
  • smtpPass: SMTP password
  • fromEmail: Sender email address
  • toEmails: Array of recipient email addresses
  • subject: Email subject
  • body: Email body text

Use MXL expressions for conditions:

temperature > 80
pressure < 10
temperature > 80 && pressure < 10
humidity > 60 || temperature > 25
status == "error"

See MXL Reference for complete syntax.

Prevents false alarms by requiring condition to be true for a minimum duration:

{
"minDuration": 10
}

Condition must be true for 10 seconds before alert is sent.

Prevents alert spam by waiting between notifications:

{
"cooldown": 300
}

After sending an alert, waits 300 seconds (5 minutes) before sending another.

{
"type": "MeddleAlert",
"config": {
"name": "Freezer Temperature Alert",
"condition": "temperature > -10",
"minDuration": 30,
"cooldown": 600,
"notification": {
"type": "Email",
"smtpHost": "smtp.gmail.com",
"smtpPort": 587,
"smtpUser": "alerts@company.com",
"smtpPass": "app-password",
"fromEmail": "alerts@company.com",
"toEmails": ["maintenance@company.com"],
"subject": "Freezer Temperature Warning",
"body": "Freezer temperature is above -10°C"
}
}
}
{
"type": "MeddleAlert",
"config": {
"name": "Machine Stopped",
"condition": "status == \"stopped\" && runtime > 0",
"minDuration": 60,
"cooldown": 1800,
"notification": {
"type": "Email",
"smtpHost": "smtp.example.com",
"smtpPort": 587,
"smtpUser": "alerts@factory.com",
"smtpPass": "password",
"fromEmail": "alerts@factory.com",
"toEmails": ["supervisor@factory.com", "maintenance@factory.com"],
"subject": "Machine Stopped Alert",
"body": "Production machine has stopped unexpectedly"
}
}
}
{
"type": "MeddleAlert",
"config": {
"name": "Critical Process Alert",
"condition": "temperature > 100 || pressure > 150 || vibration > 5",
"minDuration": 5,
"cooldown": 300,
"notification": {
"type": "Email",
"smtpHost": "smtp.example.com",
"smtpPort": 587,
"smtpUser": "critical@factory.com",
"smtpPass": "password",
"fromEmail": "critical@factory.com",
"toEmails": ["emergency@factory.com"],
"subject": "CRITICAL: Process Alert",
"body": "Critical process parameters exceeded"
}
}
}
{
"smtpHost": "smtp.gmail.com",
"smtpPort": 587,
"smtpUser": "your-email@gmail.com",
"smtpPass": "app-specific-password"
}

Note: Use App Passwords for Gmail.

{
"smtpHost": "smtp.office365.com",
"smtpPort": 587,
"smtpUser": "your-email@company.com",
"smtpPass": "your-password"
}
{
"smtpHost": "mail.example.com",
"smtpPort": 587,
"smtpUser": "alerts@example.com",
"smtpPass": "password"
}
  1. Set appropriate minDuration - Avoid false alarms
  2. Use reasonable cooldown - Prevent alert fatigue
  3. Test SMTP settings - Verify emails are delivered
  4. Use descriptive names - Identify alerts easily
  5. Include context in body - Make alerts actionable
  • Verify SMTP credentials
  • Check SMTP host and port
  • Ensure firewall allows SMTP traffic
  • Test SMTP connection separately
  • Check spam folder
  • Increase minDuration
  • Increase cooldown
  • Refine condition to be more specific
  • Decrease minDuration
  • Check condition logic
  • Verify data is flowing through connector