Benutzer-Werkzeuge

Webseiten-Werkzeuge


unipagersend

Send messages directly from command line with UniPager

If you want to send messages directly from the command line (e.g. from Nagios) to the Unipager, you can use a simple Python script. It is available here: https://github.com/dh3wr/UniPager-SendWebsocket. Use the version unipager_send.py, if you want a flexible solution with command line arguments.

Installation

Just get the file from the github repository. You may need sudo apt-get install python-websocket in order to run the script.

Usage

usage: unipager_send.py [-h] [--hostname HOSTNAME] [--port PORT]
                        [--password PASSWORD] [--ric RIC] [--type TYPE]
                        [--func FUNC] [--msg MSG] [--debug]

Send paging call direct via Unipager

optional arguments:
  -h, --help           show this help message and exit
  --hostname HOSTNAME  The host running Unipager, default localhost
  --port PORT          The port Unipager is listening, default 8055
  --password PASSWORD  The Unipager password, default empty
  --ric RIC            RIC to send the message to
  --type TYPE          0 = Numeric, 1 = Alphanumeric, default 1
  --func FUNC          Function Bits in POCSAG datagram, default 3
  --msg MSG            Message, if containing spaces: "TEXT WITH SPACES"
  --debug              Enable debug

ToDo

  • More error checking (range of RIC, connection exceptions, …)
unipagersend.txt · Zuletzt geändert: 2018/04/05 16:57 von dh3wr