1MQTT-SIMPLE(1) User Contributed Perl Documentation MQTT-SIMPLE(1)
2
3
4
6 mqtt-simple - Very simple MQTT implementation
7
9 mqtt-simple -h mqtt.example.org -c -s "sensors/#" -s "debug/#" -s "#"
10
11 mqtt-simple -h mqtt.example.org -p "example/unretained" -m "message"
12
13 mqtt-simple -h mqtt.example.org -r -p "example/retained" -m "message"
14
15 tail -f logfile | mqtt-simple -h mqtt.example.org -p "log/example"
16
17 mqtt-simple --ssl --insecure ...
18
19 mqtt-simple --ssl --ca ca.crt --cert client.crt --key client.key
20
22 This is just a simple utility program. It doesn't do much.
23 Specifically, all the QoS features are unsupported. Also, don't expect
24 fancy error messages and such :-)
25
27 -h --host MQTT server to connect to, required.
28
29 -p --publish topic Publish a message. Uses the message given with
30 "-m", or will read lines from stdin, and
31 publish a message for each given line.
32
33 -m --message message Message to publish. Requires "-p".
34
35 -r --retain Causes messages published with "-p" to have
36 the "retain" flag on.
37
38 -s --subscribe filter Subscribe to the given topic filter. Use the
39 standard MQTT wildcards like "+" and "#".
40 Outputs matching published messages on stdout.
41 Can be given multiple times.
42
43 -e --except filter Suppress published messages that match filter.
44 Can be given multiple times.
45
46 --count number Quit after receiving number messages.
47
48 --message-only Output only the message values, without the
49 topics.
50
51 -1 --one Shortcut for "--count 1 --message-only".
52
53 --color
54 --no-color For each given "-s", print the matching topic
55 in a different color. Note that the first
56 matching topic will be used for color
57 selection, so specify the topics with the most
58 specific one first, the least specific one
59 (like "#") last.
60
61 Color is enabled by default if stdout is a
62 terminal.
63
64 --raw Pass ASCII control characters unaltered. By
65 default, they're replaced by "^@" notation or,
66 when "--color" is enabled, reverse video
67 characters. For example, an ASCII newline
68 would be displayed as "^J" unless "--raw" is
69 used.
70
71 -d --datetime format Prefix messages with a timestamp. Optionally,
72 a format for "strftime" can be supplied.
73
74 -u --user --username username
75 Specify a username. Overrides the environment
76 variable "MQTT_SIMPLE_USERNAME".
77
78 --pass --password password
79 Specify a password. Overrides the environment
80 variable "MQTT_SIMPLE_USERNAME".
81
82 SSL options
83 --ssl Use SSL instead of unencrypted connection.
84
85 --insecure Disable SSL certificate validation and enable
86 clear text passwords. Useful for testing, bad
87 idea in production.
88
89 Overrides the environment variables
90 "MQTT_SIMPLE_SSL_INSECURE" and
91 "MQTT_SIMPLE_ALLOW_INSECURE_LOGIN".
92
93 --ca path The Certificate Authority to validate against.
94 path can be a file or a directory. If
95 unspecified, IO::Socket::SSL attempts to use
96 the system wide CA configuration.
97
98 Overrides the environment variable
99 "MQTT_SIMPLE_SSL_CA".
100
101 --cert path
102 --key path A client certificate with its key.
103
104 Override the environment variables
105 "MQTT_SIMPLE_SSL_CERT" and
106 "MQTT_SIMPLE_SSL_KEY".
107
109 Pick your favourite OSI approved license :)
110
111 http://www.opensource.org/licenses/alphabetical
112
114 Juerd Waalboer <juerd@tnx.nl>
115
117 Net::MQTT::Simple
118
119
120
121perl v5.34.0 2021-07-22 MQTT-SIMPLE(1)