[ENG] 12.8. [DKSF 48.5 IU] How Can I Control The Device using SMS Commands?

The device has an ability to be controlled remotely using SMS commands.

The Syntax of SMS commands

The common format of an SMS command text:

NETPING fff community_w kkkkkk

where:

fff — a code of a command, for example, Р1+ (see below).

community_w — a password which corresponds to SNMP community for recording. It is set on the "SETUP" page of the device web-interface. It is possible to use Latin letters, numbers, the "_" symbol without quotation marks and spaces.

kkkkk —a request identifier (arbitrary number from 3 to 9 digits).  It is repeated in the response to set the correspondence between the request and the response. An optional command element. If the identifier is not in the command, you can not see it in the response.

The text of the command is case insensitive, it is possible to use lowercase and uppercase letters. Command elements are separated by spaces. The characters (symbols) ‘(apostrophe),“ (quotation mark), @ are not allowed. Switching on these characters may cause a firmware failure.  A  command completion is confirmed by a response message (see below).


The codes of commands

The command code is indicated together, without any spaces.

The codes of the commandsThe description
Pn+Switch on the relay n, where n is  the relay number
Pn-Switch off the relay n, where n is  the relay number
P*+Switch on all the relays
P*-Switch off all the relays
PnR

Reboot relay n, where n is the relay number

The polarity (direction) of the relay switching when performing a reset must correspond to that specified in the settings of the "Watchdog2 module (reset mode). If the relay is already in a reset state, the reset command has no effect, although a response notification of successful execution of “NP DONE PnR” will be recieved.

Pn?Request relay state n, where n is  the relay number
P?Request the state of all the relyas in a short form 
S?Request the state of groups of outlets and inputs
Sx=y

 Set the primary input y for the outlet group x, where y is the number of power input: 1 or 2; x - group number of outlets: 1 (outlets 1 ... 4) or 2 (outlets 5 ... 8)

SxB+ Allow input reservation for outlet group x, where x is the number of outlet group: 1 (outlets 1 ... 4) or 2 (outlets 5 ... 8)
SxB-Forbid input reservation for outlet group x, where x is the number of outlet group: 1 (outlets 1 ... 4) or 2 (outlets 5 ... 8)
SxR+Allow automatic return to the primary input for outlet group x, where x is the number of outlet group: 1 (outlets 1 ... 4) or 2 (outlets 5 ... 8)
SxR-Forbid automatic return to the primary input for outlet group x, where x is the number of outlet group: 1 (outlets 1 ... 4) or 2 (outlets 5 ... 8)
SxR

Return to the primary input for outlets group x, where x is the number of outlet group: 1 (outlets 1 ... 4) or 2 (outlets 5 ... 8)

Lm+Set the line m to log. 1, where m is the number of the IO line.
Lm-Set the line m to log.0, where m is the number of the IO line (1...4).
LmPGive an impulse to the line m, where m is the number of the IO line (1...4) 
Lm?Request the state of the line  m, where m is the number of the IO line (1...4)
L?Request the status of all IO lines in a short form.
N?Request the pinger status
KaSend the IR command through the IRC-TR v2 , where a is a number of a command
Tb?Request the values of a Temperature Sensor b, where b - is a number of a Temperature Sensor
Hb?Request the values of a Humidity Sensor, where b - is a number of a Humidity Sensor.
T?Request the values of all connected Temperature Sensors in a short form.The sign of connectivity is a specified 1 wire address. 
H?Request the values of all connected Humidity Sensors in a short form.The sign of connectivity is a specified 1 wire address. 
RB20Reboot the device. The reboot will occur in 20 seconds after receiving a command.


The examples of SMS commamds

Switch on command of the relay of 1 device:

NETPING P1+ SWITCH


Reply messages to SMS commands

Confirmation of the command execution, such as switching a relay or changing a state of a discrete output line:

NP DONE fff kkkkkk

NP DONE fff

where:

ff— is the code of the original command, which execution is confirmed by this message. For example, P1+;

kkkkk — a request identifier (arbitrary number from 3 to 9 digits). It is repeated in the response to establish the correspondence between the request and the response. An optional command element. If the identifier is not in the command, you can not see it in the response.


An error occurred while the device is taking it. Most likely it is the wrong text of the original command:

NP WRONG CMD: «original command»

where:

original command —  the text of the original command fully quoted


 

Wring password (Community) in an original command:

NP WRONG PASSWD IN kkkkkk

NP WRONG PASSWD

where:

kkkkk — a request identifier (arbitrary number from 3 to 9 digits). It is repeated in the response to establish the correspondence between the request and the response. An optional command element. If the identifier is not in the command, you can not see it in the response (the second command).

Ответные сообщения на SMS-команды запроса статуса/состояния

Ответ на запрос (NETPING Lm? kkkkkk) о состоянии IO-линии:

Response Messages to Status / State Request SMS Commands

 Response to the request (NETPING Lm? kkkkkk)  about the IO line state:

NP REPLY Lm=lvl kkkkkk

where:

  • m — number of the line
  • lvl — log.level

Response to the request L? about the state of all the IO lines

NP REPLY L1=lvl L2=lvl L3=lvl L4=lvl

where lvl — log. level.

 Response to the request Pn? about the relay status

NP REPLY Pnstatus

where:

  • status — the status of the relay : «+» (on), «-» (off);
  • n — number of the relay. 

Response to the request Pn? about all the relays status:

NP REPLY P1b P2b P3b P4b P5b P6b P7b P8b

where:

— th state of the relay: «+» (on), «-» (off).

Response to the request S? about the state of the inputs

NP REPLY S1(1..4)=in1 B+ R+ S2(5..8)=in2 B+ R- AC1+ AC2+

where:

  • S1, S2 — groups of outlets ;
  • in1, in2 — input from which the group of outlets is currently powered;
  • B+|B- «+» or «-»  means whether reservation of input for a group is allowed or not;
  • R+|R- «+» or «-» means whether the auto-return of the group to the primary input is allowed or forbidden;
  • AC1+|AC2+ «+» or «-» means the availability of voltage at inputs 1 and 2.

Response to the request N?

NP REPLY N=status (address)

where:

  • status — the pinger status, 0 — silent, 1 — responding
  • address — The IP or domain name of the polled host

Response to the request Tb?

NP REPLY Tb? SENSOR FAILED — failed or disconnected

NP REPLY Tb=tC status SAFE RANGE (t1...t2C) — response about sensor readings with status indication. 

 where:

  • b — number of temperature sensor;
  • tC — current temperature readings, °C;
  • status — temperature sensor status: «BELOW», «IN» or «ABOVE»;
  • (t1..t2C) — normal range.


Response to the request Hb?

NP REPLY Hb? SENSOR FAILED —  failed or disconnected

NP REPLY Hb=h%status SAFE RANGE (h1..h2) T=tCstatus SAFE RANGE (t1...t2—response about sensor readings with status indication. 

where:

  • h% — current reading of relative humidity, в %;
  • tC — current reading of temperature, в °C;
  • status  reading sensor status: «BELOW», «IN» or «ABOVE»;
  • h1..h2 — range of normal humidity;
  • t1..t2 — range of normal temperature.