From 65d6e11a0643742b050ac085409a09b2a1f60fdf Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Sun, 20 Mar 2016 14:01:58 +0100 Subject: [PATCH] mosquitto as mqtt broker section added --- content.tex | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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}