diff --git a/content.tex b/content.tex index 9dfb6e8..ba1fda2 100644 --- a/content.tex +++ b/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}