mosquitto as mqtt broker section added

This commit is contained in:
Thomas Klaehn 2016-03-20 14:01:58 +01:00
parent fc028858c4
commit 65d6e11a06

View File

@ -216,6 +216,22 @@ weatherpi.git
\end{itemize} \end{itemize}
\subsection{MQTT Broker} \subsection{MQTT Broker}
Install mosquitto (AUR)\\
Create config file:
\begin{lstlisting} \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} \end{lstlisting}