SMS - Monitoring and Configuration for GRD-MQ

The status and configuration of GRD-MQ equipment can be verified using SMS. It is also possible to modify the configuration with the same system.


The SMS commands supported by the GRDs are detailed below. Every time that the equipment recognizes the command as valid it will respond with another message to the telephone number that sent it. When a configuration command is sent it will respond either that it was applied successfully or that an error occurred.

 

Before starting you must know the password allowing the modification of the configuration of the equipment. The factory configuration disables the password, then this field will be left empty unless it is enabled.

All commands are not case sensitive.

In all messages the separation between words must be exactly one space.

Protection Password

Configuration SMS can be password protected. This password must be added at the end of all the configuration messages.

You can set it and edit it on the "Advanced" section of the MQTT/Connection tab.

pass

 

Verification of the status of the equipment

Status of GSM/GPRS/LINK

Command

Description

STATE o ?

Returns the status of GRDs communications

Note: This command does not require a password.

Returns the current configuration

Command

Description

LIST

Returns the basic equipment configuration, the model and serial number.

Example of a response:

MODEL: GRD3625-MQ-3G / SN: 124 / GPRS: apn/user/password

Note: This command does not require a password.

Signal level

Command

Description

SIGNAL

Signal level

The signal level can vary between -113 dbm and -51 dbm

Note: This command does not require a password.

Versions and IMEI

Command

Description

VERSION

Returns the versions of Hardware, Software and IMEI

Example of a response:

FIRbrokerARE: 1.0 HARDWARE: 1.0 IMEI 123456789123456

Note: This command does not require a password.

GRD-MQ configuration

Modify GPRS parameters

Using this command you can configure the apn, user and password of the GPRS. This command will also enable GPRS if it was disabled

Command

Description

GPRS apn user password [password]

Configures the GPRS service

If the configuration was successful the GRD-MQ will respond “GPRS OK”.

Command

Description

GPRSOFF [password]

Disable GPRS service

If the configuration was successful the GRD-MQ will respond “GPRSOFF OK”.

Modify the MQTT connection configuration

With this command you can change the URL or IP address and the connection port to the broker.

Command

Description

CON URLorIP port [password]

Configures the URL or IP and the connection port to the broker

Where:

Parametro

Description

Value

URLorIP

URL or IP where the broker is located

xxx.xxx.xxx.xxx

port

TCP port in which the broker expects the GRD-MQ connections

[1…65535]

Example: CON 200.89.185.59 1026 password

If the configuration was successful the GRD-MQ will respond “CON OK”.

Client ID, User, Password:

Command

Description                        

MQTTID cid

cid is the Client ID

MQTTUSR usr usr is the MQTT user's name
MQTTPASS pss

psss the MQTT password

The two following commands can be used it the user name or password are to long to fit in a single SMS. The text configured on this messages will be attached to the previous ones.

Command

Description                         

MQTTUSRX usrx

usrx  MQTT user's name continuation

MQTTPASSX pssx

pssx MQTT password continuation

Disconnecting the GRD

Command

Description                    

DISC [password]

This command disconnects the GRD-MQ from the broker preventing a reconnection until the connection is reconfigured.

Modifying the password

Command

Description                   

PASSW newpassword [password]

Modifies the password used by the GRDs for SMS and the connection to the broker

The password can have a maximum of 8 characters and is not case sensitive.

Configuring a new password if you did not have any:

PASSW newpassword

Configuring a new password if you already have one:

PASSW newpassword previouspassword

Erasing the password:

To leave the equipment without a password you must send a message leaving 2 spaces between the command and the previous password.
PASSW  previouspassword

Rebooting the GRD-MQ

Command

Description                   

RESET [password]

Reboots the GRD-MQ

Reading Inputs and Outputs

It's possible to read the value of the channels by SMS

Digital Inputs:

Command

Description                     

GETI [I channel] *

Reads channel I. (Read note*)

GETI [first I channel]…[last I channel] Read several I channels
GETI Reads all I channels (Max. 50 channels in on SMS).

Digital Outputs:

Command

Description                  

GETO [O channel] *

Reads channel O. (Read note*)

GETO [first O channel]…[last O channel] Read several O channels
GETO Reads all O channels (Max. 50 channels in on SMS).

Analog Inputs:

Command

Description                  

GETAN [AN channel] *

Reads channel AN. (Read note*)

GETAN [first AN channel]…[last AN channel] Read several AN channels
GETAN Reads all AN channels (Max. 15 channels in on SMS).

Pulse Inputs:

Command

Description                  

GETPI [PI channel] *

Reads channel PI.

GETPI [first PI channel]…[last PI channel] Read several PI channels
GETPI Reads all PI channels (Max. 15 channels in on SMS).

If you receive three point (...) ending the SMS, it means that more information will be sent on another SMS.

*Note: If you configured an SMS alarm for this channel you will receive the full text you configured. The text will change depending on the state of the I/O. Please read SMS alarms section for further information.

Setting outputs and pulses

You can set an output or pulse channel by sending an SMS to the GRD.

1

This commands can only be sent from the phone numbers added to the GRD-MQ "Phone book". Please read SMS alarms section for further information.

 

Command

Description                     

SETO [O channel] [state]

The O channel will be set to "state"

State can be "ON" or "OFF"

Command

Description                     

SETAN [AN channel] [value]

The AN channel will be set to "value"

Only applies to analog channels mapped to script variables or Modbus queries

Command

Description                     

SETPI [P channel] [value]

The P channel will be set to "value"

The value can be between 0 and 1.000.000.000

Script control

Command

Description                     

STARTSCRIPT [password]

Script interpreter will set to 'run' mode

 

Command

Description                     

STOPSCRIPT [password]

Script interpreter will set to 'stop' mode

2023-06-23