[DKSF 70.3] Page SMS web interface

It is possible to configure different actions for a GSM module in an SMS menu, with the aim to react to various events.

Destination Phone Number for SMS - here phone numbers are indicated, to which SMS will be sent. A number is represented in a certain format: a country code - an operator's code - a client's number.

USSD Command for request of GSM account status - is a code, to which an USSD command to request a balance will be sent.

Log communication with a GSM modem - information on all commands which are interchanged between CPU and GSM-modem is represented on the page "Logfile".

Registration in a GSM network - a status of a registration in a GSM network is represented here

GSM Signal Strength - a signal strength is indicated

Reply to the USSD Command of a Status Request - the amount of money on the account is shown. It works due to sending a USSD command.

In the section "Pinger" it is possible to configure checking an address availability of a network loop via an IP address (checking IP address of a network) as well as a checking interval (Interval check, p (30-9999)). In case it is unavailable, an SMS message will be sent to the numbers indicated above.

In the section "Events for sending an SMS-notification" it is possible to configure sending SMS-notifications to phone numbers if the following events happen: turning on/turning off a link of an Ethernet interface; a watchdog triggering, turning on/turning off a relay; losing/restoring a connection with indicated IP (pinger); rise/fall of a logic level on an IO line IO 1..4; changing a temperature sensor status 1..8.

In the section "Daily sending of sensors and IO statuses" it is possible to adjust time of sending of statuses of all sensors, connected to equipment via cellphones. Time is adjusted in the format HH.MM

In the section "Modem troubleshooting", the last error of a modem is specified. In addition, there is a button "Restart GSM", which reboots a module.

SMS Notifications

A maximum length of SMS messages cannot exceed 140 characters. Cyrillic characters are not supported in SMS messages.

SMS notification looks like the following: np_name (q) information, where:

np_name - is a name of a device to identify SMS messages, up to 30 Latin characters. It is specified at the page of SMS configuration. If it is not specified (empty), then a name NETPING is used.

q -  is a sequential number of a message. It is nonvolatile and is not reset when a powre supply is cut off. It is used to register missed (lost) messages.

Information - is an informational part of a message (see below).

 

An informational part of SMS notifications, which are sent by a NetPing device when there are certain events looks like the following:

TEMP.SENSOR label” IS FAILED

A failure notification of a temperature sensor (a sensor stopped responding when it is pinged).

j                               a number of a temperature sensor, 1..8

label                      a label of a temperature sensor, which is specified in the fields “Memo” a the page of temperature sensors configuration. It is quoted in the text of a message. If a label is not set (empty), then it is not included into an SMS. Cyrillic characters are displayed in ‘?’

 

TEMP.SENSOR label” IS OUT OF RANGE (t1 TO t2), NOW tC

A notification about a temperature left the thresholds of a specified range at the web page of temperature sensors configuration.

t                              current temperature, degrees С

t1, t2                      thresholds of normal range, degrees С

j                               temperature sensor number, 1..8

label                      temperature sensor label, which is specified in the fields “Memo” at the page of temperature sensor configuration. It is quoted in the text of a message. If a label is not specified (empty), then it is not included into SMS. Cyrillic characters are displayed by ‘?’

 

PWR label” SWITCHED ON|OFF

 

A message about turning on - turning off a built-in relay through a web interface or SNMP

n                             a relay number - 1

label                      a relay label is quoted. If a label is not specified (empty), then it is not included into SMS. Cyrillyc characters are displayed by ‘?’’

 

ETHERNET LINK STATUS: 1 UP|DOWN, 2 UP/DOWN

 

Messages about changing a status of Ethernet ports of a device (a device has a built-in 3-port switch with two external ports and one internal one, to which a CPU is connected)

 

PINGER STATUS: OK|FAILED

 

A message about breaking and restoring A connection with a specified IP address (see “Pinger”).

 

IO LINE n "label" NOW IS ON|OFF

 

A message about changing a status of an IO line.

n                             an IO line number

label                a name of an IO line is specified at the page INPUT-OUTPUT

 

SMS Commands

A device has a feature of a remote monitoring using SMS messages.

A general format of a text of an SMS command NETPING fff community_w kkkkkk , where:

 

fff - Command code, for example, Р1+ (see below).

 

community_w is a password that corresponds an SNMP community for write. It is specified at the page “Settings” of a web interface. It is possible to use Latin letters, numbers, _, without quotes and spaces.

 

kkkkk  is an identifier of a request (a random number from 3 to 9 digits). It is repeated in a response for setting a correspondence between a request and a response. It is a necessary element of a command. If there is no identifier in a command, there is no identifier in a response.

A text of a command is case-insensitive, hence it is possible to use lowercase and uppercase letters. Elements of a command are separated by spaces. Using such characters as ‘ (apostrophe), “ (quote), @ is not allowed. Using these characters can cause a failure of firmware. Fulfilling a command is confirmed by a response message (see below).

 

Command Codes

A code of a command is indicated as a solid word, with no spaces.

Command Code
Description
Pn+Turn on a relay n, where n is a relay number
Pn-Turn off a relay n, where n is a relay number
PnR

Reload a relay n, where n is a relay number

 

Polarity (direction) of switching a relay when resetting must correspond to a specified one in settings of a module «Watchdog» (reset mode). If a relay is already in a reset mode, a command to reset has no impact, however a response notification about a successful performing «NP DONE PnR» will be sent to a sender.

PnLSwitch a relay n under a control of a Logic module, where - n is a relay number
Pn?Request a status of a relay n, where n is a relay number
P?Request a status of all relays in a brief form
Lm+Switch a line m into a status logic 1, where m is a number of an IO line (1..8)
Lm-Switch a line m into a status logic 0, where m is a number of an IO line (1..8)
LmPIssue a pulse to the line m, where m is a number of an IO line (1..8)
Lm?Request a status of a line m, where m is a number of an IO line (1..8)
L?Request a status of all IO lines in a brief form
N?Request a status of a pinger
KaTransfer an IR command through a module IRC-TRv2, where a is a number of a command
Tb?Request readings of a temperature sensor b, where b is a number of a temperature sensor

Examples of SMS Commands

A command of turning on a relay 1 of a device:

netping P1+ SWITCH

A command of turning off a relay 2 of a device:

netping P2- SWITCH



 

Response Messages to an SMS Command

NP DONE fff kkkkkk

Confirmation of fulfilling a command, such as switching a relay or chaning a status of a descrete output line. fff - is a code of an outcoming command, fulfilling of which is confirmed by a certain message, for example, Р1+

 

NP WRONG CMD: “outgoing command

An error while a device reads a command. Most probably, a text of an outgoing command is incorrect. “an outgoing line” - is a text of an outgoing command taken in quotes, totally.

 

NP WRONG PASSWD IN kkkkkk

 

Wrong password (Community) in an outgoing command.

 

NP REPLY L1=0 kkkkkk

A repsonse to a request about a line status IO (NETPING Lm? kkkkkk). Value of L1=0 is given for an example. Before a characger ‘=’ there is a number of a line, after a character ‘=’ there is a logic level of a line.

 

NP REPLY L1=0 L2=1 kkkkkk

A response to a request of a status of an IO line, if a number of a line is missing in a request (L?). Values L1=0 L2=0 are given as an example.

 

NP REPLY P1+ (0 RESETS, 0 REP.RESETS) kkkkkk

 

A response to a request about a relay status (NETPING Pn? kkkkkk). P1+ - is relay status. Specific values of a status are given as an example. A relay status is encoded by the characters + (turned on),- (turned off),L (Controlled by a logic). In parentheses, there is a common reset counter and a counter of repeated unsuccessful resets, initiated by a Watchdog.

NP REPLY P1+ kkkkkk

A response to a request about a relay status, if a number of a relay is missed in a request (NETPING P? kkkkkk). P1+  - is a relay status. Specific values of a status are given as an example. A relay status is encoded the same as in an SMS command of a relay management. Reset counters are not uncluded into a response.

 

NP REPLY N=1 kkkkkk

A response to a request about a status of a pinger, which is built into a module SMS (NETPING N? kkkkkk).

N=1 – a specified IP address responds, N=0 – it is silent.

 

NP REPLY Tn? SENSOR FAILED kkkkkk

A response to a request about readings of a temperature sensor. A sensor with a number n failed or is not connected.

 

NP REPLY Tn=tC BELOW/IN/ABOVE SAFE RANGE (10..60C) kkkkkk

A response to a request about readings of a temperature sensor.

tC – are current readings of a temperature sensor.

BELOW/IN/ABOVE SAFE RANGE (10..60C) – is a status of a sensor (a position of readings regarding a normal range)

 

NP REPLY H=? SENSOR FAILED kkkkkk

A response to a request about readings of a humidity sensor. A humidity sensor is malfunctioning or not connected).

 

NP REPLY H=hum% BELOW/IN/ABOVE SAFE RANGE (10..60%) NP REPLY T4=26C

hum – current readings of a humidity sensor

BELOW/IN/ABOVE SAFE RANGE – is a status of a sensor (a position of readings regarding a relatively normal range)