Link: Kitchen Safety Device Dashboard
https://connected-devices-dashboard.shentongcreates.com/index.html
Git Repo:
https://github.com/yushentong/Connected-Device-Dashboard-MQTT.git
Diagram:

This project is designed to monitor cooking conditions in real time and clearly indicate when the environment becomes potentially unsafe. An Arduino with an SHTC3 sensor measures temperature and humidity every second, then sends data more or less frequently depending on whether the readings are in a safe or unsafe state. The data is published through an MQTT broker and received by a Node.js service running on a virtual machine, which stores the incoming messages in a JSONL file and serves them through an API endpoint. A webpage fetches the latest data every three seconds and updates the display, allowing viewers to see the current condition and quickly recognize when the threshold has been exceeded.


In this video, I demonstrated the alarm system using a hair dryer. When I use the hair dryer to heat up the SHTC sensor, and it goes beyond the threshold (temperature ≥ 45°C and humidity ≤ 20 RH), the device turns on its red light, and the webpage simultaneously switches to its alarm state (turning red). When it goes back below the threshold, the light turns off and the webpage returns to its normal state.
On the Arduino side, I used an SHTC3 sensor to continuously measure temperature and humidity once per second. Based on a defined threshold—temperature at or above 40°C and humidity at or below 25% RH—the Arduino classifies the condition as either safe or unsafe, then adjusts how often it sends data. In the safe state, it publishes readings every 60 seconds, while in the unsafe state, it increases the sending frequency to every 10 seconds. The Arduino sends these readings as MQTT messages, allowing the rest of the system to receive and process the sensor data in real time.
if (lastSend == 0 || millis() - lastSend > intervalSending || isWarning != wasWarning) {
mqttClient.beginMessage(topic);
mqttClient.print(message);
mqttClient.endMessage();
Serial.print("Published: ");
Serial.println(message);
lastSend = millis();
}
wasWarning = isWarning;
lastSense = millis();
}
This part of the code is important because it decides when the Arduino should actually send out data, which really shapes how the whole system behaves. Instead of constantly publishing every reading (since it read once every second), it only sends when :
(1) the system first starts - so I don’t have to wait for 60 secs for the first message if safe state