Modern workspaces are full of activity, devices, and people, making them prone to environmental issue, noise, poor lighting, stale air, that can reduce focus, comfort, and overall mood. These factors are rarely monitored continuously, leaving teams unaware of conditions that affect productivity.
To address this, we developed an IoT-based Workplace Mood Monitoring System that measures essential environmental variables and converts them into a single, intuitive Workplace Mood Score. This score provides immediate insight into the “health” of a workspace and supports both real-time monitoring and historical trend analysis.
Unlike static or proprietary solutions, our system is modular, open-source, and scalable, allowing deployment across multiple desks or rooms, adaptation to different room sizes, and integration of additional sensors without redesigning the architecture. By automating environmental awareness, offices can maintain comfortable, productive conditions without relying on guesswork or periodic manual checks.
2. Project OverviewThe system monitors the real-time comfort level of an office using a collection of sensors that measure:
- Sound Level: identifies excessive noise
- Lux Level: determines lighting quality
- CO₂ Concentration: reflects ventilation and air freshness
- Temperature & Humidity: indicates thermal comfort
- Occupancy: detects desk usage and workspace utilization
Data is collected and aggregated through a oneM2M ACME platform, providing both real-time and historical visualization.
To provide immediate local feedback, each ESP32 node includes an RGB LED that serves a dual purpose:
- Displays the current Workplace Mood Score (color gradient from green to red)
- Shows desk occupancy status (LED ON = occupied / LED OFF = not occupied)
This combination of real-time system data and simple local indicators helps teams quickly understand environmental conditions, workspace usage, and their impact on comfort and productivity.
3. ObjectivesThe system aims to improve comfort, focus, and productivity in offices through continuous monitoring.
Key objectives include:
- Real-Time Environmental Monitoring of noise, lighting, CO₂, temperature, humidity, and occupancy.
- Workplace Mood Scoring that transforms raw sensor data into a simple comfort metric.
- Data Transportation through a central oneM2M platform (ACME CSE).
- Issue Detection, such as high noise or poor ventilation.
The Workplace Mood Monitoring System is built as an end-to-end IoT pipeline that combines desk-level sensing, room-level sensing, local middle nodes, and centralized data collection and processing. The architecture integrates an ESP32 sensor node and a Raspberry Pi based MN-CSE to capture a complete picture of workplace conditions.
4.1 ESP32 NodeThe ESP32 collects desk-level measurements: noise, lux, and occupancy. It posts data as to the MN-CSE (Raspberry Pi) via REST. The ESP32 also hosts a mini notification server, allowing the RGB LED to update instantly when its oneM2M attributes update. The LED is used to show the latest mood score and occupancy state.
PIN Layout:
Component Function GPIO
VEML7700 I2C SDA 8
VEML7700 I2C SCL 9
INMP441 I2S SCK (BCLK) 12
INMP441 I2S WS (LRCLK) 11
INMP441 I2S SD (DOUT) 10
mmWave UART TX 17
mmWave UART RX 18
mmWave OT2 1
NeoPixel DIN 38
4.2 Room-Level Sensing (Raspberry Pi MN-CSE)The Raspberry Pi serves as the Middle Node CSE (MN-CSE) and connects to a room-level Switchbot CO2 sensor which measures: temperature, humidity, and CO₂. It stores its readings as attributes and forwards all updates using resource announcement to the IN-CSE over a secure WireGuard VPN connection.
At the central oneM2M node (IN-CSE), subscription mechanisms notify the ingest service whenever new telemetry arrive. The ingest service:
- extracts the telemetry
- normalizes metric names and values
- writes structured telemetry into PostgreSQL
- forwards normalized data to the mood-service for calculation
The mood-service computes a Workplace Mood Score using all environmental variables (desk-level + room-level). It posts the mood as CIN to the MN-CSE in the room container and also updates the LEDs color based on the score.
1. ESP32 collects desk-level measurement
2. MN-CSE collects room-level measurements
3. ESP32 posts attributes → MN-CSE
4. MN-CSE forwards the sensor resources using announcement → IN-CSE via WireGuard VPN
5. IN-CSE triggers subscription → ingest service
6. Ingest: normalize → store in PostgreSQL → forward to mood-service
7. Mood-service: compute score → store in PostgreSQL → post mood CIN to MN-CSE inside the room container as well as update the LEDs color attributes.
8. ESP32 receives instant LED updates via its own small local notification server
9. Grafana and applications visualize telemetry and mood (via PostgreSQL)
5. ImplementationThe Workplace Mood Monitoring System is implemented as a modular, end-to-end IoT pipeline combining edge devices, local and cloud nodes, and analytics services.
Hardware:
- ESP32-S3-DevKitC-1 with VEML7700 (light), INMP441 (microphone), S3KM1110 (occupancy), WS2812 RGB LED.
Functionality:
- Creates the resource tree for the sensors in the MN-CSE.
- Reads light, noise, and occupancy every 10 seconds.
- Sends measurements to the local MN-CSE via REST.
- Hosts a mini notification server to instantly update the RGB LED when its color or binary switch resource updates. This is used to display the latest mood score and occupancy state.
Software:
- Developed using PlatformIO / Arduino.
Hardware:
- Raspberry Pi 4: reads SwitchBot CO2 Meter's Bluetooth signal and decodes temperature, humidity, and CO₂.
Functionality:
- Creates the resource tree required for MN-CSE functionality with the CO2 Sensor.
- Aggregates sensor readings from ESP32 and SwitchBot.
- Forwards resources securely to the cloud IN-CSE over WireGuard VPN.
Software:
- Python BLE scanner (Bleak), ACME MN-CSE Docker container, WireGuard VPN.
IN-CSE:
- ACME Infrastructure Node, receives CINs from MN-CSEs.
Ingest Service (Flask):
- Triggered by subscription notifications from IN-CSE.
- Normalizes telemetry (metric synonyms, type coercion).
- Persists structured facts in PostgreSQL (
fact_telemetry). - Forwards normalized data to the mood-service.
Mood Service (FastAPI):
- Computes Workplace Mood Score using heuristic combining CO₂, noise, lux, temperature, humidity, and occupancy.
- Stores results in
fact_mood. - Posts mood CINs to MN-CSE.
Optional ML Service:
- Experimental, read-only, for predictive mood scoring.
- Containerization: All services (MN-CSE, IN-CSE, ingest, mood-service, Postgres, Grafana) orchestrated with Docker Compose.
- Configuration: Environment variables stored in
.envfiles for IPs, ports, sensor MACs, VPN info. - WireGuard VPN: Connects distributed MN-CSEs to cloud IN-CSE securely.
- Monitoring: Logs checked via Docker, integration tests available (
verify_ingest.sh).
- MN-CSE handles room-level aggregation and reduces cloud load.
- ESP32 mini-notification server ensures instant LED feedback.
- BLE sensors scanned every 60 seconds, while ESP32 sensors update every 10 seconds.
- System is fully modular, supporting multiple desks, rooms, and additional sensors.
The Workplace Mood Monitoring System leverages Grafana as its central visualization platform, providing both real-time and historical insights into office environmental conditions and the computed Workplace Mood Score. All telemetry data and mood scores are stored in PostgreSQL, and Grafana queries this database to generate dashboards that are immediately accessible to users and managers.
Dashboards are designed to be intuitive and informative. Real-time gauges display key environmental metrics such as CO₂ concentration, noise levels, light intensity, temperature, humidity, and desk occupancy. A dedicated panel shows the Workplace Mood Score, allowing teams to quickly assess whether the workspace conditions support focus, are neutral, or risk fatigue.
Historical trends are presented through time-series graphs, enabling analysis of environmental fluctuations and correlations with mood scores over days or weeks. Tables of raw telemetry can also be displayed, providing detailed insight into the underlying sensor readings.
Grafana is deployed as a containerized service via Docker Compose, with pre-configured dashboards and data sources for seamless setup. By centralizing visualization, Grafana allows facility managers, team leaders, and researchers to monitor multiple desks or rooms simultaneously, identify recurring issues, and make data-driven decisions to optimize workplace comfort and productivity.
6. Demonstration














Comments