.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MQTT-SIMPLE 1p" .TH MQTT-SIMPLE 1p "2023-10-30" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" mqtt\-simple \- Very simple MQTT implementation .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& mqtt\-simple \-h mqtt.example.org \-c \-s "sensors/#" \-s "debug/#" \-s "#" \& \& mqtt\-simple \-h mqtt.example.org \-p "example/unretained" \-m "message" \& \& mqtt\-simple \-h mqtt.example.org \-r \-p "example/retained" \-m "message" \& \& tail \-f logfile | mqtt\-simple \-h mqtt.example.org \-p "log/example" \& \& mqtt\-simple \-\-ssl \-\-insecure ... \& \& mqtt\-simple \-\-ssl \-\-ca ca.crt \-\-cert client.crt \-\-key client.key .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is just a simple utility program. It doesn't do much. Specifically, all the QoS features are unsupported. Also, don't expect fancy error messages and such :\-) .SH "COMMAND LINE OPTIONS" .IX Header "COMMAND LINE OPTIONS" .IP "\-h \-\-host" 25 .IX Item "-h --host" \&\s-1MQTT\s0 server to connect to, required. .IP "\-p \-\-publish \fItopic\fR" 25 .IX Item "-p --publish topic" Publish a message. Uses the message given with \f(CW\*(C`\-m\*(C'\fR, or will read lines from \&\fBstdin\fR, and publish a message for each given line. .IP "\-m \-\-message \fImessage\fR" 25 .IX Item "-m --message message" Message to publish. Requires \f(CW\*(C`\-p\*(C'\fR. .IP "\-r \-\-retain" 25 .IX Item "-r --retain" Causes messages published with \f(CW\*(C`\-p\*(C'\fR to have the \*(L"retain\*(R" flag on. .IP "\-s \-\-subscribe \fIfilter\fR" 25 .IX Item "-s --subscribe filter" Subscribe to the given topic filter. Use the standard \s-1MQTT\s0 wildcards like \&\f(CW\*(C`+\*(C'\fR and \f(CW\*(C`#\*(C'\fR. Outputs matching published messages on \fBstdout\fR. Can be given multiple times. .IP "\-e \-\-except \fIfilter\fR" 25 .IX Item "-e --except filter" Suppress published messages that match \fIfilter\fR. Can be given multiple times. .IP "\-\-count \fInumber\fR" 25 .IX Item "--count number" Quit after receiving \fInumber\fR messages. .IP "\-\-message\-only" 25 .IX Item "--message-only" Output only the message values, without the topics. .IP "\-1 \-\-one" 25 .IX Item "-1 --one" Shortcut for \f(CW\*(C`\-\-count 1 \-\-message\-only\*(C'\fR. .IP "\-\-color" 25 .IX Item "--color" .PD 0 .IP "\-\-no\-color" 25 .IX Item "--no-color" .PD For each given \f(CW\*(C`\-s\*(C'\fR, print the matching topic in a different color. Note that the first matching topic will be used for color selection, so specify the topics with the most specific one first, the least specific one (like \f(CW\*(C`#\*(C'\fR) last. .Sp Color is enabled by default if \fIstdout\fR is a terminal. .IP "\-\-raw" 25 .IX Item "--raw" Pass \s-1ASCII\s0 control characters unaltered. By default, they're replaced by \f(CW\*(C`^@\*(C'\fR notation or, when \f(CW\*(C`\-\-color\*(C'\fR is enabled, reverse video characters. For example, an \s-1ASCII\s0 newline would be displayed as \f(CW\*(C`^J\*(C'\fR unless \f(CW\*(C`\-\-raw\*(C'\fR is used. .IP "\-d \-\-datetime \fIformat\fR" 25 .IX Item "-d --datetime format" Prefix messages with a timestamp. Optionally, a \fIformat\fR for \f(CW\*(C`strftime\*(C'\fR can be supplied. .IP "\-u \-\-user \-\-username \fIusername\fR" 25 .IX Item "-u --user --username username" Specify a username. Overrides the environment variable \f(CW\*(C`MQTT_SIMPLE_USERNAME\*(C'\fR. .IP "\-\-pass \-\-password \fIpassword\fR" 25 .IX Item "--pass --password password" Specify a password. Overrides the environment variable \f(CW\*(C`MQTT_SIMPLE_PASSWORD\*(C'\fR. .SS "\s-1SSL\s0 options" .IX Subsection "SSL options" .IP "\-\-ssl" 25 .IX Item "--ssl" Use \s-1SSL\s0 instead of unencrypted connection. .IP "\-\-insecure" 25 .IX Item "--insecure" Disable \s-1SSL\s0 certificate validation and enable clear text passwords. Useful for testing, bad idea in production. .Sp Overrides the environment variables \f(CW\*(C`MQTT_SIMPLE_SSL_INSECURE\*(C'\fR and \&\f(CW\*(C`MQTT_SIMPLE_ALLOW_INSECURE_LOGIN\*(C'\fR. .IP "\-\-ca \fIpath\fR" 25 .IX Item "--ca path" The Certificate Authority to validate against. \fIpath\fR can be a file or a directory. If unspecified, IO::Socket::SSL attempts to use the system wide \s-1CA\s0 configuration. .Sp Overrides the environment variable \f(CW\*(C`MQTT_SIMPLE_SSL_CA\*(C'\fR. .IP "\-\-cert \fIpath\fR" 25 .IX Item "--cert path" .PD 0 .IP "\-\-key \fIpath\fR" 25 .IX Item "--key path" .PD A client certificate with its key. .Sp Override the environment variables \f(CW\*(C`MQTT_SIMPLE_SSL_CERT\*(C'\fR and \&\f(CW\*(C`MQTT_SIMPLE_SSL_KEY\*(C'\fR. .SH "LICENSE" .IX Header "LICENSE" Pick your favourite \s-1OSI\s0 approved license :) .PP http://www.opensource.org/licenses/alphabetical .SH "AUTHOR" .IX Header "AUTHOR" Juerd Waalboer .SH "SEE ALSO" .IX Header "SEE ALSO" Net::MQTT::Simple