## 3 Implementation Details  
From the requirements already stated, we proceeded to implement the designed architecture, shown in Figure 3.  
The details of each of the elements of this architecture and the reasons why they were selected are as follows:  
* Aqara/Xiaomi Zigbee Sensors. We wished to have standard off-the-shelf components wherever it was possible, to lower the cost of possible replications of that setup, especially for citizen science. Zigbee is a wireless transmission protocol designed for IoT (Internet of Things) data transmission, and is becoming, due to its reliability, low power requirements, area coverage, and low price, the de facto standard for home sensoring. There are several manufacturers of Zigbee based devices, and one of such, Xiaomi/Aqara, has a wide selection of products, is affordable, and is aesthetically pleasant enough so they will not stand out once installed in place. * Raspberry PI (RPi3). For the data collection nodes, we require a small form factor computer, which is affordable and easy to acquire. One such device is the RaspberryPi (Raspberry Pi Foundation, UK). For the deployment for this work, we used RaspberryPi 4/2 GB of RAM, the state-of-the-art SBC at the moment. Other models (RaspberryPi 5, or RaspberryPi Zero 2W) could be used, as they fulfill the requirements of RAM/CPU for the task they have to perform. These RaspberryPi will require this additional hardware and software:
* CC2531 USB-2-Zigbee: Any USB to Zigbee device will operate. For our project we used one based on a Texas Instrument CC2531 (with a price tag around 10 EUR each), with a modified firmware from the Zigbee2 MQTT project. * Zigbee2 MQTT: Zigbee2 MQTT is a software system that, using a USB 2 Zigbee dongle, receives Zigbee messages from a network of sensors and relays them using MQTT to a MQTT broker. This software is running on a Docker container on the RPi3 for better isolation and more reliability. * ZeroTier-One VPN. For increased security, the connections between the RPi3 nodes and the central MQTT broker are routed through a secure VPN (Virtual Private Network) using ZeroTier-One service. * Mosquito MQTT Server. All MQTT messages with the sensor data are transmitted from the RPi3 via the local building internet (through a VPN) to a Mosquito MQTT Server that acts as the MQTT broker. * Telegraf Agent. A Telegraf agent is running continuously subscribed to the MQTT broker and rerouting (and format translating) all messages to the InfluxDB database server. * InfluxDB Database. Data is stored on an InfluxDB instance. As data coming from sensors is a time-series data stream, InfluxDB is one of the best choices for storing that data. * Grafana Visualization Server. We are running a Grafana instance that, as it has the InfluxDB instance as a data source, allows us to visualize the collected data, as seen in Figure 8. The Grafana instance also provides the graphs that will be visualized as part of the display of the totem. As can be seen from the detailed description we choose all elements of the architecture, both hardware and software, to be as standard, cheap, and affordable as possible, with the focus on having an easily reproducible setup. An example of the results obtained is presented in Figure 8.  
After some months of operating with this architecture, we can see, on the hardware side, that:  
* The sensors by Xiaomi/Aqara, priced around 5 EUR each, have enough precision for this kind of study: temperature can be between \(-20\)\({}^{\circ}\)C and \(+50\)\({}^{\circ}\)C, with a \(\pm 0.3\)\({}^{\circ}\)C error; humidity can be 0-100% RH (non-condensing), \(\pm 3\)%, and, for those with atmospheric pressure, it can be between 30 kPa and 110 kPa, \(\pm 0.12\) kPa. Their battery, a CR2032 cell, lasts around two years. And the chosen communications protocol, Zigbee, has a longer range than WiFi or Bluetooth and lower power consumption. * The RPi is a robust SBC, and the latest models (Zero 2W) are widely available with a price tag floating around 20 EUR.