\section{Environment}

The research presented in this paper was mainly driven by \textit{Magrathea Laboratories e.V.}\cite{maglab}, the local hackerspace in Fulda, in cooperation with researchers at the department for computer science at Fulda University.
Requirements were clearly defined by Magrathea Laboratories demands to provide local and remote control over various sensors and actors in the foundations rooms to visitors and members.
Such components include but are not limited to door sensors, power sockets, temperature sensors, projectors and screens who are all managed by a home-automation controller, which is driven by the software \textit{home-assistant}\cite{HASS}.
It provides direct control over all existing components using a web UI and allows to define rules and automations on how these components interact.

For the components hardware, boards based on the \textit{ESP8266} micro-controllers, mostly \textit{ESP-01s} \cite{ESP-01s} boards, are used in combination with self-developed power supplies and use-case specific hardware components.
These boards feature a small and robust design, achieve very low power consumption and integrate WiFi without requiring any extra components.
It integrates a Tensilica L106 32-bit micro controller unit (MCU) with a maximum CPU performance of 160 MHz, 64 kB instruction memory and another 96 kB of main memory. 
According to the manufacturer, it is among the most integrated WiFi-capable chips in the industry.
For these boards, a common software platform referred to as \textit{ESPer} \cite{ESPer} has been developed.
The software is based on the \textit{Sming} \cite{Sming} library, which in turn is based on the open source SDK for \textit{ESP8266} and integrates a lot of other software components for easy use.
To build the software, a \textit{Makefile} \cite{make} is used, which provides a simple way for reproducible builds.

The base topology used is shown in figure \ref{fig:topology}. 
For communication with the controller, the \textit{MQTT} \cite{MQTT} protocol is used.
It provides a lightweight messaging mechanism implementing the publish-subscribe pattern that allows devices to listen for commands and publish their current state to the controller and other interested parties.
The controller software has out-of-the-box support for this protocol, which allows easy integration of all different device types using the same patterns.

\begin{figure}[htbp]
\centering\fbox{\includegraphics[width=0.9\linewidth]{topology.pdf}}
\caption{The base network topology.}
\label{fig:topology}
\end{figure}

The components all share the same configuration in regard to the network access and the controller to communicate with.
The configuration is provided during build time, which eschews the need for a configuration interface and reduces the management overhead, thus minimizing security leaks.
