Skip to content

Latest commit

 

History

History
138 lines (100 loc) · 3.3 KB

dmbot.adoc

File metadata and controls

138 lines (100 loc) · 3.3 KB

dmbot(1) Manual Page

NAME

dmbot - XMPP chat bot for remote control of sensor nodes

SYNOPSIS

dmbot --help

dmbot --version

dmbot --node id --jid jid --password password --host host [--port port] [--tls] [--logger name] [--debug] [--verbose]

dmbot --config file [--name name]

DESCRIPTION

This program is an XMPP bot that accepts commands via chat. Access to the bot is limited to the JIDs added to table group in the configuration file. Requests from clients whose JID is not in the table will be rejected. If table group is empty, all clients are allowed to send commands to the bot.

All commands start with prefix !. For an overview, send chat command !help to the bot. The following commands are supported:

!beats

Return current time of the sensor node in Swatch Internet Time.

!date

Return date and time of the sensor node in ISO 8601.

!help

Return help text.

!jid

Return full JID of bot.

!log <level> "<message>"

Send log message of given level to logger. The argument level must be a valid log level name or numeric log level. The argument message must be in quotes.

!node

Return node id of bot.

!poke

Return status message if bot is online.

!reconnect

Reconnect bot and update local roster list.

!uname

Return name and version of the operating system.

!uptime

Return uptime of the operating system

!version

Return bot version.

Passing the XMPP credentials via the command-line arguments --jid and --password is insecure on multi-user operating systems and only recommended for testing.

OPTIONS

--config, -c file

Path to Lua-based configuration file.

--debug, -D

Forward logs messages of level LL_DEBUG via IPC (if logger is set).

--help, -h

Output available command-line arguments and quit.

--host, -H host

Domain of XMPP server.

--jid, -J user

Jabber id (JID) of the form [email protected].

--logger, -l name

Name of logger. If set, sends logs to dmlogger(1) process of given name.

--name, -n name

Name of instance, XMPP resource, and table in given configuration file (default is dmbot).

--node, -N id

Sensor node id.

--password, -P password

JID password. Be aware that passing the credentials via command-line arguments is insecure and only recommended for testing.

--port, -q port

Port of XMPP server. The default port is 5222.

--reconnect, -R

Reconnect on error.

--tls, -E

Force TLS encryption.

--verbose, -V

Print log messages to stderr.

--version, -v

Output version information and quit.

EXIT STATUS

0

Success. Program executed without errors.

1

Failure. Program execution failed.

EXAMPLE

Connect with JID [email protected] to an XMPP server on port 5223 and wait for commands:

$ dmbot --node dummy-node --jid [email protected] --password secret \
  --host example.com --port 5223 --tls --verbose

If no configuration file is used, any client may send commands to the bot without authorisation.

RESOURCES

Project web site: https://www.dabamos.de/

COPYING

Copyright © 2024 Philipp Engel.
Free use of this software is granted under the terms of the ISC Licence.