alerts.add
alerts.add

alerts.add

This command is used to configure the ZebraNet Alert System. It allows Zebra software to add new alerts without having to use the ZPL
^SX
command. This allows the software to configure printers that do not have ZPL on them, and it provides the software with a single way to configure alerts. It also allows the software to configure alerts via local ports such as USB and serial.
The format is similar to the
^SX
command. It can delete the alert when both the set and clear flags are set to
FALSE
.

Setvar

This command instructs the printer to add the new alert with the configuration specified in the comma-delimited list.
To configure the ZebraNet Alert system:
! U1 setvar "alerts.add" "[condition],[destination],[set],[clear], [destination_address],[port],[quelling],[SGD_name]"
Parameters
  • The alert condition. This can be any of the values returned from
    alerts.conditions
    .
  • The alert destination type. This can be any of the values returned from
    alerts.destinations
    .
  • On Set - Set to
    Y
    if the alert should be sent when the event is set.
  • On Clear - Set to
    Y
    if the alert should be sent when the event is cleared.
  • Destination address - applies to TCP, UDP, EMAIL, SNMP, SDK, MQTT, and HTTP POST destination types. The maximum length of this address is 255 characters.
  • Port - Applies to TCP and UDP types.
  • Quelling - When set to
    Y
    it prevents the alert from being sent.
    N
    is the default.
  • SGD Name - the name of the SGD command to be added. This is valid only when the alert condition is
    SGD_SET
    .
Values
Defined via
alerts.conditions
: PAPER OUT, RIBBON OUT, HEAD TOO HOT, HEAD COLD, HEAD OPEN, SUPPLY TOO HOT, RIBBON IN, REWIND, CUTTER JAM, MED, PRINTER PAUSED, PQ JOB COMPLETED, LABEL READY, HEAD ELEMENT BAD, BASIC RUNTIME, BASIC FORCED, POWER ON, CLEAN PRINTHEAD, MEDIA LOW, RIBBON LOW, REPLACE HEAD, BATTERY LOW, RFID ERROR, ALL MESSAGES, COLD START, SGD SET
Default
NA

Do

This command has the same functionality as the
setvar
.
To configure the ZebraNet Alert system:
! U1 do "alerts.add" "[condition],[destination],[set],[clear],[destination_address],[port],[quelling],[SGD_name]"
Example
This example shows a
"Paper Out"
alert sent via the serial port, with no destination address specified.
! U1 setvar "alerts.add" "PAPER OUT,SERIAL,Y,N,,0,,"