mosquitto as mqtt broker section added
This commit is contained in:
parent
fc028858c4
commit
65d6e11a06
18
content.tex
18
content.tex
@ -216,6 +216,22 @@ weatherpi.git
|
||||
\end{itemize}
|
||||
|
||||
\subsection{MQTT Broker}
|
||||
Install mosquitto (AUR)\\
|
||||
Create config file:
|
||||
\begin{lstlisting}
|
||||
https://aur.archlinux.org/cgit/aur.git/snapshot/mosquitto.tar.gz
|
||||
cp /etc/mosquitto.conf.example /etc/mosquitto.conf
|
||||
\end{lstlisting}
|
||||
Start mosquitto broker service:
|
||||
\begin{lstlisting}
|
||||
systemctl enable mosquitto.service
|
||||
systemctl start mosquitto.service
|
||||
\end{lstlisting}
|
||||
\subsubsection{Test}
|
||||
Subscribe to a topic:
|
||||
\begin{lstlisting}
|
||||
mosquitto_sub -t "topic/path"
|
||||
\end{lstlisting}
|
||||
Populate a message:
|
||||
\begin{lstlisting}
|
||||
mosquitto_pub -t "topic/path" -m "message payload"
|
||||
\end{lstlisting}
|
||||
|
Loading…
Reference in New Issue
Block a user