## 2 System Architecture
### Cloud Platform  
On the data storage and visualization layer, the ThingSpeak platform is used. ThingSpeak is an open-source IoT platform designed to allow users to collect in real time, analyze, store, and visualize data from different devices, sensors, or applications. This platform is popular among developers as it allows monitoring and controlling remote IoT devices. Based on specific data conditions, users can set triggers in order to send notifications. The platform is quite popular due to its flexibility, ease of use, support of a wide range of communication protocols, such as HTTP and MQTT, and more, making it a good choice for smart devices, environmental monitoring, and home automation projects. A user may connect to ThingSpeak using a Mathworks account (Figure 6), which can be created on the website. After signing in, the user needs to create a channel, which is a fundamental unit that allows storage and management of data from various IoT devices. Each channel can store up to eight data fields for information readings (e.g., temperature, humidity, etc.) and can be public or private. The novelty of the ThingSpeak platform is that, apart from real-time visualization with graphs, data processing using MATLAB (R2014b and above) is also possible on the cloud. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature** & **BLE (Bluetooth** **Low Energy)** & **ZigBee** & **LoRaWAN** \\ \hline Power Consumption & Very low, used on ultra-low-power applications. & Low, but higher than BLE. & Extremely low consumption. \\ \hline Sleep Mode Efficiency & Excellent, devices can sleep for long periods. & Good, it supports sleep modes. & Outstanding, devices can stay asleep most of the time. \\ \hline Battery Life & 1+ year (coin-cell battery, depending on use). & Up to 2 years in low-traffic applications. & 5–10 years on a single AA battery. \\ \hline Optimal Use Case & Short-range (e.g., wearables). & Medium-range networks (e.g., home automation). & Long-range, (e.g., remote sensors). \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of communication protocols. First, the user should provide a name for the new channel and then create the necessary data fields according to the application needs. Each data field must be given an individual/unique name. After that, the user saves the created channel. The user can click on the channel name to go to the channel management view. An API key for this channel can be created there. This API key is then used to send data to the channel using a different device. The Write API Key in ThingSpeak is a unique key assigned to each of the channels that allows the user to send or update data to a specific channel. It functions as an authentication token, making sure that only authorized users or devices can upload data to that specific channel. The key is essential in preventing unauthorized access and ensuring the protection of the data that are being sent (Figure 7). Figures 8 and 9 depict some sample graphs from the platform. Specifically, we see how the temperature and humidity readings from the sensor are depicted over time. Figure 6: Mathworks sign-in page. Figure 7: Write API key for the channel. Although Thing5 peak is suitable for the experiments in this paper, in general it has some limitations regarding data throughput and scalability issues that make it unsuitable for large-scale systems that need multiple connections with high data rates. More specifically:  
* There is a limitation of one data point every 15 s, which limits the monitoring above that data frame and could also lead to data loss. * In terms of big data storage, Thing5 peak is not ideal, so users will need to export any important data frequently and store them in an external file server in order not to lose any critical data. * There could be data gaps during connection loss. * There is limitation of 255 bytes per data packet. Figure 8: Temperature visualization over half an hour. Figure 9: Humidity data visualization over half hour.