Journal of Applied Engineering and Technological Science Vol 6. 2025: 1040-1071 WEATHER-BAGLOG PARAMETERS MONITORING SYSTEM BASED IOT-MQTT-NODERED FOR MUSHROOM CULTIVATION ROOM: A PRECISION AGRICULTURE Sumarsono1*. Nur Muflihah2. Hadi Sucipto3 Department of Industrial Engineering. University of Hasyim AsyAoari Tebuireng Jombang. Indonesia1 2 Department of Information Technology. University of Hasyim AsyAoari Tebuireng Jombang. Indonesia3 sonsumarsono13@gmail. Received: 19 September 2024. Revised: 14 December 2024. Accepted: 18 January 2025 *Corresponding Author ABSTRACT Mushroom cultivation methods are continually being refined to meet increasing demands for quantity and However, frequent weather fluctuations often pose challenges. They can influence the optimal growth of mushrooms and the baglog's nutrient-chemical. This study aims to implement precision agriculture by developing a weather-baglog parameters monitoring system based on IoT-MQTT-Nodered It seeks to analyze and evaluate the dominant parameters influencing ideal oyster mushroom cultivation room conditions using machine learning classification models and capability process analysis. Sample data was collected from an oyster mushroom cultivation room using a 24-hour monitoring system over seven days. The monitoring tool's system design comprises three parts: multi-sensor data acquisition, communication protocol to the server, and smartphone-based data monitoring. The results demonstrate the system's effectiveness, mobile-access, and durability in monitoring and acquiring weather-baglog parameters data. The best model shows that light, temperature, and humidity are the dominant parameters influencing the ideal oyster cultivation room. Capability process analysis reveals that the dominant parameters in the cultivation room are currently less than ideal. The implications for improvement are needed an IoT-based control system to regulate them and make them ideal. This finding has been tested as an effective, mobile-access, durable, and data-centering monitoring system. Keywords: IoT-MQTT-Nodered. Multi-sensor. Mushroom Cultivation Room. Precision Agriculture. Weather-Baglog Parameters Monitoring System. Introduction The majority of oyster mushroom cultivation practices are conducted conventionally. This process encompasses seeding, sterilizing mushroom seeds, mixing the growth medium . , pressing the baglog into plastic, pasteurizing the baglog, incubating the seeds, and cultivating the mushrooms on shelves. However, these conventional methods are unable to meet the escalating demand for oyster mushrooms in terms of both quantity and quality (Rukhiran et , 2. The increasing demand shows that oyster mushrooms are increasingly in demand by the So the oyster mushroom cultivation business is increasingly attracting public attention. Mushroom cultivation can use land that is not large and is done indoors. According to (Ferdousi et al. , 2. , oyster mushroom cultivation is an environmentally friendly and profitable Also provides a fast source of food and nutrients. Mushrooms are fruit stems that contain spores of a certain type of fungus. One type of mushroom that is edible and has many nutrients is the oyster mushroom. The content of nutrients such as vitamins, amino acids, proteins, polyphenols, and nucleic acids. Nucleic acids function to maintain immunity to fight diabetes and hyperlipidemia (Xue et al. , 2. Based on the nutritional content. That makes the demand for mushrooms continue to grow, especially with the growing trend of diet and healthy living. According to (Chong et al. , 2. , (Rukhiran et al. , 2. , (Dipali et al. , 2. , (Nguyen et al. , 2. the mushroom cultivation industry can be a trend and will continue to grow in the future. Although there have been improvements in mushroom cultivation methods over time to meet the increasing demand. Such as substrate sterilization, spawn preparation, and pathogen Sumarsono et al A Vol 6. 2025: 1040-1071 control, as well as automated systems for monitoring and controlling mushroom cultivation. However, the problems that always occur with significant weather changes anytime in the mushroom cultivation room result in the inhibition of mushroom growth. The process of mushroom growth is susceptible to weather parameters such as temperature, humidity, carbon dioxide levels, and moisture (Ariffin et al. , 2. Because these parameters affect the mushroom yield, such as stem height, stem diameter, and fruit stem diameter. According to (Guragain et al. , 2. , monitoring weather conditions such as high temperature, excessive humidity, and low air circulation should be avoided during the cultivation process. It results in various viral infections that inhibit mycelial growth and damage the fertilization mechanism. Viral infections result in lower mushroom yields (Chong et al. , 2. This is often experienced in conventional cultivation. Conventional cultivation has limitations in monitoring systems. Such as not automatic, inefficient, ineffective, cannot be all the time monitoring, and depends on humans. Also, there is no complete and continuous monitoring of micro-weather and baglog data over time. Meanwhile, information is needed that can be monitored at all times for the process of improving mushroom cultivation. Based on (Mahmud et al. , 2. , (Nawandar & Satpute, 2. , (Chong et al. , 2. , the monitoring system for mushroom cultivation using IoT technology will eliminate the limitations of the traditional way. The previous research has conducted IoT-based monitoring of oyster mushroom cultivation space. But only examine micro-weather parameter monitoring in mushroom They do not monitor simultaneously micro-weather and nutrient-chemical in baglog. Furthermore, the monitoring system does not show mobile and 24-hour access capabilities. This statement is based on the previous research review in Table 1. The objective was to create and implement an IoT-based monitoring-only micro-weather such as temperature, humidity, lights, and CO2 level. However, the proposed article has monitored simultaneously micro-weather and baglog parameters. The next research gap is IoT system architecture. This article proposes an IoT-based monitoring system with the following architecture: firsts, a device layer, containing: a DHT22 sensor to detect temperature and humidity, an LDR 4K7 resistor to detect light levels, an MQT135 sensor to detect CO2 levels, a 7in1 soil sensor to detect NPK levels, temperaturemoisture-pH-electronic conductivity baglog and then using 2 microcontrollers. Arduino uno r3 and NodeMCU Esp8266 v3. Which they are connected in series. Then use Raspberry Pi for the computer server. Second, the protocol communication layer uses MQTT, and third, the Application layer uses NodeRED dashboard and Ngrok hosting platform. The next difference is to study more deeply by analyzing and evaluating the data sensors for precision agriculture. The application of IoT technology for precision agriculture is inseparable from utilizing the data generated by analyzing data for improvement. Data analysis methods become an important part of precision agriculture. Data analysis methods that role in IoT-Mushroom cultivation are statistical and machine learning methods (Rukhiran et al. , 2. Precision processes and results are important for mushroom cultivation. Especially when weather and climate conditions are prone to change. Such as changes in temperature, rain, and humidity will cause serious damage to crops. Therefore some previous research in data IoT-Mushroom cultivation has used statistical and machine learning methods for precision agriculture. Such as (Rukhiran et al. , 2. , used a t-test to test the difference in yield between mushroom cultivation using IoT device control system and non-using. A similar study by (Rahman et al. conducted IoT-based temperature, humidity, and light intensity monitoring in mushroom cultivation using descriptive statistical methods. Furthermore, using machine learning methods to classify toxic mushrooms (Rahman et al. , 2. Then (Pinky et al. , 2. Use machine learning-ensemble methods for edibility detection of mushrooms. Based on this background, the article aims to implement precision agriculture by creating a weather-baglog parameters monitoring system for oyster mushroom cultivation. The monitoring system is designed using IoT technology integrated with Message Queuing Telemetry Transport (MQTT) and NodeRED as well as Ngrok platform for global hosting. The monitoring system can generate real-time and round-the-clock micro-weather and baglog parameter data. Where it can automatically acquire data stored on a computer server. The system of monitoring can be accessed mobile from a smartphone. The capability of IoT-based monitoring systems will cover the shortcomings of conventional oyster mushroom cultivation Sumarsono et al A Vol 6. 2025: 1040-1071 Such as not automatic, inefficient, ineffective, cannot be all the time monitoring, and depends on humans. Besides that, it is to achieve precision agriculture by analyzing data parameters that dominantly affect the ideal conditions for oyster cultivation rooms. The analysis method uses a machine learning classification model. Next, use the capability process analysis method to evaluate the dominant parameters against ideal conditions rooms. The results will show whether the dominant parameter is precise and meets ideal conditions or is not precise. improvement of the ideal of mushroom cultivation room can be carried out in a measurable manner and with precision. Literature Review 1 Identification of research gaps in IoT-based monitoring systems for oyster mushroom The literature review is from previous journal articles discussing oyster mushroom cultivation based on IoT technology. Focus review based on the research objectives and IoT system design. Table 1 show summarizes the previous research. Table 1 - Previous research review: Oyster Mushroom Cultivation Based on IoT Technology References Research purposes IoT system architecture (Guragain et Presents a low-cost centralized . Device layer: a DHT22 sensor for humidity and , 2. IoT ecosystem for addressing a temperature. MH-Z12-NDR sensor for detect CO2 lack of direct communication level. BH1750 sensor for detect light intensity, and with agronomists, and frequent Esp32 for controller. Protocol communication layer: outbreaks of oyster mushroom MQTT. Application layer: portal website . armer, customer, expert, admi. In addition: The IoT system is connected to a relay for control of a cooling-heater unit, humidifier, lights unit, and air regulation unit. (Dipali et al. Proposes and . Device layer: a DHT22 sensor for humidity and implement an IoT system to temperature, an Esp32 controller. Protocol the communication: Thingspeak IoT paltform. temperature, and humidity of an Application layer: Thinkspeak dashboard. In addition: outdoor oyster mushroom. The ioT system is connected to a relay for control of a cooling fan and water pump. (Rahman et al. Carry out automatic monitoring . Device layer: a DHT22 sensor for humidity and and control in real-time based on temperature. BH1750 light intensity sensors, and IoT for temperature, and NodeMCU as a microcontroller. Protocol humidity of an indoor oyster communication layer: Firebase IoT platform. Application layer: MIT App Inventor. In addition, the IoT system is connected to a water pump connected to the sprayer nozzle. (Nguyen et al. Integrated IoT-Camera sensor to . Device layer: a DHT22 sensor for humidity and implement temperature. CO2 sensor, and Raspberry pi was used customized for smart greenhouse for edge computing. Protocol communication layer: mushroom cultivation toward Cloud IoT. Application layer: YOLOv5 framework leveraging edge computing. for mushroom detection. In addition: The IoT system is connected to a surveillance camera for the greenhousemushroom information system. (Anggrawan et Developed an IoT-based control . Device layer: a moisture sensor (FC-28 LM. , , 2. & monitor system for baglog of pH sensor . H Electrode E201- BNC), temperature oyster mushroom cultivation as a sensor (DS18B. , and Esp32 as a microcontroller. student practical lesson media. Protocol communication layer: HTTP. Application layer: website for monitoring and controlling the work of the microcontroller. In addition: The IoT system is connected to pumping water to pour into the baglog oyster, cooling, and heating air. (Dayananda et Implementing an IoT-enabled . Device layer: DHT22 sensor for detecting , 2. microclimate control system for temperature and humidity, and Esp32 as a cultivating oyster mushrooms. Protocol communication & application layer: Arduino cloud platform. In addition, an IoT system is connected to a water pump sprinkler and an AC exhaust fan. (Ariffin et al. Using an IoT-based fuzzy logic . Device layer: a DHT22 sensor to detect temperature control system to regulate the and humidity, and NodeMCU as a microcontroller. cultivation environment of oyster Protocol communication layer: HTTP web server. mushrooms automatically. Application layer: website for monitoring and Sumarsono et al A (Kumar et al. Proposes an intelligent system for monitoring oyster mushroom cultivation using IoT. (Chong et al. Design and develop an IoT-based monitoring system for oyster mushroom cultivation. (Irwanto et al. Proposes an innovative system whose real-time records are managed based on the fuzzy sets (Rukhiran , 2. Implement IoT-enabled cultivation system to control and parameters of oyster mushroom (Bunluewong Surinta. Designed a software and control system for the IoT control box oyster mushroom cultivation. (Rahman et al. Introduces remote monitoring Automation, and mushroom classification with IoT. Vol 6. 2025: 1040-1071 controlling the work of the microcontroller. In addition: The IoT system is connected to a water pump sprinkler and an AC exhaust fan. Device layer: a DHT22 sensor to detect temperature and humidity. CO2 sensor (MQ. , light sensor (Light Dependent Resistor - LDR), and Atmega 328 as a . Protocol communication layer: HTTP web server. Application layer: website for monitoring and controlling the work of the In addition: The IoT system is connected to the relay module of a water sprayer motor, lights, cooling fan, and exhaust fan. Device layer: a DHT22 sensor to detect temperature and humidity, light sensor (SN-LIGHT-MOD), soil moisture sensor (SN MOISTURE-MOD). NodeMCU as a microcontroller, and Raspberry Pi as a computer . Protocol communication & application layer: Blynk IoT platform. In addition: The IoT system is connected to the relay module of the humidifier. Peltier cooler-heater, and lights. Device layer: a soil moisture sensor. DHT22 sensor to detect temperature and humidity. LDR sensor to detect lights intensity. PIR sensor to detect movement, and microcontrollers: NodeMCU Esp8266 v3 and Arduino uno r3. Protocol communication and application layer: thingerIO IoT platform. In addition: employing fuzzy logic in the IoT system addresses the relay module of the water sprinkler, heater, fan, mist maker, lamp, and pest sprayer. Device layer: a AM2305B sensor to detect temperature and humidity, station Solar panel to provide power to the system, and computer server: Raspberry pi. Protocol communication layer: HTTP-Telegraf. Application layer: InfluxDB database and Grafana dashboard. In addition: The IoT system is connected to the relay controls solenoid valves, fog mist, and spray nozzle. Device layer: a DHT22 to detect temperature and humidity, and microcontrollers: Arduino nano v3 and NodeMCU Esp8266 v3. Protocol communication & application layer: Blynk IoT platform. In addition: The IoT system is connected to the relay controls solenoid . Device layer: a BME280 sensor to detect temperature and humidity. Esp32 controller, and Raspberry pi and camera module. Protocol communication: HTTP. Application layer: Website. In addition: The IoT system is connected to the relay that controls air coolers and humidifiers. The system is also connected to the camera module to detect toxic mushrooms with the machine-learning model. Based on Table 1, the previous research objective was to create and implement an IoTbased monitoring and controlling system in oyster mushroom cultivation. The monitoring and controlling system is only aimed at micro-weather parameters such as temperature, humidity, light, and CO2 intensity. However, the proposed article has a different research objective. The first difference is in the research parameters. Where the research parameters monitored are micro-weather and baglog. The next difference is to study more deeply by analyzing and evaluating the research parameters. The study results provide more precise conclusions regarding micro-weather and baglog parameters to affect the ideal cultivation rooms. Furthermore, the research gap in this article comes from the IoT system architecture used in monitoring. This article proposes an IoT-based monitoring system with the following First, a device layer, containing: a DHT22 sensor to detect temperature and humidity. LDR 4K7 resistor to detect light levels, an MQT135 sensor to detect CO2 levels, a Sumarsono et al A Vol 6. 2025: 1040-1071 7in1 soil sensor to detect NPK levels, temperature-moisture-pH-electronic conductivity baglog and then using 2 microcontrollers, namely Arduino uno r3 and NodeMCU Esp8266 v3 which are connected in series, using Raspberry pi for the computer server. Second, use MQTT for protocol communication layer. Third, the application layer uses NodeRED dashboard and Ngrok hosting platform. The design of the monitoring system has automatic capabilities in data acquisition, and data movement can be accessed mobile and in real-time from a handphone. The tool system can be on all the time. While in previous studies, there were differences in the IoT system architecture. Figure 1 shows the network visualization in previous research related to parameter research and IoT system architecture for monitoring the oyster cultivation room. Fig. Network Visualization: Parameters And IoT System Architecture In Previous Research Based on Figure 1, it is known that previous research used IoT technology in oyster mushroom cultivation for monitoring and controlling tool systems. Where the parameters measured are temperature, humidity, light. CO2 intensity, and moisture. The IoT system architecture design is device level using microcontrollers: Esp32. NodeMCU Esp8266 v3, and a computer server: Raspberry Pi. Furthermore, temperature-humidity, light. CO2, and moisture sensors were used. The second, communication protocol mostly uses HTTP and Blynk IoT Then, the application layer mostly uses websites and Blynk dashboards. IoT Technology and Related Components for Mushrooms Cultivation C IoT Technology and Related Components IoT technology has helped in oyster mushroom cultivation. In general, the definition of IoT technology is a network for independent use of applications and services characterized by automatic data collection, network connectivity, event transfer, decision-making, feedback response, and interoperability. IoT is a new platform that connects computer devices, mechanical or digital machine objects, animals, and humans with unique identities for data exchange without requiring human involvement. The interaction of these relationships makes IoT dependent on wireless sensor networks (WSN). WSN is a network of nodes that can collect, transmit, and process data around their environment. WSN gives IoT the ability to interact machine-to-machine, initiate and manage interactions, and solve problems. IoT technology can minimize human intervention. This happens because IoT devices are equipped with microcontrollers and WiFi transceivers for control and configuration as well as internet communication that allows interaction between objects remotely. There is an increase in the number and variety of devices connected to IoT networks. Challenges arise related to object identification, data management, data mining, and security. Sumarsono et al A Vol 6. 2025: 1040-1071 According to (Kuzlu et al. , 2. , these challenges can be overcome by combining security solutions, such as firewalls, and standardizing and reducing system complexity. Furthermore, (Chong et al. , 2. , it can use several microcontroller combinations that allow the workload to be lighter. With the combined use of microcontrollers with system on chip (SoC) and singleboard computer (SBC). Microcontrollers are an important component of IoT technology. Popular SoC microcontroller products such as the node microcontroller unit (NodeMc. NodeMcu is an open-source firmware with Esp8266/Esp32 WiFi SoC. The Esp8266/Esp32 is integrated with transmission control protocol/internet protocol (TCP/IP). Which allows the microcontroller to connect to wireless fidelity (WiF. networks and transfer data to cloud storage. NodeMCU can program through the Arduino integrated development environment (Arduino IDE) application (Garg et al. , 2. The Arduino IDE application is a platform that uses the C or C program language and can be run on Windows operating systems. Many researchers have used NodeMCU (Esp8266/Esp. microcontrollers in IoT-based oyster mushroom cultivation projects (Guragain et al. , 2. , (Dipali et al. , 2. , (Rahman et al. , 2. , (Anggrawan et al. , (Dayananda et al. , 2. , (Ariffin et al. , 2. , (Chong et al. , 2. , (Irwanto et al. , (Bunluewong & Surinta, 2. , ( Rahman et al. , 2. In its development, microcontroller devices for IoT continue to grow. Besides the systemon-chip (SoC) type, there is a single-board computer (SBC) type microcontroller. Popular SBC microcontroller products such as Raspberry Pi. Raspberry Pi is a single-board computer as an application of the concept of fog computing. That can be used for operating mini-data centers (Mpofu et al. , 2. Raspberry Pi is open-source hardware with an operating system using Linux or Pi OS. Raspberry Pi has several connectivity options and is capable of performing various functions for more complex IoT systems. Raspberry Pi also provides wider possibilities for video monitoring in mushroom cultivation, and there is more room for future development. Such as image acquisition and the application of machine learning for the detection of toxic (H. Rahman et al. , 2. (Rukhiran et al. , 2. uses a Raspberry Pi to collect and store data from sensors. That monitors micro-weather variables and enables instructions to actuators that manage micro-weather for oyster mushroom cultivation. (Nguyen et al. , 2. (Chong et al. , 2. uses Raspberry Pi in an IoT system as a surveillance camera for the greenhouse-mushroom information system. Sensors are an important component of IoT technology. Sensors are small devices that have sensing capabilities to monitor certain parameters. After being assembled with a microcontroller and programmed to perform certain work functions. Sensors controlled by microcontrollers to detect parameter data. The sensor data is sent to the next layer with communication protocols, via the Internet network. Sensors that measure temperature, humidity, light. CO2, moisture, and pH levels are widely used in oyster mushroom cultivation. Based on Table 1 above, all researchers use these sensors. Although with different types of sensors. Temperature and humidity sensors are known to be the majority using DHT22. Other types of temperature-humidity sensors are used such as BME280. AM2305B, and DS18B20. Then the light sensor, such as Light Dependent Resistor (LDR). BH1750, and SN-LIGHT-MOD. CO2 intensity sensors such as MH-Z12-NDR, and MQ135. Then other of sensors such as moisture sensors use FC-28 LM393 and SN MOISTURE-MOD. A pH sensor uses pH Electrode E201BNC, and a movement sensor uses HC-SR501 PIR. C Use of Message Queuing Telemetry Transport (MQTT) in IoT MQTT is a communication protocol to facilitate the management and control of several IoT devices. Which is an open and ISO standard lightweight, publish-subscribe network protocol (Koutsougeras et al. , 2. , (Brouzos et al. , 2. , (Guragain et al. , 2. MQTT plays a role in sending publish or subscribe messages. That connects clients (IoT devices, computer devices, smartphone. to the network. Where the client must first register and subscribe to the MQTT broker network. A client can subscribe to the broker as a receiver . or sender . for one or more topics. The topic is a category of messages or themes from several clients of IoT devices. That was sent to the MQTT broker network. Messages from the client publisher will be posted on topics to be sent to the MQTT broker. Sumarsono et al A Vol 6. 2025: 1040-1071 Then distributed to all listener clients who subscribe to the topics. So, it becomes easy to send messages to the broker from the publishers to listeners with certain topics. Because the MQTT broker will replicate the message and send it to all network nodes that subscribe to the name of the topics. Network configuration like this, makes MQTT have a simpler configuration, less data transmission than transmission control protocol (TCP) such as Hyper Text Transfer Protocol (HTTP). Furthermore, it also makes it easier to add new clients as listeners and, or publishers on certain topics. Some researchers use MQTT for communication protocols in oyster mushroom cultivation such as (Guragain et al. , 2. , (Irwanto et al. , 2. According to them the advantages of MQTT because it is open source. It has a lighter network system to send data messages from publishers to listeners and vice versa. So that data delivery communication can run for a long time. C Use of NodeRED in IoT NodeRED is an application that contains a dashboard that displays data from various sources with a graphical user interface, and user-friendly (Bouali et al. , 2. More technically according to (Mpofu et al. , 2. , (Brouzos et al. , 2. NodeRED is a platform for low-code IoT application development using flow-based programming techniques. Flow-based programming are techniques that implement asynchronous and event-based application The interface of NodeRED provides simple nodes for writing or reading the database and running web services. The implementation of NodeRED uses algorithms that are linked to communication protocols. The communication protocol often used with Nodered is MQTT. NodeRED have input and output ports connected with nodes. These nodes define the data flow on the application. So NodeRED can message streams to run applications. The NodeRED application is still not widely used to display data from IoT systems for oyster mushroom cultivation. Several previous researchers used others, such as website portals (Guragain et al. , 2. , (Anggrawan et al. , 2. , (Ariffin et al. , 2. , (Kumar et al. , 2. (Rahman et al. , 2. Then, use the IoT cloud platforms such as ThingSpeak (Dipali et al. Blynk (Chong et al. , 2. , (Bunluewong & Surinta, 2. thingerIO (Irwanto et al. Arduino cloud (Dayananda et al. , 2. MiT App inventor (R. Rahman et al. , 2. and Grafana dashboard (Rukhiran et al. , 2023. However. The NodeRED dashboard has been widely used by researchers in other themes. Such as (Bouali et al. , 2. for the dashboard display on the smart irrigation system. Then (Mpofu et al. , 2. for data display on the automated household Aquaponics system. (Brouzos et al. , 2. for data monitoring display on the IoT-based robot system. They chose NodeRED because of the low-code platform that simplifies complex IoT architecture systems. 3 The challenge of application of IoT-based monitoring system Oyster mushroom cultivation is generally done conventionally. Conventional methods cannot monitor weather-baglog parameters in the cultivation room automatically, data center, and real-time. Whereas according to (Rahman et al. , 2. , (Chong et al,. , (Subedi et al. , in the process of oyster mushroom cultivation, observations are needed related to weather and baglog parameters data in the cultivation room. The weather and baglog parameters observed are relative temperature, humidity, light, baglog-moisture, baglog-pH and air gas (O2 and CO. Due to significant changes in weather parameters, it will have an impact on the growth of stem height, stem diameter, and fruit diameter of the mushroom. If the observation of these parameters is carried out conventionally. Then there are several shortcomings. Such as requiring more energy, and time not being efficient and effective. Based on these conditions. Efforts to monitor weather-baglog parameters in the cultivation room with IoT technology are a solution to the shortcomings of conventional methods. IoT in monitoring systems in agriculture has brought precision, smart, and sustainable benefits, however, in its application it brings challenges. Farmers face several challenges, especially in developing countries (Akhter & Sofi, 2. Some challenges in the application of IoT technology in agriculture are as follows. C Independence of IoT system management Sumarsono et al A Vol 6. 2025: 1040-1071 There are two challenges related to the independence of IoT system management. It is budget and IT skills by farmers. Before developing a system. Cost analysis must be carried out to overcome budget challenges. According to (Farooq et al. , 2. the initial cost of developing an IoT system is indeed high. Such as costs for sensors, gateways, station infrastructure, and maintenance costs. So cost control and consistency are needed refer to the initial objectives of implementing the IoT system. The goal is to increase production and at the same time reduce cost requirements. Challenges of IoT technology skills from farmers. Generally, farmers in developing countries do not have a high level of education. They cannot immediately understand and have difficulty implementing IoT technology. This is the main reason why the development of IoT is slowing down in agriculture. According to practitioners (Farooq et al. , 2. to overcome this problem, training and socialization are needed for farmers regarding the IoT system that will be implemented. C Infrastructure of the IoT system Challenges related to infrastructure in implementing IoT in agriculture. it includes the location of the equipment, the ability of individual farmers to manage fields, the software capabilities of the interacting system devices, and data monitoring in the field. Consideration of the placement of IoT devices is important. Especially static IoT devices (Akhter & Sofi. Because the appropriate location will impact the ability to operate perfectly, system reliability, and internet network connection. The location of the infrastructure is attempted to create the least device configuration. Because the more complex the configuration. It reduces operational capabilities and increases costs. The ability of individual farmers to manage fields is a challenge in implementing the IoT system (Akhter & Sofi, 2. Farmers do not understand the knowledge of field production. For example using fertilizers, pesticides, and inappropriate watering, lack of knowledge of the variations of plant types and field areas. The ability of software to interact with system devices is a challenge in itself. Because in the implementation it is operated by several people who must be well integrated. This integration capability is important. Because it involves the main components of agricultural IoT. The integration capability system involves technical, semantic, syntax, and The creation of the system is carried out with holistic and not partial considerations (Elijah et al. , 2. The challenge of field data monitoring for management, authority, and ownership. Technical regulation policies should be formulated. Such as related to data privacy, data security, technical issues, and internet bandwidth (Haseeb et al. , 2. The policy should be adjusted to the needs of each fieldAos area. The field's area is diverse. So technically the monitoring becomes diverse. This is a challenge in itself in the implementation of agricultural IoT. C Technical capabilities of the IoT system The technical aspect of technology is important. It is a loss if an individual subsystem of the system stops working. Especially, in the application of outdoor agricultural IoT systems. Where most IoT device units are exposed to the outside environment. Such as rain, wind, and sun. The decision to ensure the supply of spare parts is one of the solutions that must be Another technical challenge is the internet connection. A good internet connection is needed for the IoT system to work consistently. However, most agricultural areas are located in rural, especially in developing countries. High-speed and reliable internet connections are still not evenly distributed. The environmental security factor is the next technical challenge. The agricultural IoT system is infiltrated and damaged by irresponsible people. This endangers all types of information at all levels of the system. Data security techniques such as encryption, and temporary identification are needed. Data security techniques must be adjusted to the agricultural IoT system being implemented. Adjustments can be made by considering whether data is dynamic or not. Then the IoT system does not use complex algorithms. Due to limited resources such as memory, processing, and power communication (Marjani et al. Large-scale IoT systems are often vulnerable to hacker attacks (Elijah et al. , 2. Sumarsono et al A Vol 6. 2025: 1040-1071 Other security challenges are sensor devices vulnerable to temperature, animal attacks, and C Data analysis capabilities from IoT system The ability to analyze data from monitoring systems is a challenge in itself. The challenges include data integration, data knowledge mining, and data visualization. Challenges in data integration such as combining data of different formats, to create a uniform display. Data integration produces accurate information data. But, it is not easy to combine data from different structures. According to (Savaglio et al. , 2. , it is necessary to develop IoT data integration solutions from various sources efficiently. Such as using several algorithm methods. Then compare and choose the most accurate and efficient in terms of computation, communication requirements, and energy consumption. Next is the challenge related to data mining knowledge. How to produce the most efficient and accurate descriptive and predictive solutions for big data. So that the predictions are accurate to generalize new data. The nature of Big Data has high velocity, veracity, and volume of data. So needed knowledge of data mining. Such as integration, cleansing, extraction, exploration, transmission, and reduction. The challenge is even higher when using a cloud computing platform. The cloud platform can store larger data. However, if the agricultural big data analysis can be done and understood. Then it will be useful for precision Then the challenges related to data visualization. Data visualization is important to solve. Because of the complexity and high speed of big data from agricultural IoT. According to (Guragain et al. , 2. the solution for visualization data can use a cloud computing platform that has a Graphic User Interface (GUI) feature to make it easier to dig into data. The design of IoT-based monitoring system proposed in the article is designed to be able to monitor weather-baglog parameters automatically, in database centers, in real-time, and operational all day. The design of this monitoring system is different from previous research. presented in Table 1. Furthermore, this tool system is a development of previous research results (Sumarsono, et al. , 2. , (Sumarsono, 2. The function features of the tool system are adjusted to the use in oyster mushroom cultivation. Adjustment of monitoring features is the communication protocol network, dashboard display, and database center server. Where the communication protocol network uses MQTT. Then the data displayed in the graph uses the NodeRED application. The database center server uses a Raspberry Pi. Whereas the previously created monitoring system uses the hypertext transfer protocol (HTTP) communication protocol Then use a localhost display and a laptop database center. However, this system has limitations in operational time not all day. Whereas with this proposal monitoring system, the limitation can be solved. Also, with more parameters research can be monitored. Research Methods The research method uses an experiment design and quantitative analysis. The research object is the oyster mushroom and the weather-baglog parameters monitoring tool system. Figure 2 shows the process of the weather-baglogs parameters monitoring system based on IoTMQTT-Nodered for oyster mushroom cultivation rooms. Sumarsono et al A Vol 6. 2025: 1040-1071 Fig. IoT-MQTT-NodeRED Based Oyster Mushroom Cultivation Rooms Weather-Baglog Parameters Monitoring System Process Based on Figure 2, there are 4 parts to the monitoring system, as follows: Part 1: multi-sensor data acquisition, for acquiring sensor data on weather-baglog parameters in the cultivation room. The first part by assemble sensors of ambient temperature, humidity, light. CO2 level, and 7in1 soil sensors . itrogen, phosphorus, potassium, pH, moisture, temperature, electrical_conductivit. Sensor components are assembled in microcontrollers embedded with a data acquisition program system. Part 2: protocol of data communication to the server by using MQTT. MQTT is a communication protocol that connects weather-baglog parameter data from part 1 to the Where the Raspberry Pi is a server that turns on continuously for the data communication process. The data is stored and displayed by the NodeRED platform. NodeRED is a middleware application that functions as a data display dashboard in the form of graphs or numbers. This application is also an intermediary in storing data on the server. The data is stored in a file with the CSV type. Part 3: monitor weather-baglog parameters data-blog with a smartphone. The data displayed on the NodeRED dashboard can only be accessed from a computer/laptop/Raspberry Pi. cannot be accessed directly via smartphone. The NodeRED dashboard can be accessed from a smartphone by using the Ngrok hosting platform. It aims to make it easier for farmers to monitor weather-baglog parameter data via a smartphone. Part 4: analysis of data sensors for precision agriculture. Data parameters are micro-weather parameters such as relative temperature, humidity, lights, and CO2 levels. And baglog parameters such as nitrogen, phosphorus, potassium, pH, temperature, moisture, and electrical conductivity. The first analysis is to get the best model for the classification of ideal conditions based on weather-baglog parameters. The analysis method uses several machine learning algorithms. That will be compared accurately to find the best classification The machine learning algorithms used are linear discriminant analysis (LDA), classification regression tree (CART), k-nearest neighbor . NN), support vector machine (SVM), and random forest (RF). Based on the results, obtain the dominant parameters that affect the ideal conditions in the cultivation room. Next, the second analysis is to evaluate the process capability of the dominant parameters against ideal conditions rooms. Evaluation using the capability process analysis (CPA) method. The evaluation results are based on the Cp and Cpk values. That shows that the dominant parameter data is precise and accurate to ideal conditions or is not. 1 Research object and sample The research object is the cultivation of oyster mushroom based monitoring system with IoT technology. The oyster mushroom is an edible mushroom that has nutritional content and Sumarsono et al A Vol 6. 2025: 1040-1071 The cultivation process is easy, has tolerance to chemicals, and has a wide temperature range. Then the ability to grow in a short time with a lot of results (Ejigu et al. The cultivation process uses plastic bags for substrate mushroom spawn growing. The substrate is formulated with a mixture of dry sawdust, rice bran, and limestone with a mass ratio of 100:10:1. At the same time, water is added to the mixture with a moisture content of 50p%. After that, it is then packed and compacted into plastic bags measuring 35 cm long and 18 cm wide. The substrate bag is equipped with a plastic neck and hole cover to insert the oyster mushroom spawn. Furthermore, the substrate bag is pasteurized for 4-6 hours with a temperature between 100-1210 C. Then cooled to room temperature and mushroom spawn is Previously, the mushroom spawn was sterilized, before being inserted into the substrate bag. All substrate bags filled with oyster mushroom spawn will be placed in the incubation chamber until the mycelia have fully colonized (Fasehah & Shah, 2. Substrate bags that already contain colonized mycelia are called baglog. The research was conducted in a home-based mini-greenhouse oyster mushroom cultivation room. The research sample data was obtained 7 days between August 27 September 02, 2024. Where the data unit was taken every 12 seconds. The total initial data was 50,400. According to (Chen et al. , 2. the massive data generated by IoT requires outlier data detection for data validation. So needed to detect outlier data in the initial data. Steps to detect outliers: . calculate the middle distribution value . = quartile up (Q. - quartile low (Q. calculate the lower outlier limit value (LLV) = Ql - 1. calculate the upper outlier limit value (ULV) = Qu 1. identify data that is less than LLV, it is the lower outlier . identify data that is greater than ULV, it is the upper outlier data. After screening the outlier data, the sample data was obtained to be 49,174. The large amount of research data samples throughout the day-night has represented the population to answer the research Where the aim is to monitor micro-climate and baglog parameters throughout the day and night, and to analyze the ideal cultivation space conditions or not. Observation data acquired from the monitoring system will be updated with a time interval of 12 seconds. The consideration is to obtain detailed data. Data movement patterns with short time intervals will make it easier to detect valid data or not. It is more precise to know whether the data movement is stable or not. A good monitoring system is when the data produced moves steadily and slowly and does not fluctuate drastically up and down. This statement is alignment with (Alghazzawi et al. , 2. technically the radio board microcontroller is connected to the network every 3 seconds. So to give more delay in this system, the board should be update data with more than 3 seconds. For this system to connect the network is determined as 12 seconds. The other research (Amr et al. , 2. updates data to the network layer with a time of 16 seconds for temperature, humidity, and moisture data The display of the oyster mushroom cultivation room research site and the monitoring tool system is presented in Figure 3. The cultivation room is a mini-greenhouse measuring 150 cm long, 140 cm wide, and 190 cm high. The room can accommodate 60-120 baglog units and a place for the tool system. Baglog and tool systems are placed on shelves. The monitoring tool is equipped with an LCD screen that displays the values of the DHT22. LDR, and 7in1 soil The DHT22 and LDR sensors are placed near the baglog. Then the 7in1 soil sensor is plugged into the baglog. Furthermore, other devices are the Raspberry Pi server, computer monitor-keyboard-mouse, and WiFi modem. The Raspberry Pi server and WiFi modem must be on to run the data transmission process from the monitoring tool to the server. Sumarsono et al A Vol 6. 2025: 1040-1071 Fig. Research Site And The Monitoring Tool System Of The Oyster Mushroom Cultivation Room 2 Weather-baglog parameters of oyster mushroom cultivation Weather-baglogs data information in the mushroom cultivation room will be a tool to obtain optimal mushroom yields. Overall, the cultivation of oyster mushrooms requires a moderate temperature between 18-30 0C to grow well (Abdurrahman et al. , 2. Then with humidity between 65-95% (Marcelo Barba Bellettini et al. , 2. At the stage of mushroom seedling growth mycelium, the ideal temperature is 30-310C and the ideal humidity is between 70-80%. Furthermore, the ideal temperature for growing mushroom fruit is around 27-30 0C and humidity between 80%-90%. The next weather parameter is light. The light parameter does not affect the development stage of the mushroom mycelium. But at the stage of growing mushroom fruit, it becomes a determining factor for high-quality mushrooms. Fruiting body development is influenced by light intensity and light duration. Oyster mushrooms that grow between 50 - 200 lux light have a higher functional content compared to light intensities outside these limits (Mohammed et al. , 2. According to (Fasehah & Shah, 2. , the hood size and stem length of mushrooms have a positive correlation with light intensity. So that an increase in light intensity increases the size of the mushroom hood. Furthermore, the parameters baglog that are monitored are micronutrients which include nitrogen, phosphorus, and phosphate (NPK). The chemical factors include pH, moisture, temperature, and electric conductivity. Design and analysis of IoT-MQTT-NodeRED-based oyster mushroom cultivation room monitoring system 1 Component design in part 1: Multi-sensor data acquisition The design contents of the components in part 1 of the monitoring system are described from the circuit schematic of multi-sensor data acquisition. Details are presented in Figure 4. Sumarsono et al A Vol 6. 2025: 1040-1071 Fig. Schematic of Multi-Sensor Data Acquisition Circuit For Weather-Baglog Parameters Based on the component circuit of the multi-sensor data acquisition subsystem in Figure The work process of the Arduino uno r3 microcontroller . is the first The Arduino uno r3 microcontroller functions to detect the value of weatherbaglog parameters through sensors by first embedding a work program system into the This microcontroller is programmed to read and display the sensor value. Furthermore, it performs serial communication to the NodeMcu Esp8266 v3 microcontroller by capturing and responding to data requests from and sending to the Nodemcu Esp8266 v3 . In embedding the program syntax with the C language to the microcontroller. Then upload the program syntax through the Arduino integrated development environment (Arduino IDE) application . The Arduino uno r3 microcontroller power source uses 5 volts. The Arduino uno r3 microcontroller circuit with sensors is connected to the NPK 7in1 sensor . DHT22 temperature-humidity sensor . LDR light 5K1 resistor sensors . , and MQ-135 sensor . Then connected serially with the second microcontroller NodeMcu Esp8266 v3 . It is a transmitter tool that sends multi-sensor data to part 2 and part 3. The circuit system positions Arduino uno r3 as the parent microcontroller and NodeMcu Esp8266 v3 as the child microcontroller. The sensor used is the NPK 7in1 RS484 soil sensor . This sensor measures 4 chemical parameters of the baglog: pH, moisture, temperature, and electrical conductivity. Then measure 3 micronutrients namely nitrogen, phosphorus, and potassium. The sensor is serially connected to the output side of the RS485 TTL UART converter . This output side has 4 pin wires in brown, yellow, blue, and black colors. The yellow and blue wires are connected to the RS485 converter. Where the yellow wire is to the converter pin A, the blue wire to the converter pin B. Then the brown wire is to pin ( ) and black to pin (-) of the 5 to 12volt voltage adapter . Then, from the input side of the RS485 converter which has 4 pins and is connected to the Arduino uno r3 microcontroller, namely Gnd to Gnd. Vcc to 3. Rxd to D2. Txd to D3 (Postolache et al. , 2. , (Gottemukkala et al. , 2. The NPK 7in1 RS484 soil sensor is used in this system because it can detect more soil elements than other types of soil sensors. It also has the durability of five stainless steel probes that are resistant to rust, salt, and corrosion. Another advantage according to (Gottemukkala et al. , 2. This module supports half-duplex communication that converts TTL-level signals into RS485-level differential voltage signals. This allows long-distance communication with better immunity to This module is usually compatible with development boards and microcontrollers that operate in the low supply voltage range of 3. 3V to 5. 5V such as Arduino uno r3. It makes low energy. Sumarsono et al A Vol 6. 2025: 1040-1071 The NPK 7in1 soil sensor calibration calculation is carried out in the Arduino IDE NPK ttps://w. in/product-page/npk-7-in-1-soil-senso. , as follow: First, defines the query the data of the nitrogen, phosphorus, potassium, conductivity, temperature, moisture, and PH value sensor in byte form: byte queryData[] = . x01, 0x03, 0x00, 0x00, 0x00, 0x07, 0x04, 0x. holds 19 bytes of data: byte receivedData. Second, the calculation of the 7-in-1-soil-sensor value in the program looping: send the query data to the NPK 7in1 soil sensor and delay 1 second: mySerial. ueryData, sizeof. ueryDat. check if there are enough bytes available to read: ySerial. available() >= sizeof. eceivedDat. ) { mySerial. readBytes. eceivedData, sizeof. eceivedDat. //Read the received data into the receivedData array // Parse and print the received data in decimal format unsigned int soilHumidity = . eceivedData. << . | receivedData. unsigned int soilTemperature = . eceivedData. << . | receivedData. unsigned int soilConductivity = . eceivedData. << . | receivedData. unsigned int soilPH = . eceivedData. << . | receivedData. unsigned int nitrogen = . eceivedData. << . | receivedData. unsigned int phosphorus = . eceivedData. << . | receivedData. unsigned int potassium = . eceivedData. << . | receivedData. //Based on the datasheet. The value of the sensor pH, moisture, and temperature are divided by 10 times. But the others sensor the real-time value. float pH = soilPH / 10. int moisture = soilHumidity / 10. int temperature = soilTemperature / 10. The DHT22 sensor circuit . is a digital sensor to detect ambient temperature and humidity (Rukhiran et al. , 2. , (Chong et al. , 2. The DHT22 sensor uses a thermistor and capacitor to measure ambient temperature . C) and humidity . -100%). The DHT22 sensor is connected to Arduino uno r3, between pin ( ) to 5v. pin (-) to Gnd and pin Out to D4. According to (R. Rahman et al. , 2. , (Adhiwibowo et al. , 2. The DHT22 has been calibrated in its manufacture, providing fairly accurate temperature and humidity readings. LDR (Light Dependent Resisto. resistor 5K1 . is a sensor to detect light intensity (Subedi et al. , 2. The sensor value will change according to the light intensity. The higher the sensor value, it mean the higher the light level. This sensor is connected to Arduino uno r3, between the Gnd pin Arduino to the first leg of the 5K1 resistor and the second leg of the resistor to the first leg of the LDR. Then the first leg of the LDR is connected to pin A0 Arduino uno r3. Furthermore, the second leg of the LDR is connected to the 5V pin of Arduino uno r3 (Sumarsono et al. , 2. Light value in lux units. Calibration of the lux value is carried Arduino IDE LDR ttps://w. com/projects/design-a-luxmeter-using-a-light-dependentresistor/). First, defining variables: #define MAX_ADC_READING 1023 #define ADC_REF_VOLTAGE 5. #define REF_RESISTANCE 5000 #define LUX_CALC_SCALAR 12518931 #define LUX_CALC_EXPONENT -1. Second, the calculation of the lux value in the program looping: the digital representation of the analog voltage: float lights = analogRead(A. the digital representation must be converted back into a voltage by scaling the analog-to-digital converter value to the reference voltage: float resistorVoltage = lights / MAX_ADC_READING * ADC_REF_VOLTAGE. subtract the resistor voltage from 5V: float ldrVoltage=ADC_REF_VOLTAGE-resistorVoltage. Sumarsono et al A Vol 6. 2025: 1040-1071 the resistance of the LDR must be calculated based on the voltage divider circuit . esistor voltage x 5K): float ldrResistance=ldrVoltage/resistorVoltage*REF_RESISTANCE. calculate the lux value using the pow function for the power function. While the base value of the power function is ldrResistance, and the exponent value is LUX_CALC_EXPONENT: Lux = LUX_CALC_SCALAR * pow. drResistance. LUX_CALC_EXPONENT). The MQ-135 . is a gas sensor that detects air quality. This sensor can detect gases such as carbon dioxide, ammonia, nitrogen oxide, and alcohol ( Kumar et al. , 2. In this system, the MQ135 sensor detects carbon dioxide levels in the oyster mushroom cultivation The MQ135 sensor circuit is connected to Arduino uno r3: Gnd-Gnd pin. Vnc-5V pin. Aout-A1 pin. CO2 values are measured in ppm units. Calibrate the MQ 135 sensor by calculating the ppm value using a nonlinear equation from the datasheet "sensitivity characteristics of the MQ-135" . ttps://w. com/Datasheet/Sensor/MQ-135. The nonlinear equation function of the ppm value = a(Rs/R. Where a = the coefficient function, b = slope function. Rs/Ro = sensor resistance at various concentrations of gases vs. resistance at 100 ppm of NH3 in clean air. The calculation of ppm is carried out in the Arduino IDE ttps://davidegironi. com/2017/05/mq-gas-sensor-correlationfunction. XyxLkIgzbb. First, defining variables: sensor input pin MQ 135 in analog pin-1 on Arduino uno r3: int mqInput = A1. pull-down resistor value: int mqR = 22000. value of sensor resistance at 100 ppm of NH3 in the clean air (R. : long Ro = 41763. minimum value for Rs/Ro: float minRsRo = 0. maximum value for Rs/Ro: float maxRsRo = 2. coefficient of function . : float a = 116. slope of function . : float b = -2. Second, calculation of ppm value in the program looping: reading analog sensor value between 0-1024: int adcRaw = analogRead. qInpu. calculate sensor resistance at various concentrations of gases (R. : long Rs = (. 0 * mqR) / adcRa. - mqR. calculate the ppm value using the pow function for the power function. While the base value of the power function is RsRo, the exponent value is AobAo slope coefficient, and AoaAo is the coefficient function: float RsRo = . Rs / . Ro. float ppm = a * pow(RsRo, . The second microcontroller NodeMcu v3 . uses a voltage of 5 volts. This microcontroller is used for WiFi connection and controls data requests from the first microcontroller by serial communication (Sumarsono et al. , 2. This microcontroller is connected to the first microcontroller Arduino uno r3 via pin D6 and Txd. D7 and RXD. Gnd and Gnd. Then with the LED light . on pin Gnd and Gnd. D2 and Positive. The LED light is used as an indicator that the internet network is connected to the microcontroller. If the LED is lit, there is an internet connection, and vice versa. The second microcontroller is programmed to communicate serially with Arduino uno r3 and send data to the Raspberry Pi The program content . is embedded in the first microcontroller Arduino uno r3 to detect weather-baglog sensor data, display data to the LCD screen, and serial communication with the second microcontroller. The program content includes four parts. The first part is importing libraries Wire. LiquidCrystal_I2C. SoftwareSerial. DHT. Defining sensor pins: DHT22. MQT 135. LDR. NPK sensor 7in1. Defines sensor variable parameters: DHT22. LDR. MQT 135. NPK sensor 7in1. I2C LCD 20x4. The second part is creating a "void setup" which contains: setting up the serial monitor and RS485 serial for the NPK sensor, and DHT22 Then initiate the 20x4 I2C LCD and enable the pin mode of the MQ135 sensor as input. The third part creates a "void loop" that contains work commands repeatedly to read data requests from the second microcontroller. If there is a request, data will be sent in the form of an Next, the code command displays the sensor value on the 20x4 I2C LCD screen. The fourth part creates "void senddata" which contains reading and sending data values from the NPK 7in1 soil. DHT22. LDR, and MQ135 sensors. Sumarsono et al A Vol 6. 2025: 1040-1071 The contents of the program embedded . in the second microcontroller NodeMCU Esp8266 v3 for WiFi connection, controlling data requests from the first Then send data to the Raspberry Pi server. The program content has six parts. First part: importing libraries: ESP8266HTTPClient. ESP8266WiFi. SoftwareSerial. PubSubClient. Defines communication serial pins between microcontroller 1 and 2. LED light Defines variable parameters: data array, sensor values. WiFi configuration, delay replacement millis variable. MQTT configuration for broker and client, hosting sensor values to MQTT. The second part is to create a "void wifi" for connection with the internet network. The contents of the program are set up: pin mode of LED lights and WiFi. If connected to the internet, the LED lights up and vice versa. The third part creates a "void reconnect" that contains a connection command with the MQTT communication protocol. The fourth part creates a "void callback" that contains the command to send data to the MQTT topic. Then the MQTT topic requests data back to the second microcontroller. The fifth part creates a "void setup" which contains: the setup of the serial monitor, and serial data, calls "void wifi", calls "void callback", and setup of the MQTT server. The sixth part creates a "void loop" that contains work commands repeatedly to read and request array data from the first Then send data to the MQTT topics address for every 12-second time interval. Where the delivery is through the MQTT broker "broker. 2 Second part design: protocol communication to the server The second part is connected to the first part by uploading the program syntax "MQTT configuration" on the second microcontroller. MQTT is a messaging protocol that connects between publisher clients through a broker network to be received by listener clients. MQTT is used in this system. Because it has a simpler configuration than other transmission communication protocols such as Hypertext Transfer Protocol (HTTP). A simpler configuration of MQTT makes faster in data transmission than HTTP (Masykur et al. , 2. Because more data transmission speed, so makes it easier to be accurate in monitoring weather-baglog data. MQTT also makes it easy to add new clients as listeners or publishers on certain topics. The sensor data is displayed on the NodeRed dashboard under the name "Monitoring". Previously, the NodeRed application was installed on the Raspberry Pi server. How to install NodeRed to Raspberry Pi is presented at the link https://nodered. org/docs/getting-started/. Next, activate the NodeRED application via "command prompt" by writing the command "node-red". Specifications Raspberry Pi 4 model B with 8 GB random access memory (RAM). With 8 GB RAM, enables the Raspberry Pi to run programs and perform tasks more powerfully. Then use a microSD storage of 128 GB and a 5 volt 3 ampere adapter with a USB type C cable. Furthermore, a monitor screen is needed for display with a micro HDMI to HDMI cable Also requires a computer keyboard and mouse for operation. Consideration of using a Raspberry Pi as a server. Because it has a WiFi module to connect to the internet network. Also it able to be turned on continuously without stopping. So that the monitoring system and data acquisition process can be carried out throughout the day non-stop. The design of protocol communication to the server . is as follows. First, as the sender's publisher is the IoT device part 1 will send 11 data to the topic in the AuMonitoringAy dashboard of NodeRed. Second, the topic name is "tiram2". Third, the broker is use "broker. com:1883". The broker is the middleware that forwards the 11 sensor data from the sender to listeners in the topic "tiram2". The topic Autiram2" is subscribed to by 11 listeners to display data in charts and gauges. The names of the 11 listeners are temperature, humidity, light. CO2 levels, nitrogen, phosphorus, potassium, pH, moisture, temperature, and electrical The topic also subscribed to 1 listener to store data on the Raspberry Pi server. Illustrations of the results of implementing the MQTT configuration are presented in Figures 5 and 6. Figure 5 shows the flow of messages on a topic on the NodeRED dashboard. The message flow in NodeRed is the topic "tiram2" connected to the 11 AuextractAy function and then connected to the graphic and gauge display. And message flow for storage data in NodeRed is the topic "tiram2" Add the "timestamp" function to store data in the folder Raspberry Pi. Then Figure 6 shows 11 listeners that display data in charts and gauges. Figure 5 is accessed in Raspberry Pi, via type on the browser http://localhost:1880/#flow. Then figure 6 Sumarsono et al A Vol 6. 2025: 1040-1071 is accessed via the link http://localhost:1880/ui. Based on Figure 6, the graphical display in a chart shows the movement of data values every 12 seconds in one-hour intervals. Then display in the gauge that shows the data value for the last time every 12 seconds. The 12-second interval is to obtain detailed data. Data movement patterns with short time intervals will make it easier to detect valid data or not. It is more precise to know whether the data movement is stable or not. If there is an error in the system. Then it will be known immediately from the graph. The graph will show unnormal values such as too high, empty data, or the graph does not move. Next, restart or turn off the system monitor device, then turn it back on or check the cable connection on the problematic sensor. Soon the system device will return to normal work. Error conditions generally occur because the internet network is low. Or because there is a problem with the wiring, and the sensor device. Fig 5. NodeRed Dashboard: Message Flow Between Nodes Topic-Function-Graphics and Data Storage Fig 6. NodeRed Dashboard: Chart and Gauge Output 3 Design part 3: monitor weather-baglog parameters with smartphone Part 3 serves to monitor the value of weather-baglog parameters of oyster mushrooms on a mobile basis via smartphone. However, monitoring can also be done on a computer or laptop with the NodeRED application installed by subscribing to the same topic. But this becomes less It cannot be accessed mobile from anywhere. So mobile access via mobile phones by farmers is needed. It makes monitoring of weather-baglog data can be done anywhere and As long as the smartphone is connected to the internet network. Monitoring in part 3 by hosting the NodeRed dashboard link on the Ngrok platform. According to (Praghash et al. , 2. Ngrok is the platform used to tunnel a network and process data. It is an open-source or paid web hosting service globally. The hosting process for the graphical output dashboard of NodeRED on ngrok. First, open ngrok. com website, then register the user with an email and log in. Then, download and install the ngrok application on Sumarsono et al A Vol 6. 2025: 1040-1071 Raspberry Pi. Second, activate Ngrok hosting by entering the identity "auth token" by copying and pasting it into the "command prompt" with the syntax "ngrok config add-authtoken". Authtoken is written on each user's Ngrok account. After activation, it will get a local-host Third, enter the localhost address and port value by writing the syntax "ngrok http http://localhost:". The port value for a computer or laptop is 8080. While for Raspberry Pi uses port 1880. Fourth, the Ngrok hosting service will be active, which is indicated by the appearance of the Ngrok application display. The display shows that the hosting is active with the URL name. Then copy the URL name and paste it into a web browser. The flow message dashboard of NodeRED will appear, as shown in Figure 5. Furthermore, for displays graphical output as shown in Figure 6. On the URL name, the word "#flow" is replaced with the word "ui". After that, use this URL link and open it on the smartphone. So the chart and gauge graph output will be accessible from the smartphone. 4 Data analysis of monitoring weather-baglog parameters in the cultivation room The data generated by the monitoring system are weather and baglogs parameters. Weather parameters include temperature, humidity, light, and CO2 levels. Baglog parameters include micro-nutrients such as nitrogen, phosphorus, potassium and chemical factors such as pH, temperature, moisture, and soil electrical conductivity. Analysis of data by testing the effect of weather-baglog parameters on the ideal conditions of the oyster cultivation room. The results conclude the dominant parameters that affect the ideal conditions of the cultivation room. The analysis method uses classification machine learning algorithms. Several machine learning algorithms are compared to obtain the best classification model of ideal cultivation conditions. As independent variables are weather-baglog parameters. As dependent variable is the classification of cultivation room conditions. Which include the categories "no ideal lower", "ideal", and "no ideal upper". Where the category of cultivation room conditions is obtained by means of first, categorizing temperature, humidity, and light data into three categories: low, ideal, and high. Second, sum the data categories in step 1 to get the total score. Third, then make three interval classes of category data, class 1 = no ideal lower. class 2 = ideal. class 3 = no ideal upper. The interval class is calculated from the minimum, maximum, and interval width Minimum data = 1 x 3 = 3. Maximum data = 3 x 3 = 9. Width of class interval = . aximum - minimu. / number of classes = . - . / 3 = 2. So class interval is 1 = score 3 to 4. class 2 = score 5 to 6. class 3 = score 7 to 9. Fourth, based on the results in total score . then converted to the interval class . So the total score of the weather condition category is obtained that 1 is no_ideal_lower, 2 is ideal, and 3 is no_ideal_upper. Furthermore, the ideal weather reference for oyster mushrooms is according to (Bellettini et al. , 2. the ideal temperature for growing oyster mushrooms is around 26-300 C, humidity between 80%-90%. Then the ideal light for growing mushrooms with a value of 50 - 200 lux (Mohammed et al. , (Hadi et al. , 2. Data processing with classification machine learning using R-packages software with Caret library. According to (Ji et al. , 2. , the R package has the ability in the latest data separation method to develop models in a mature, maintainable, consistent, repeatable, and transparent manner. Thus increasing the generalization of the resulting model. The stage of data analysis is according to (Brownlee, 2. First opened the Rcmdr library to import the research The data type for the independent variable is "numeric". Then the data type for the dependent variable is "factor". Second, activated the library of caret, lattice, and ggplot2. Then activated for the data file to be analyzed. Third, divide the dataset into the training dataset about 80%, and the validation dataset about 20%. Fourth, displays summary values of the training dataset in description statistics such as minimum, quartile-1 (Q. , median, mean, quartile-3 (Q. , and maximum for each research variable. Fifth, comparing several classification machine learning algorithms namely linear discriminant analysis (LDA), classification regression tree (CART), k-nearest neighbor . NN), support vector machine (SVM), and random forest (RF). Sixth, selecting the best algorithm model based on the accuracy value. Seventh, validate the best model using the validation dataset to determine the accuracy value based on different datasets. Eighth, calculate the level of importance of each independent variable to the dependent variable. So know the dominant parameters influencing the condition of the cultivation rooms. Sumarsono et al A Vol 6. 2025: 1040-1071 Next, evaluation of the dominant parameters of the ideal room condition. Evaluation by checking the value of the precision and the centering of the distribution of the dominant parameters based on ideal conditions. The analysis method uses capability process analysis (CPA). According to (Gilligan et al. , 2. , (Kumar & Singh, 2. the CPA method is used to check, analyze and improve process data, based on specification data. Data processing using the Minitab application. Minitab is a recognized and trusted software for performing statistical data analysis such as experimental design, and capability process analysis (Jasim et al. , 2. The stages of capability process analysis are first plotting data using run charts and histograms. Second, calculating the specification width (Spec Widt. reduces the upper spec limit (USL) with the lower spec limit (LSL) on the histogram. USL is the upper limit of the ideal condition specification and LSL is the lower limit of the ideal condition specification. Third, calculating the process width (Process Widt. is to reduce the upper central limit (UCL) with the lower central limit (LCL) on the histogram. UCL is the value of the largest data . and LCL is the value of the smallest data . Fourth, calculate the value of the process capability index (C. , namely Spec Width divided by Process Width. The Cp value is to determine the distribution of monitoring data against ideal specifications. It is to check the precision data set based on specification data. The ideal Cp value is > 1. Fifth, calculate the cumulative value of process capability (Cp. , which is the distance value from the mean of the process data to the nearest spec limit. Then it is divided by the distance value from the mean process data to the process limit (LCL or UCL). The Cpk value is to determine the location of the monitoring data to the ideal specification. It is to check the centering data set based on specification data. The ideal Cpk value is greater than 1. Figure 7 shows some possible results of a process capability histogram plot based on the Cp and Cpk values. Fig. Possible Cp and Cpk Values of The Capability Process Analysis of The Data Set Based on Figure 7, the ideal capability process of the data set is when it has a minimum Cp and Cpk value of 1. 33 (Kumar & Singh, 2. This means that the monitoring data set has precise distribution data based on a Cp value greater than 1. 33, and has centered distribution data based on a Cpk value greater than 1. Precision distribution means that the data set does not widen and is within the upper and lower limits of specification. Then the center distribution means that the data set has a location in the middle between the USL and LSL specification Results and Discussions 1 Results The sample data used for monitoring weather-baglog parameters in the oyster mushroom cultivation room is 49,174 data. Data collection time was carried out 24 hours a day, seven days a night. So the complete value of the weather-baglog parameter is obtained for all clock time conditions: morning, afternoon, evening, and night. 1 Description of weather-baglog parameters in the cultivation room The descriptive results reveal the centering, spread, and trend pattern of the weatherbaglog parameters data in the cultivation room. It is presented in Table 2. Table 2 - Descriptive statistical values of the sample data Parameter Min Max Mean Median Quartile-3 Nitrogen . r/k. Phosporus . r/k. Phospat . r/k. Ph . Moisture (%) Soil_temperature . Sumarsono et al A Soil_conductivity . Lights . Relative_temperature . Humidity (%) CO2_level . Condition no_ideal_lower no_ideal_upper Total Vol 6. 2025: 1040-1071 21,723 44. 21,532 43. 5,919 12. 49,174 100. Based on Table 2, the value of the median, mean, and standard deviation (SD) of baglog parameters data. The parameter values for nitrogen (N), phosphorus (P), and phosphate (K) in the baglog. Where each in order has a median and mean A SD, namely 7 and 7 A 1, 62 and 62 A 55 and 55 A 3 gr/kg. The value of standard deviation shows a relatively small spread around the mean. Which is 1 to 3 gr/kg. Furthermore, the data-centering statistics are the median and Which have relatively the same value. It means that the value of the NPK parameter in the baglog is relatively stable. Based on Table 2, it is known that relatively stable data results are also obtained for the parameters of baglog: pH, moisture, temperature, and electric Where it has a median and mean that is relatively the same. Then the mean value with a standard deviation is relatively small. The following values are median and mean A standard deviation, for pH = 5 and 4. 9 A 0. 2, moisture = 14 and 14 A 1%, temperature = 28 and 28 A 1 0C, electric conductivity = 219 and 219 A 7. The value of weather parameters in the cultivation room for temperature, humidity, and CO2 level values are relatively stable. The median and mean values are relatively the same value, and small spread of data around the mean. The median and mean A standard deviation for temperature = 27. 4 and 27. 8 A 1. 9 0C. humidity = 77 and 76 A 8%. CO2 level = 16 and 19 A 10 While somewhat different for the parameter of the light which has more varied data Where the median value is 44 lux and the mean A SD is 100 A 98 lux. Furthermore, the proportion value of the cultivation room condition category for the ideal category is 44. 2%, the no_ideal lower category is 43. 8% and the no_ideal upper category is 12%. Next, the trend pattern of the weather-baglog parameter data uses a line graph. The line graph illustrates the sampling distribution for the mean in hours throughout 24 hours for 7 days. The horizontal axis is the mean value of the weather parameter data-baglog in hours. The vertical axis is the clock time for 24 hours. The graph illustration tells the up and down movement of the weather-baglog parameters and room condition during 24 hours. Details are presented in Figure 8. Sumarsono et al A Vol 6. 2025: 1040-1071 Fig 8. Distribution of Sampling Mean In Hours During 24 Hours For Weather-Baglog Parameters And Room Condition Based on Figure 8, for the baglog parameter. There is a relatively similar pattern of data movement for nitrogen, phosphorus, phosphate, soil temperature, and soil conductivity There is a downward trend from 00 to 06 oAoclock. Then the upward trend starts from 07 to 16 oAoclock. Then the downward trend again starts from 17 to 00 oAoclock. Nitrogen with a value range between 5. 5 to 8 gr/kg, phosphorus between 59 to 65 gr/kg, and Phosphate between 52 to 58 gr/kg. The temperature and electrical conductivity have a downward and upward trend with a range of values between 26-300C and 214-225 units. But, it appears somewhat different for the pH parameter which has a random trend pattern of data distribution for 24 hours. But with a small range of values between 4. 9 to 5. The moisture parameter has a downward trend pattern from 00 to 15 oAoclock. Then an upward trend from 16 to 00 oAoclock. Where the magnitude of the downward and upward trends with values that are also not high, is 2 to 14. Based on Figure 8, for the weather parameter. The light level parameter is known to have an up-and-down data pattern. It is known from 17 to 05 oAoclock with relatively stable with a value below 50 lux. But, the light level rises from 05 to 13 oAoclock, and then the trend decreases from 13 to 17 oAoclock. The value range of the light is down and up between 50 to 250 lux. The next data movement pattern for the temperature parameter. It is a downward trend from 00 to 05 oAoclock. Then the upward trend starts from 05 to 13 oAoclock. Then the downward trend again starts from 13 to 00 oAoclock. The magnitude of the downward and upward trends ranges from 25 to 31 0C. The humidity parameter has a downward trend pattern from 05 to 12 oAoclock. Then the upward trend from 12 to 05 oAoclock. Where the magnitude of the downward and upward ranges from 63 to 87%. Furthermore, the CO2 level parameter has a downward trend pattern from 08 Sumarsono et al A Vol 6. 2025: 1040-1071 up to 03 o'clock. Then the trend increases from 03 up to 08 o'clock. Where the magnitude of the down and up trends ranges from 12 to 32 ppm. Next for trend pattern of the cultivation room condition category. The ideal conditions occur between 23 to 01 oAoclock, or between 06 to 11 oAoclock, or between 14 to 16 oAoclock. Then the no_ideal_lower condition occurs at 02 to 05 oAoclock or between 17 to 22 oAoclock. While the no_ideal upper condition occurs at 12 to 13 oAoclock. 2 Machine learning classification model: ideal conditions of the cultivation room The processing of classification models with machine learning methods using the Rpackages application with the Caret . lassification and regression tre. The analysis coding process and results are with several steps. First, open the Rcmdr library to import and activate the analyzed data with the name "data_monitoring", and write the code: >library Rcmdr. Second, enable library: lattice, ggplot2, caret, and active data "dataset_monitoring" to be a form of array data for analysis. Coding writing: > library. , > library. , library. , > dataset_monitoring <- data_monitoring. Third, divide dataset_monitoring into a training dataset is 80% and a validation dataset is 20%. Coding writing: > training validation <- data. raining,]. Fourth, activate the training data into a dataset array. Then displays the descriptive statistics of the training dataset in values: minimum, quartile-1 (Q. , median, mean, quartile-3 (Q. , and maximum. Coding writing: > dataset <- data. raining,], > summary. Five, divide the training dataset into two variables, namely the independent variable . and the dependent variable . Independent variables include nitrogen, phosphorus, phosphate, baglogpH, baglog-moisture, baglog-temperature, baglog-conductivity, lights, relative temperature, humidity, and CO2 level. Where the independent variables have an array data order from 1 to Then the dependent variable is "Condition" with the 12th array data order. Coding writing: > x <- dataset[,1:. , > y <- dataset[,. Sixth, comparing and selecting the best machine learning classification algorithm model with the criteria of the accuracy value. The classification algorithms used are linear discriminant analysis . , classification regression tree . , k-nearest neighbor . , support vector machine . , and random forest . Coding writing: > control <- trainControl. ethod="cv", number=. > metric<-"Accuracy"), > seed. , > fit. lda <- train(Condition. , data=dataset, method="lda", metric=metric, trControl=control, preProcess=c("center","scale")), >fit. cart <- train(Condition. , data=dataset, method="rpart", metric=metric, trControl=control, preProcess=c("center","scale")), > fit. knn fit. rf <- train(Condition. , data=dataset, method="rf", metric=metric, trControl=control, preProcess=c(AycenterAy,AyscaleA. Next, coding writing: > results <- resamples. da=fit. cart=fit. cart, knn=fit. knn, svm=fit. svm, rf=fit. ), > summary. Table 3 shows a comparison accuracy value of several machine learning classifications. Table 3 - Accuracy values of several machine learning classifications Accuracy model Min. 1st Qu. Median Mean 3rd Qu. Max. Based on Table 3, the accuracy of the random forest . model has the highest accuracy So that the random forest model was chosen to classify the ideal conditions in the oyster mushroom cultivation room based on weather-baglog parameters. Next step seven, validate the random forest . model using the validation dataset. Coding writing: > predictions confusionMatrix. redictions, validation$Conditio. The result is a very high accuracy value of the random forest model with validation data obtained, ranging Sumarsono et al A Vol 6. 2025: 1040-1071 99 to 1. Step eight, seeing the level of importance of the independent variable on the dependent variable. Coding writing: > importance <- varImp. rf, scale=FALSE) > print. Table 4 shows the level of importance of independent variables to dependent variable. Table 4 - Level of importance of independent variables to the dependent variable rf variable importance Overall Lights Relative_Temperature Humidity Baglog-Temperature Baglog-Conductivity Phosphorus Phosphate CO2_level Nitrogen Baglog-Ph Baglog-Moisture Based on Table 4, it is concluded that there are three dominant independent variables. Because it has a large importance value compared to others, namely lights, relative temperature, and humidity. So it can be concluded that the three independent variables are the dominant parameters that influence the ideal conditions in the oyster mushroom cultivation room. 3 Capability Process Analysis: Evaluation of dominant parameters to the ideal condition of the cultivation room Capability process analysis aims to evaluate the precision and the centering data set of dominant parameters based on the target value of an ideal condition. Evaluation by analyzing the level of conformity to the target value of ideal conditions. The evaluation method uses capability process analysis (CPA) with processing using the Minitab application. The results of the CPA analysis are presented in Figure 9. It is known that the Lights level parameter has a value of Cp is 0. 3 and Cpk is 0. Then the relative temperature parameter has a value of Cp is 47 and Cpk is 0. Next, the humidity parameter has a value of Cp 0. 25, and Cpk is -0. Overall, the three parameters show that are not precise and centered based on the target value of an ideal condition. Because the ideal capability process of data is when it has a minimum Cp and Cpk value of 1. This means that the condition of the light level, relative temperature and humidity parameters in the oyster mushroom cultivation room is still not meeting the ideal Sumarsono et al A Vol 6. 2025: 1040-1071 Fig 9. CPA results: The Precision and The Centering Data Set of Dominant Parameters Based on The Target Value of an Ideal Condition 2 Discussion The monitoring system can work all day and produce appropriate data. Although there are disturbances in the rare category. Disturbances are caused by internet weak or down networks or cabling disconnects between components. This is immediately known from the Nodered dashboard on the smartphone that displays abnormal data. To handle it by restarting the tool system, or check the connection between cable components. This method is effective in restoring the monitoring system to work properly. Before data analysis, initial data screening is carried out to eliminate abnormal data . utlier dat. Therefore, the results of data analysis from the weather-baglog parameter monitoring system can describe them properly. It is proven from the statistical value of data centering, and data distribution (Table . Sensor data values show a trend pattern that matches the clock conditions for morning, afternoon, evening, and night (Figure . Data sets that have mean and median values are relatively the same. It means that the data set is normally distributed. According to (Klesel et al. , 2. normally distributed data indicates that the amount of data is sufficient to obtain a high level of confidence. Sensor data sets also with small standard deviation values. It means that the data set is accurate around the mean value. This statement is alignment with (Lee et al. , 2. , (Singh et al. , 2. small Sumarsono et al A Vol 6. 2025: 1040-1071 standard deviation value can show the accuracy of data sets. Furthermore, to check the accuracy of sensor data. According to (Futagawa et al. , 2. the data generated by multi-sensors can be said to be appropriate if multi-sensors can work individually and do not affect each other . o crosstal. when in different conditions such as heat and cold. Based on the data results as shown in Figure 8. The movement of data trends in the morning, afternoon, evening, and night are appropriate which each condition. This means that the multi-sensors in the tool system worked individually, and no crosstalk. Then, according to (Rienzo et al. , 2. to prevent the effects of no-crosstalk multi-sensor by embedding the appropriate algorithm program syntax into the It means that the algorithm in the proposed monitoring system is appropriate. Because the effect of crosstalk multi-sensor does not occur. The design of the monitoring system is different from previous researchers. The monitoring system is designed based on IoT-MQTT-Nodered based with three-part IoT system architecture and functions. First, device layer: data acquisition of micro-weather sensors with DHT22 . emperature, humidit. LDR . ight intensit. , and MQ135 (CO2 leve. Next, a 7in1 soil sensor to detect baglog parameters (NPK, pH, moisture, temperature, and electrical Then, using serial communication between Arduino uno r3 and Nodemcu Esp8266 v3 microcontrollers. Also using the microprocessor Raspberry Pi 4B for the computer Second, protocol communication layer using MQTT. Third, application layer for acquisition and monitoring data using NodeRed dashboard and Ngrok platform. It makes data sensors that can be monitored mobile on a smartphone. This system becomes an additional reference for monitoring oyster cultivation. Because it has differences from previous research related to parameters data monitoring and IoT system architecture. Such as research from (Guragain et al. , 2. , (Kumar et al. , 2. only monitored four parameters temperature, humidity, light, and CO2. next research (Dipali et al. , 2. , (Dayananda et al. , 2. , (Ariffin et al. , 2. , (Rukhiran et al. , 2. , (Bunluewong & Surinta, 2. , (Rahman et al. , 2. only two parameters are humidity and temperature. then (R. Rahman et al. , 2. with parameters are humidity, temperature, and lights. next research (Nguyen et al. , 2. with parameters are humidity, temperature. CO2. research (Anggrawan et al. , 2. with parameters are moisture, pH, and temperature. research (Chong et al. , 2. monitoring for parameters are temperature, humidity, light, and moisture. and research (Irwanto et al. , 2. monitoring moisture, temperature, humidity, lights, and movement. Furthermore, the difference with previous research is IoT system architecture. Device level using microcontrollers: Esp32 (Guragain et al. , (Dipali et al. , 2. , (Anggrawan et al. , 2. , (Dayananda et al. , 2. NodeMCU Esp8266 v3 (Rahman et al. , 2. , (Ariffin et al. , 2. using Atmega 328 microcontroller (Kumar et al. , 2. using Raspberry Pi microprocessor (Nguyen et al. , 2. , (Rukhiran et al. using Nodemcu Esp8266 v3 microcontroller and Raspberry Pi microprocessor (Chong et , 2. using NodeMCU Esp8266 v3 and Arduino uno r3 microcontroller (Irwanto et al. , using Arduino nano and NodeMCU Esp8266 v3 (Bunluewong & Surinta, 2. using Esp32 controller and Raspberry pi microprocessor (H. Rahman et al. , 2. The previous research uses the communication protocol MQTT (Guragain et al. , 2. ThingSpeak IoT platform (Dipali et al. , 2. Firebase IoT platform (Rahman et al. , 2. HTTP webserver (Anggrawan et al. , 2. , (Ariffin et al. , 2. , (Kumar et al. , 2. , (Rahman et al. , 2. Arduino cloud platform (Dayananda et al. , 2. Blynk IoT platform (Chong et al. , 2. (Bunluewong & Surinta, 2. ThingerIO IoT platform (Irwanto et al. , 2. HTTP-Telegraf (Rukhiran et al. , 2. Next previous research uses the application layer for acquisition and monitoring data with the portal website (Guragain et al. , 2. , (Anggrawan et al. , 2. (Ariffin et al. , 2. , (Kumar et al. , 2. , (Rahman et al. , 2. using ThinkSpeak IoT dashboard (Dipali et al. , 2. using MIT App Inventor (Rahman et al. , 2. using YOLOv5 framework (Nguyen et al. , 2. using Arduino cloud platform (Dayananda et al. , 2. Blynk IoT platform (Chong et al. , 2. , (Bunluewong & Surinta, 2. using ThingerIO IoT platform (Irwanto et al. , 2. , using InfluxDB database and Grafana dashboard (Rukhiran et , 2. The component circuit of the proposed system can enhance the monitoring system-based IoT for oyster cultivation. The system uses serial communication microcontroller Arduino uno r3 and NodeMcu Esp8266. The use of two microcontrollers to divide tasks. Arduino uno r3 as a Sumarsono et al A Vol 6. 2025: 1040-1071 place for sensor operations and NodeMcu Esp8266 for WiFi connections connected to the MQTT network. This division of tasks lowers the workload of the microcontroller. This makes durable of this system. Even though it uses a multi-sensor to detect 11 parameters. This statement is alignment with (Lee & Lee, 2. combined microcontroller allows the workload to be lighter. Furthermore, this proposed system uses the communication protocol MQTT combined with the NodeRED dashboard display. It makes the data monitoring becomes a userfriendly display. This is in line with (Guragain et al. , 2. , (Mpofu et al. , 2. , (Brouzos et , 2. , (Bouali et al. , 2. that the interface of NodeRed provides simple nodes for writing, reading to databases and running web services. NodeRed is frequently used and compatible with the MQTT communication protocol in IoT and web-based systems. Another advantage, according to (Brouzos et al. , 2. MQTT has a simpler configuration. It makes less amount of data transmission, easy to add recipients of information data . or add senders . for certain topics. However, according to (Koutsougeras et al. , 2. MQTT also can be used for complex communication networks such as in manufacturing lines. The implementation of this monitoring system will realize precision agriculture in oyster mushroom cultivation. This system produces the information data that is needed for more precise processes and results. Based on the data of micro-weather and baglog parameter in the cultivation room. The farmers are known conditions in detail throughout the morning, afternoon, evening, and night. They can be compared with ideal conditions for evaluation. According to (Kwiatkowski & Harasim, 2. the ideal value for NPK in the baglog substrate is nitrogen (N) 26 g/kg, phosphorus (P) 11 g/kg, and potassium (K) 14 g/kg. Based on the system results of NPK value is still not appropriate with ideal conditions. Where the average value of N = 7 g/kg is less than ideal value. On the other hand, the value of P = 62 g/kg, and K = 55 g/kg which is greater than ideal value. Then, the pH value is an average of 4. 9 which indicates a nonneutral level. The average of moisture is 14% which is included in the dry category. But for temperature-baglog is an average 280 C. Which indicates ideal temperature conditions. Next, the electrical conductivity value is 219, indicating the conductivity of the mineral flow in the baglog is well. Based on these results, the pH and moisture of the baglog are not in ideal condition. water spraying control system-based IoT system is needed to stabilize the pH and moisture conditions of the baglog. This opinion is aligned with (Anggrawan et al. , 2. the best pH level is 5. 5, and humidity is 18% in oyster mushrooms. To meet that, the water spraying control system to the baglog with IoT technology is useful for stabilizing pH and moisture The implementation of IoT for precision agriculture cannot be separated from data analysis (Akhter & Sofi, 2. The precision of agriculture in this article analyzes the classification model of the ideal cultivation room and evaluates the ideal conditions that are affected by dominant parameters. Based on the highest accuracy value of the classification The random forest model was chosen to classify the ideal cultivation room based on weather-baglog parameters. These findings are in line with (Pinky et al. , 2. comparing three machine learning methods: Bagging. Boosting, and random forest to detect the edibility of The results showed that the random forest method was more robust than the others. Then. According to (Rahman et al. , 2. random forest is a machine learning algorithm for classification or regression. This algorithm classifies with a combination of several decision trees that differ in their average values. The goal is to increase the accuracy of predictions from the dataset. The greater the number of trees, the more accurate it will be. It is understandable because the weather-baglog data is set in the morning, afternoon, evening, and night. Where each time shows a tree that has a repeating during 7 days samples. It increases the number of trees and makes it more accurate. So that makes the results of the random forest model the most appropriate for this case study compared to other methods. Based on the best classification model. The parameters of light, temperature, and humidity are the dominant factors that affect the ideal conditions of the oyster cultivation room. This result is in line with the results of research (Rukhiran et al. , 2. , (Rahman et al. , 2. weather parameters such as temperature, humidity, and light are factors that cause vulnerability in mushroom growth. Then the same results from all researchers are in Table 1. They have the same conclusion that temperature and humidity affect oyster cultivation. Furthermore, when Sumarsono et al A Vol 6. 2025: 1040-1071 detailed the model results, show that light parameters have the greatest influence on the ideal oyster mushroom cultivation room. This is understandable because light is an important factor in the growth of oyster mushrooms (Dayananda et al. , 2. Then, the light source in this cases is greatly influenced by the supply of light from the sun. Therefore, an IoT-based control system is needed for artificial light. So that the amount of light in the cultivation room can be controlled to be ideal, between 50-200 lux. This opinion is in line with the results of previous researchers who created artificial light in the cultivation room with control of the LED lamp by microcontrollers (Dayananda et al. , 2. , (Rahman et al. , 2. , (Anggrawan et al. , 2. (Guragain et al. , 2. , (Irwanto et al. , 2. The next application of precision agriculture is to evaluate the precision and centering of a data set of the dominant parameters to the ideal conditions. Based on the results, the parameters of light, temperature, and humidity in the cultivation room have a level of conformity that does not meet the target value of ideal conditions. The data set of the light level is not precise and accurate to the target value of 50-200 lux. It tends to be a low specification level (LSL) of 50 lux at 5 pm to 5 am. And tends to upper specification level (USL) of 200 lux at 8 am to 3 pm. Then, the data set of temperature appears to have better precision and accuracy than the light parameter. However, it is still not precise and accurate to the target value of 25. 5 0C. It is known that the temperature data set tends to decrease below the LSL of 25. 5 0C with a high frequency from 00 am to 05 am. Conversely, the temperature tends to increase above USL 30. 5 0C from 10 am to 4 pm. Next, the same results for the humidity data set show that it is not precise and accurate to the target value of 79. The most data set is known to spread below LSL at 79. 5% from 08 am to 10 pm. Based on these results a control systembased embedded system is needed. This system will work automatically controlling the relay to turn on or off the lighting, coolers, heaters, and humidifiers. Controlling is carried out by the Arduino uno r3 microcontroller. If after responding to data of the light (LDR), temperaturehumidity (DHT. Furthermore, this control system is designed offline which will continue to work without an internet network. Then it is also integrated with the IoT system for remote control by using serial communication between Arduino uno r3, and Nodemcu Esp8266 for the WiFi module. The offline and online control systems will complement each other. This opinion is in line with (Bunluewong & Surinta, 2. , the semi-automated system obtained a high satisfaction rate towards the system. However, if farmers want to reduce the monthly internet cost, the application architecture will cut the data transmission process. However, the control system for light, temperature, and humidity still works continuously. But if data analysis is needed for precision agriculture purposes. The control system with IoT will be turned on. that the offline and IoT . based control systems can complement each other and be used as needed by farmers. Conclusion Implementation of IoT-MQTT-NodeRed based weather-baglog parameters monitoring system in oyster mushroom cultivation room. Farmers can monitor and acquire micro-weather and baglogs parameter data in real-time. The monitoring system can work all day and produce appropriate data. The design of the monitoring system is different from that of previous The monitoring system is designed based on IoT-MQTT-Nodered based with threepart IoT system architecture and functions. This system makes data sensors that can be acquired, and monitored mobile on a smartphone for a long day. The system uses serial communication microcontroller Arduino uno r3 and NodeMcu Esp8266. The use of two microcontrollers to divide tasks. This division of tasks lowers the workload of the microcontroller. Furthermore, this system uses the communication protocol MQTT combined with the NodeRED dashboard It makes the data monitoring a user-friendly display and to be stored on the Raspberry Pi server. This monitoring system realizes precision agriculture in oyster mushroom cultivation. By analyzing data sensors to classify the model of the ideal cultivation room based on microweather and baglog parameters. And evaluate the precision and centering of a data set of the dominant parameters to the ideal conditions. Based on the highest accuracy value of the classification model. The parameters of light, temperature, and humidity are the dominant factors that affect the ideal conditions room. Based on evaluating the precision and centering of Sumarsono et al A Vol 6. 2025: 1040-1071 a data set of dominant parameters. The parameters of light, temperature, and humidity in the cultivation room have a level of conformity that does not meet the target value of ideal So, a control system base embedded system is needed. This system will work automatically controlling the relay to turn on or off the lighting, coolers, heaters, and The design system with offline and IoT . based control. They can complement each other and be used as needed by farmers. An important implication of this study is to provide scientific certainty that the oyster cultivation monitoring system with the IoT-MQTT-Nodered design is a smart monitoring Because data monitoring in real-time throughout the morning, afternoon, evening, and Data monitoring can be checked by mobility from anywhere via smartphone. So that farmers know the changes in micro-weather and baglog parameters all the time. Also, this system realizes precision agriculture by analyzing and evaluating data sensors that are stored in the server. So that the improvement steps become more precise, measured, and directed to create ideal conditions for the oyster mushroom cultivation room. Acknowledgment We extend our sincere gratitude to the Directorate of Research. Technology, and Community Service - Ministry of Education and Culture. Research and Technology (KEMENDIKBUD RISTEK) 2024. Indonesia, for the grant that facilitated the successful completion and publication of this journal article. References