# Alarm to users group

This example shows how to setup alarm to different groups of recipients on time base (it could be work shifts for example).
When the input closes the alert will be sent to the users belonging to the active workgroup.

# Configuration

PLMN channel enabled (a valid SIM card must be installed).

# Users

In user list 4 users are stored:
• Aristotle and Plato belong to group "greek"
• Kant and Leibniz belong to group "german"

    NAME:       Aristotle
    TYPE:       TELEPHONE
    IDENTIFIER: +3012345678
    GROUP:      greek
    START:      01/01/2000 00:00
    STOP:       31/12/2099 23:59
    WEEKDAYS:   YYYYYYY
    TICKETS:    UNLIMITED

    NAME:       Kant
    TYPE:       TELEPHONE
    IDENTIFIER: +49234567890
    GROUP:      german
    START:      01/01/2000 00:00
    STOP:       31/12/2099 23:59
    WEEKDAYS:   YYYYYYY
    TICKETS:    UNLIMITED

    NAME:       Leibniz
    TYPE:       TELEPHONE
    IDENTIFIER: +4913579246
    GROUP:      german
    START:      01/01/2000 00:00
    STOP:       31/12/2099 23:59
    WEEKDAYS:   YYYYYYY
    TICKETS:    UNLIMITED

    NAME:       Plato
    TYPE:       TELEPHONE
    IDENTIFIER: +309876543
    GROUP:      greek
    START:      01/01/2000 00:00
    STOP:       31/12/2099 23:59
    WEEKDAYS:   YYYYYYY
    TICKETS:    UNLIMITED

# Rules

Rule 001 is triggered every day at 08:00AM.
No conditions are set.
Set Memory bit 1 enabling greek group (see Rule 003).

    – EnableGreeks
    ↯ Scheduled at TIME [hh:mm]   08:00
    ✛
    ✛
    ✛
    ✛
    ✛
    > mem1=ON
    >
    >
    >
    >

Rule 002 is triggered every day at 06:00PM.
No conditions are set.
Reset Memory bit 1 enabling german group (see Rule 004).

    – EnableGermans
    ↯ Scheduled at TIME [hh:mm]   18:00
    ✛
    ✛
    ✛
    ✛
    ✛
    > mem1=OFF
    >
    >
    >
    >

Rule 003 is triggered at each change of state of the input 1.
Condition: digital input 1 closed (on input closing) AND…
Condition: memory bit 1 status set (greek group enabled).
An SMS is sent to greek philosophy.

    – AlertGreeks
    ↯ Digital Input 1
    ✛ Input 1 - Value = 1
    ✛ Memory Bit 1 - Value = 1
    ✛
    ✛
    ✛
    > AT+SMS=greek,"Alarm to greeks philosophy"
    >
    >
    >
    >

Rule 004 is triggered at each change of state of the input 1.
Condition: digital input 1 closed (on input closing) AND…
Condition: memory bit 1 status reset (german group enabled).
An SMS is sent to german philosophy.

    – AlertGreeks
    ↯ Digital Input 1
    ✛ Input 1 - Value = 1
    ✛ Memory Bit 1 - Value = 0
    ✛
    ✛
    ✛
    > AT+SMS=german,"Alarm to german philosophy"
    >
    >
    >
    >