NAME
net-mqtt-pub - Perl script for publishing to an MQTT topic
VERSION
version 1.110200
SYNOPSIS
# messages one per line on stdin
echo message | net-mqtt-pub [options] topic
# message as command line arguments
net-mqtt-pub [options] topic this is a message
DESCRIPTION
This script publishes each line from stdin as an MQTT message on the given topic.
OPTIONS
- -help
-
Print a brief help message.
- -man
-
Print the manual page.
- -host
-
The host running the MQTT service. The default is
127.0.0.1
. - -port
-
The port of the running MQTT service. The default is 1883.
- -verbose
-
Include more verbose output. Without this option the script only outputs errors
- -keepalive NNN
-
The keep alive timer value. Defaults to 120 seconds. For simplicity, it is also currently used as the connection timeout.
SEE ALSO
Net::MQTT::Message(3)
AUTHOR
Mark Hindess <soft-cpan@temporalanomaly.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Mark Hindess.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.