Alphatech GRL 4G Assembly instructions

4G GSM relay controlled via SMS

1
GRL 4G
Installation and programming manual v3.1
from fw 204
The device is designed to remotely control 2 separate relays
and send notification SMS or call stored voice messages when
changing the status of 4 inputs (input on/off).

2
Basic technical parameters:
Power supply 9 to 24 VDC, 500 mA
GSM networks 2G bands B3, B8
4G bands B1, B3, B7, B8, B20, B28A
Outputs 2x switching relay 1 A / 30VDC (60Vmax)
(galvanically isolated)
Inputs: 4x 0/5V inputs, short-circuit activation
Dimension: 131 x 111 x 38.5 mm
Basic features:
•Replaceable backup battery
•Simple installation and setup (in the basic settings, you
only need to store one phone number on the SIM card)
•After changing the input status, sending SMS to up to 7
numbers (PORTOPN1-7 and PORTCLS1-7) stored on
the SIM card and simultaneously calling up to 7 phone
numbers (PORTCALL1-7) also stored on the SIM card.
•Separate SMS text message for each state of each
input (i.e. 8 different SMS text messages)
•Separate voice messages for each state of each input
(i.e. 8 different voice messages)
•It is possible to set the relay states after switching on
(relay open, closed, remember the last state before
switching off)
•Possibility to remotely determine the current status of
both relays, all inputs, temperature and power supply of
the device via SMS text message.
•After calling the device, you can listen to a voice
message with the current status of both relays and all
inputs.
•Ringing can be used to control relay switching similarly
as with the Alphatech GSM Door Intercom or the
Alphatech GSM Key devices.

3
•The device can only be controlled and programmed
from the numbers stored on the SIM card which is
inside the device.
•You can work without or with the PIN code –automatic
generation of random PIN code for the inserted SIM
card.
•SMS control of up to 7 slave GRL4G devices from the
master GRL4G device, or mutual control in a cascade.

4
Commissioning:
•If you wish to program the parameters directly to the SIM
card by saving the numbers from any mobile phone, insert
that SIM card into this mobile phone and program the SIM
card.
•Turn off the PIN on the SIM card or set the PIN code to
0000 (see chapter SIM PIN). Insert the programmed (see
previous point) or unprogrammed SIM card into the hole
inside the device (see the figure below) and press it to
secure the SIM card.
•If you have a backup battery installed, leave its switch in
the down position (off).
•Connect the antenna.
•Connect the power.
•The blue power (PWR) LED lights up, flashes or the BAT
LED lights up (see below).
•Within about 4 seconds, the yellow GSM LED lights up.
•During the next 30 sec. the GSM network will be logged in
(yellow LED flashes, see the table later in the manual) and
relays will be switched on (see RLxSTAT settings in the
table later in the manual)
•The device is ready for operation.

5
SIM PIN
If you wish to operate the device with a SIM card without a PIN
code, turn off the SIM PIN code (in any type of a mobile phone)
before inserting the SIM card into the device.
If you wish to operate the device with a SIM card with a PIN
code, set the PIN code to 0000 on the SIM card using any type
of a mobile phone before inserting the SIM card into the device.
The GRL4G device, after inserting a SIM card with such a PIN
code changes itself the PIN code to another PIN code, it´s
derived from the GSM module.
•Each GRL4G has its own unique PIN code (within a 4-
digit number, of course)
•If you wish to use this SIM card in another device, you
need to know the PIN2 code from this SIM card. As you
do not know the real PIN code, you will need the PIN2
code to set a new PIN code (for example again to 0000,
for use in another GRL4G) –working with PIN/PIN2 code
does not affect the saved data and settings. These
remain on the SIM card.
•ATTENTION! When inserting a SIM card with a PIN
code other than 0000, the device will not work! The
only exception is when you insert the SIM card that has
a PIN code set corresponding to the unique number of
the GSM module. So, if you remove the SIM card after
turning off the GRL4G device and insert it into the same
GRL4G device again, the GRL4G device will continue to
work without changing the PIN code.

6
antenna
SIM slot
BAT (green) –indication of battery
Backup battery switch
normally closed
normally open
Common
REL1
REL2
Power supply 9-24 Vdc
GND+
+INPUT1
GND
+INPUT2
normally open
Common
normally closed
+INPUT3
GND
+INPUT4
PWR (Blue) - power indication
GSM (yellow) –operation indication
IN1-IN4 (Red) –input indication
RL1 (putting green) - REL1 status
inz
RL2 (putting green) - REL2 status
indication

7
Example of wiring:
Sending SMS SET REL1 ON turns on the light
When the level rises, the sensor switches on the IN1 input and
the device sends an SMS "P1 closed" (or another agreed SMS
–e.g. "The level is above normal").
By sending SMS SET REL2 ON, the pump is switched on. After
the level drops, the sensor opens the IN1 input and the device
sends an SMS "P1 OPEN" (or, for example, "Level in normal".
By sending SMS SET REL2 OFF the pump switches off again.
-12V+

8
LED signaling on the GRL4G device
Blue LED
(PWR)
Continuous light
Continuous light –LED only
glows/shines
Off
Yellow LED
(GSM)
Continuous light
Blinking alternates for 1 sec.
▌▌▌ ▌▌▌
|| || || || || ||
1 to 5 short double flashes
Flickering long light, short gap
Flickering shorter light, short gap
▌▌
Short blink every 9 sec.
▌▌▌▌▌▌▌▌▌▌
Fast short flashing
Green LED
(REL1, REL2)
Continuous light
Off
Red LEDs
(IN1, IN2, IN3,
IN4)
Continuous light
Off
Green LED
(BAT)
Blinking alternates for 1 sec
Continuous light

9
Programming the GRL4G parameters via SMS text
message
For security reasons, GRL parameters can only be set from
numbers stored on the SIM card under the names ADMIN1 to
ADMIN9.
SMS messages are always WRITTEN IN LARGE LETTERS
Individual SMS elements are always separated by a space
(words). The first word is always a command. The next word(s)
is one or more parameters.
Ex: INIT ADMIN1 +420123456789
All commands are in the appropriate table at the end of the
manual.
1. During the first setup, when the SIM card does not contain
any of the ADMINx names, it is necessary to enter such a
number on the SIM card using an SMS with the INIT
command. The SMS can be sent from any number. If the
SIM card already contains at least one number with the
name ADMINx, the command will not be executed.
2. If you need to control the relay, or set GRL from other
ADMIN numbers: From the mobile phone with the ADMINx
number, send an SMS with the numbers of other ADMINs
to GRL4G in the form: WRITE ADMIN2 +420xxxxxxxxx
(WRITE ADMIN3... etc.)
3. From the mobile phone with the ADMINx number, send
SMS text messages gradually to the GRL4G device. Send
SMS text messages with the numbers to which SMS
should be sent when the status changes on the inputs in the
form: WRITE PORTOPN1 +420xxxxxxxxx (WRITE
PORTOPN2... etc.)
4. If the default parameters are not suitable, set the GRL
parameters (see the table later in the manual). You can
set the parameters individually, for each parameter by a
separate SMS. If you need to set more parameters at the

10
same time, we recommend using SMS for a bulk setup.
Using the "READ PAR" SMS, you can first load and read
the current values of all parameters into your mobile phone.
Use the SMS editor to change the word READ to WRITE in
the received SMS and edit the parameter values according
to the requirements (rows with parameters that you do not
change can be kept or deleted). Send the edited SMS
message back to the GRL4G device as a reply. The
parameters will be set.
SMS command table
Command ( SMS)
Function
Def.
SMS can be sent only from ADMINx numbers
READ ARTICLE
GRL4G status reading (version,
temperature, relay states, input states,
etc.)
READ PAR
Read all adjustable parameters
READ DEVICE
Read the saved device name
READ CALLOPN
Reading of listed inputs, when
disconnected, the preset PORTCALL
numbers 1-7 will be called
1234
READ CALLCLS
Reading of listed inputs, when switched
on, the preset numbers PORTCALL1-7
will be called
1234
READ NAME
Read the phone number for NAME
CLR NAME
Delete a phone number for a NAME
INIT ADMIN1 +420cc... c
Initialization –first GRL4G setting –
parameters can be programmed from
ADMIN1 +420cc... c
SET REL1 ON [xx]
Switching on the relay 1 permanently or
for [xx] minutes
xx: 00-99
SET REL1 OFF
Switching off relay 1
SET REL2 ON [xx]
Switching on the relay 2 permanently or
for [xx] minutes
xx: 00-99
SET REL2 OFF
Switching off relay 2
WRITE PAR INCALL:x
Incoming call processing: x:
0 - calls rejected (ringing)
1- received calls only from SIM
2 –all calls received
0
WRITE PAR WRCALL:x
Sending SMS with the numbers from
which it was opened
0

11
0 - disabled
1 - activated
WRITE PAR TMGSM:x
Set time according to GSM network x:
0 –off
1 - On
1
WRITE PAR WAIT:xx
Waiting for the next number in the list to
be dialed
xx –10 to 90 seconds (in dozens)
2
WRITE PAR RL1MOD:x
Relay mode1
x=0 - SMS control
x=1 - switch mode (by ringing from
numbers to SIM)
x=2 –camera mode (switches on by
picking up, opens by hanging)
x=3 –lighting mode (switches on by
picking up, remains closed for
"switching time" after hanging up
x=4 –switches to "switching time" after
activation of input IN1
x=5 –extra switch mode (by ringing from
any number)
WRITE PAR RL1TMON:yy
Relay actuation time1 after yy seconds
yy=00-99
04
WRITE PAR RL2MOD:x
Relay mode2
x=0 - SMS control
x=1 - switch mode (by ringing from
numbers to SIM)
x=2 –camera mode (switches on by
picking up, opens by hanging)
x=3 –lighting mode (switches on by
picking up, remains closed for
"switching time" after hanging up
x=4 –switches to "switching time" after
activation of input IN2
x=5 –extra switch mode (by ringing from
any number)
WRITE PAR RL2TMON:yy
Relay actuation time2 after ringing or
when activated by code yy seconds
yy=00-99
04
WRITE DEVICE xxxxx-yyyyy
writing the name of the device, which then
appears in the sent SMS with the input
status
xxxx-yyyy is the device name without
spaces and letters with hooks or commas
WRITE CALLOPN xxxx
Writing of listed inputs, when
disconnected will be called to preset
numbers PORTCALL1-7
1234

12
xxxx –series of numbers 1234 (see
example)
if xxxx=# will not call from any input
WRITE CALLCLS xxxx
Writing of listed inputs, when switched on
it will be called to preset numbers
PORTCALL1-7
xxxx –series of numbers 1234 (see
example)
if xxxx=# will not call from any input
1234
WRITE PORTCALL1 yyyy
Writing the first yyyy phone number from
the PORTCALLx series for calling when
the status of any of the inputs changes
WRITE SMS IN1OPN aaaaa
Text input aaaaa for notification SMS
when input 1 is disconnected (max. 50
characters)
WRITE SMS IN1CLS aaaaa
Text input aaaaa for notification SMS
when input 1 is switched on (max. 50
characters)
WRITE SMS IN2OPN aaaaa
Text input aaaaa for notification SMS
when input 2 is disconnected (max. 50
characters)
WRITE SMS IN2CLS aaaaa
Text input aaaaa for notification SMS
when input 2 is switched on (max. 50
characters)
WRITE SMS IN3OPN aaaaa
Text input aaaaa for notification SMS
when input 3 is disconnected (max. 50
characters)
WRITE SMS IN3CLS aaaaa
Text input aaaaa for notification SMS
when input 3 is switched on (max. 50
characters)
WRITE SMS IN4OPN aaaaa
Text input aaaaa for notification SMS
when input 4 is disconnected (max. 50
characters)
WRITE SMS IN4CLS aaaaa
Text input aaaaa for notification SMS
when input 4 is switched on (max. 50
characters)
Command types:
READ –command for reading parameters, phone numbers
from the SIM card or device memory
CLR - Command to delete phone numbers from the SIM card.
ATTENTION! If you use the SMS to delete numbers, at least
1 ADMINx number must remain in the system –otherwise it is

13
no longer possible to program the device remotely (it is
necessary to perform a new initialization).
INIT –Initialization. During the first setup, when the SIM does
not contain any of the ADMINx names, it is necessary to enter
such a number on the SIM card using an SMS with the INIT
command. The SMS can be sent from any number. If the SIM
card already contains at least one number with the name
ADMINx, the command will not be executed.
SET –command for setting the relay status (on/off)
WRITE –command for writing parameters and phone numbers
on the SIM card

14
The meaning of the names stored in the SIM card phonebook
name
Activity
PORTOPN1
- sends GRL4G SMS assigned to "INxOPN" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTOPN2
- sends GRL4G SMS assigned to "INxOPN" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTOPN3
- sends GRL4G SMS assigned to "INxOPN" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTOPN4
- sends GRL4G SMS assigned to "INxOPN" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTOPN5
- sends GRL4G SMS assigned to "INxOPN" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTOPN6
- sends GRL4G SMS assigned to "INxOPN" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTOPN7
- sends GRL4G SMS assigned to "INxOPN" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTCLS1
- sends GRL4G SMS assigned to "IN x CLS" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTCLS2
- sends GRL4G SMS assigned to "INxCLS" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTCLS3
- sends GRL4G SMS assigned to "INxCLS" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTCLS4
- sends GRL4G SMS assigned to "INxCLS" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTCLS5
- sends GRL4G SMS assigned to "INxCLS" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTCLS6
- sends GRL4G SMS assigned to "INxCLS" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTCLS7
- sends GRL4G SMS assigned to "INxCLS" when the input
state is changed to disconnected (x = 1,2,3,4)
PORTCALL1
GRL4G calls the number when the status of any of the inputs
changes (if the call is enabled in CALLOPN or CALLCLS)
- switch relay 1 and relay 2 by ringing
- calls are automatically received from the number
PORTCALL2
GRL4G calls the number if the number under PORTCALL1 is
unavailable, occupied, does not answer the call for a long
time
- switch relay 1 and relay 2 by ringing
- calls are automatically received from the number

15
PORTCALL3
GRL4G calls the number if the number under PORTCALL2
is unavailable, occupied, does not answer the call for a long
time
- switch relay 1 and relay 2 by ringing
- calls are automatically received from the number
PORTCALL4
GRL4G calls the number if the number under PORTCALL3
is unavailable, occupied, does not answer the call for a long
time
- switch relay 1 and relay 2 by ringing
- calls are automatically received from the number
PORTCALL5
GRL4G calls the number if the number under PORTCALL4
is unavailable, occupied, does not answer the call for a long
time
- switch relay 1 and relay 2 by ringing
- calls are automatically received from the number
PORTCALL6
GRL4G calls the number if the number under PORTCALL5
is unavailable, occupied, does not answer the call for a long
time
- switch relay 1 and relay 2 by ringing
- calls are automatically received from the number
PORTCALL7
GRL4G calls the number if the number under PORTCALL6
is unavailable, occupied, does not answer the call for a long
time
- switch relay 1 and relay 2 by ringing
- calls are automatically received from the number
ADMIN1 to
ADMIN7
- SMS to switch relay 1 and relay 2
- SMS to read status and numbers in the phone book
- use SMS to edit numbers and names on the SIM card
- use SMS to set parameters, device name and content of alarm
SMS
CALLOPN
listed inputs whose disconnection will call the preset
PORTCALLnumbers 1-7
CALLCLS
listed inputs that will be switched on to preset PORTCALLnumbers
1-7
VER
- version of fw in GRL4G –information only –do not edit!
PARGRL
- GRL4G parameters –informational only –do not edit!
PARRL1
- parameters for relay 1 –information only –do not edit!
PARRL2
- parameters for relay 2 –information only –do not edit!
TINPMIN
-Do not adjust the reaction times of individual inputs -
information only –do not edit!
Names with numbers can also be saved in the phone book on
the SIM card using any type of a mobile phone (follow the

16
instructions for your mobile phone). All names listed in the
table (PORTOPN x, PORTCLSx, ADMINx, PARGRL,
PARRL1, PARRL2 ...). It must be written in capital letters.
There must be no space between names and order
numbers (e.g., PORTOPN1).

17
Examples of SMS communication with GRL4G
Example of setting the device name to "demo"
WRITE DEVICE demo
GRL Response:
WRITE DEVICE: OK
GRL response to SMS "READ STAT" (DEVICE=demo)
READ STATUS:
demo:
VER: 204
BATTERY:4030mV
PWR: 12.3V
TIME: 22/12/1 0.14:59
OPER: Vodafone CZ
TEMP: 28C
IN1: OPEN
IN2: OPEN
IN3: OPEN
IN4: OPEN
RL1: ON
RL1: OFF
If you wish to program some GRL4Gs parameters via SMS,
we recommend that you first send the command to read the
parameters: "READ PAR"
GRL response to SMS "READ PAR"
READ PAR:
RL1STAT:2
RL2STAT:2
TIN1:0001
TIN2:0001
TIN3:0004
TIN4:0004
Then just edit the received SMS –"READ" to "WRITE", edit
the necessary parameter values and send the modified SMS
back as a reply. In the reply, the GRL4G will only indicate the
groups of parameters that have been edited. ATTENTION!
The length of the entire message must not exceed 1 SMS
message (140 characters of a standard ASCII SMS)

18
WRITE PAR:
RL1STAT:2
RL2STAT:2
TIN1:0001
TIN2:0001
TIN3:0 0 10
TIN4:0 0 20
GRL4G Response:
WRITE PAR:
TIN1:0001
TIN2:0001
TIN3:0 0 10
TIN4:0 0 20
Example of SMS for setting GRL4G parameters
WRITE PAR:
RL1STAT:0
TIN4:0005
Example of CMM for switching REL1
SET REL1 ON
GRL4G Response:
SET REL1: OK
Example of wrong SMS for switching REL1
SET RL1 ON
GRL4G Response:
SET RL1: ERROR
Example of setting up notification SMS for input IN1
WRITE SMS IN1CLS Water in a container!
GRL4G Response:
WRITE SMS: OK
ATTENTION! The set SMS message must be without
national characters (hooks, commas)! The length of the

19
text of the programmed notification SMS message is max.
50 characters!
Example of sent SMS message when switching on IN1
(default SMS= "Water in container!", name DEVICE=
"demo"):
demo: Water in a container!
Example of setting calls when inputs 1 and 2 are switched
on only. No calls when any input is disconnected.
WRITE CALLCLS 12
GRL4G Reply:
WRITE CALLCLS: OK
WRITE CALLOPN #
GRL4G Reply:
WRITE CALLOPN: OK
Determine which inputs the GRL4G will reply to by calling
when they are switched on
READ CALLCLS
GRL4G Reply:
READ CALLCLS: 12
Table of contents