-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmqtt2serial.1
115 lines (91 loc) · 3.55 KB
/
mqtt2serial.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
.TH MQTT2SERIAL 1 04-Jan-2020 "Version 1.00" "MQTT Hyperdash"
.SH NAME
mqtt2serial \- bridge mqtt messages from and to a serial device.
.SH SYNOPSIS
.B mqtt2serial
.RI "[ " options " ] "
.SH DESCRIPTION
mqtt2serial connects to a mqtt broker and a serial (tty) device. This is
a generic application (similar to the rule engine framework) to asynchronoulsy
pass mqtt content to a serial line, and also accept asynchronously content from
that line.
This way, an arduino could be easily hooked to the serial line and pass its
values and accept commands from it.
The format used on the serial line is an ASCII representation of the message
payload. If needed binary data is encoded with base64.
The format actually is be:
MQTT:=, where the payload should be enclosed with "
Each line must be terminated by a \\n charackter.
The TOPIC would be a local topics name, and the framework can add a prefix to it
to make it available on the mqtt broker. The prefix is removed if data is
received from the broker and passed to the serial line.
.SH OPTIONS
.TP
.BR \-q
Be quiet and print less debug information.
.TP
.BR \-v
Be more verbose and print debug information.
.TP
.BR \-\-broker " " \fIurl\fR
specify the broker url. By default "tcp://localhost:1883" is used.
.TP
.BR \-\-user " " \fIusername\fR
specify a username for the broker.
.TP
.BR \-\-passwd " " \fIpasswd\fR
specify a password for the broker.
.TP
.BR \-\-prefix " " \fIprefix\fR
specify a prefix to all TOPICs on the serial line.
.TP
.BR \-\-json
expand JSON properties. This is the default.
.TP
.BR \-\-nojson
do not expand JSON properties.
.TP
.BR \-\-device " " \fI<devicename>\fR
specify the name of the serial device; e.g. /dev/ttyUSB0 .
If the device cannot be found the interface will search for the first matching
device by incrementing the number (last character of the device).
.TP
.BR \-\-baudrate " " \fIrate\fR
specify the baud rate used on the device. (Default 9600 baud, 8,N,1).
.TP
.BR \-\-version
shows version, program and other information and exits.
.TP
.BR \-h ", " \-\-help
print a short help and exit.
.PP
For detailed help and description of the MQTT principle take a
look at the README file coming with the package.
.SH EXAMPLES
.nf
mqtt2serial --broker tcp://localhost:1883 --prefix "ARDUINO" --device /dev/ttyUSB0 --baudrate 9600
.fi
.SH VERSION
Page was created for V.1.03
.SH BUG REPORTS
If you find a bug in the MQTT Hyperdash software, you should report it. But
first, you should make sure that it really is a bug, and that it appears in
the latest version of the MQTT-Hyperdash package that you have.
Once you have determined that a bug actually exists, mail a bug report to
[email protected]. If you have a fix, you are welcome to mail that
as well! Suggestions may be mailed to the bug tracking system.
Comments and bug reports concerning this manual page should be directed to
.SH AUTHOR
Markus Hoffmann <[email protected]>
.SH COPYRIGHT
Copyright (C) 2019-2021 Markus Hoffmann
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
.SH SEE ALSO
mosquitto(1), mosquitto_pub(1), mosquitto_sub(1), hyperdash(1), mqtt-list-topics(1)