Tutorial 9 — alarms and messaging
Part 2 — Tutorials. Continues the project from Tutorial 8.
What you will build
A leak detector that sends you a text message
An alarm group that reacts when any of its inputs trips
Control of the building by sending it an SMS
13.1 Two separate things
They get confused, so be clear about which you need:
Alarm groups
Messaging
What
inputs watched together, with alarm states
SMS, calls, email out of the building
Needs
nothing extra
a GSM3-01M module
Set up in
Group manager
Communication centrum
You can use either alone. Together they make "the cellar flooded, tell me now".
Neither is a certified security system. The EZS module (elektronická zabezpečovací signalizace — electronic security system) is the proper alarm subsystem, with zones, arming and tamper detection. This tutorial covers the general-purpose alarm and messaging features. For a real intruder alarm, see the Rev19 installation manual, chapter 11.
13.2 Alarm groups
An Alarm group holds digital inputs — as opposed to a Digital group, which holds outputs. Its members are watched together, and any of them can raise the alarm.
Define it
Managers → Group manager → Add.
Unicate name:
WATER_LEAK, TypeAlarm.✓.
Fill it
Groups workspace tab → drag out a group icon → assign it
WATER_LEAK.Click the icon so it turns blue.
Click each leak-sensor input to add it.
Only digital inputs will join — an output will refuse.
Alarm actions and functions
Alarm_Activated
the alarm becomes active
Alarm_Deactivated
it is switched off
Alarm_Alert
a member trips while active
Alarm_Refeshed
it is refreshed
Alarm_Changed
its state changes
Alarm activate
arm it
Alarm deactivate
disarm it
Alarm refresh
refresh it
Alarm disturb
signal a disturbance
Alarm test
test it
Some functions take an Alarm secure group parameter naming the group to act on.
The action
Alarm_Refeshedis missing an "r". That is what appears on screen in this version. The function is spelled correctly asAlarm refresh— the two differ, so do not go looking for a consistent spelling.
Wire it
Add connection → drag the
WATER_LEAKgroup → a valve output or a siren.Wire manager → +: Action
Alarm_Alert, User functionDIGITAL_ON.
Any sensor in the group now shuts the water off.
13.3 Add the GSM module
Everything below needs a GSM3-01M with a working SIM.
Project → Device manager → select the central unit → New slave.
Choose GSM3-01M → OK. Address it and describe it.
Close and save.
Up to three GSM3-01M modules are allowed per project.
13.4 Communication centrum
Managers → Communication centrum. Three tabs.
Contacts — do this first
Nothing sends anything until a phone number exists and is bound to a GSM unit.
Open the Contacts tab.
Click the green button to add a number. (The red one removes.)
In Value:, type the number in international format —
+420xxxyyyyyy.Person: shows the name if this number came from the Persons manager.
Click the red plug icon next to GSM: and choose a GSM unit.
The plug must turn green. A red plug means the number is not bound to a GSM unit, and nothing will be sent or received on it. This is the single most common reason messaging silently does nothing.
Confirm with ✓ at the top right.
Removing a number here removes it everywhere it was used — outgoing texts, incoming and outgoing calls.
Items — the messages themselves
Income SMS
32
text patterns to recognise on arrival
Outcome SMS
32
texts you send, each with up to 8 numbers
Income call
8
one number each; a dropped call sets an input
Outcome call
8
one number each; dials for 20 s
Text length is limited to 32 characters in both directions.
Send a text when the cellar floods
Items tab → expand Outcome SMS → click a free slot.
In SMS text, type
CELLAR WATER LEAK.In Phones:, add the number — up to 8 per message, all in international format.
Assign the GSM: unit if it is not already green.
✓ to confirm.
Then wire it:
Design tab → place an output icon → Connect it to that
SMS OUTdevice → name itSMS cellar leak.Function tab → Add connection → drag the
WATER_LEAKgroup →SMS cellar leak.Wire manager → +: Action
Alarm_Alert, User functionGSM send SMS(define it in Function manager — Function typeSystem).Save, upload.
Setting the SMS OUT device to ON sends the message.
Test with a real phone before you leave site. Messaging depends on the SIM, the signal, and the contact binding — none of which the Simulation tab can check.
React to an incoming text
An Income SMS slot holds a text to match. When a message arrives:
the text is compared with your SMS IN entry
the sender must be in Contacts with a GSM unit assigned
on a match, the
SMS INdevice goes ON for one second
So: create an Income SMS entry HEATING ON, place its SMS IN device on the plan, and wire its Digital IN switch ON to HEATING_COOLING_SWITCH_TO_FAVORITE4. Now texting the house turns the heating up.
One second is all you get. Use the pulse to set a system bit if the state needs to persist — see Tutorial 8.
Calls
A drop call is a cheap signal — it costs nothing and needs no text.
Income call
CALL IN is ON for the duration of the call from that number
Outcome call
setting CALL OUT to ON dials that number for 20 seconds
One number per slot, eight slots each.
GSM actions: GSM income call, GSM end income call, GSM outcome call, GSM end outcome call, GSM income SMS, GSM end income SMS, GSM outcome SMS, GSM end outcome SMS. Functions: GSM send SMS, GSM short call.
Notices
The Notices tab lists Income SMS, Outcome SMS, Income call and Outcome call traffic — the first place to look when messaging is not behaving.
13.5 Email
There is an Email outcome email action and an EmailOUT device type, so the CU can send email as well as SMS.
13.6 A useful pattern: alarm with acknowledgement
Combining this chapter with the last one:
1
leak group Alarm_Alert → water valve, DIGITAL_OFF
shut the water off
2
leak group Alarm_Alert → SMS OUT, GSM send SMS
tell somebody
3
leak group Alarm_Alert → system bit, System bit set bit
remember that it happened
4
SMS IN "OK" → system bit, System bit null bit
acknowledge by replying
5
system bit System bit true → siren, DIGITAL_ON
keep signalling until acknowledged
Five wires, and the building now handles a leak by itself and keeps complaining until someone responds.
What you learned
Alarm groups hold inputs; Digital and Analog groups hold outputs
Messaging needs a GSM3-01M, and every number must be bound to it — the plug must be green
Numbers are always in international format; texts are limited to 32 characters
Incoming SMS gives you a one-second pulse — latch it into a system bit if you need it to last
Drop calls are a free signal in both directions
The Notices tab is your messaging log
Try this before moving on
Text yourself when the front door opens while
HOLIDAY_MODEis on — one wire, one condition.Set up an incoming text that puts the whole house into holiday mode.
Use an outgoing drop call instead of an SMS and compare which you notice faster.
Next: Chapter 14 — Tutorial 10: reuse your work — macros and function blocks.