A smart pet monitoring station for real-time environmental awareness.
PetPal is an IoT system that monitors your pet's environment using a Wio Terminal microcontroller. Sensor data — temperature, humidity, motion, sound, and food proximity — is streamed over MQTT to a web dashboard where pet owners can view live readings, set alert thresholds, and get notified when conditions fall outside safe ranges.
Pets cannot tell us when they are too hot, lonely, or stressed. PetPal bridges that gap by giving owners continuous, objective data about their pet's environment — whether they are at home or away.
- Real-time awareness — live sensor readings update every few seconds so owners always know the current state of their pet's space.
- Configurable alerts — set custom thresholds for temperature, humidity, sound, and motion. A named alert banner appears the moment a value exceeds the limit, showing the exact sensor and current reading.
- Activity detection — the PIR motion sensor detects whether your pet is active or resting, providing a simple welfare indicator.
- Remote visibility — the dashboard runs in any browser, so owners can check in from any device on the same network.
- Extensible by design — sensor configuration is centralised, so adding a new sensor requires a change in one place.
PetPal consists of three layers: a Wio Terminal microcontroller reading Grove sensors, a Node.js/Express backend subscribing to MQTT topics and exposing a REST API, and a React dashboard polling that API every 3 seconds.
┌─────────────────────────────────────────┐
│ Wio Terminal │
│ DHT11 · PIR · Loudness · Ultrasonic │
│ Publishes to MQTT topics: wio/<sensor> │
└──────────────────┬──────────────────────┘
│ MQTT (Mosquitto)
▼
┌─────────────────────────────────────────┐
│ Node.js / Express backend │
│ Subscribes to wio/# topics │
│ Exposes GET /api/readings │
└──────────────────┬──────────────────────┘
│ HTTP polling (3 s)
▼
┌─────────────────────────────────────────┐
│ React dashboard (Vite) │
│ Live readings · Alerts · Thresholds │
└─────────────────────────────────────────┘| Component | Role |
|---|---|
| Wio Terminal (Seeeduino SAMD) | Microcontroller |
| Grove DHT11 | Temperature and humidity |
| Grove PIR Motion Sensor | Pet activity detection |
| Grove Loudness Sensor | Ambient sound level |
| Grove Ultrasonic Ranger | Food bowl proximity |
| Layer | Technology |
|---|---|
| Firmware | Arduino / C++ via arduino-cli |
| Messaging | MQTT (Mosquitto) |
| Backend | Node.js, Express |
| Frontend | React (Vite) |
| CI/CD | GitLab CI on Chalmers shell executor |
For detailed architecture diagrams, MQTT topic structure, and wiring, see the project Wiki.
- A machine running macOS or Linux
- Node.js v20+
- Mosquitto MQTT broker (
brew install mosquitto)
- Start the MQTT broker
mosquitto- Start the backend
cd backend
npm install
npm startRuns on http://localhost:5000.
- Start the dashboard
cd frontend
npm install
npm run devOpen the URL shown in the terminal (typically http://localhost:5173).
- Power on the Wio Terminal. It connects to Wi-Fi and begins publishing sensor data automatically. Live readings appear on the dashboard within a few seconds.
- Live readings update every 3 seconds — temperature, humidity, activity, noise, and food proximity.
- Alert banners appear at the top when any sensor exceeds its configured threshold. Each banner names the sensor and shows the current value.
- Dismiss an alert with the × button. It will only reappear if the sensor value changes again.
- Monitoring status is shown if the Wio Terminal's onboard switch is turned off.
git clone https://git.chalmers.se/courses/dit113/2026/group3/pet-pal.git
cd pet-palCreate backend/.env:
PORT=5000
MQTT_HOST=localhost
MQTT_PORT=1883
Create firmware/secrets.h (gitignored — never commit this):
#define WIFI_SSID "your-network-name"
#define WIFI_PASSWORD "your-network-password"
#define MQTT_HOST "your-broker-ip"arduino-cli compile \
--fqbn Seeeduino:samd:seeed_wio_terminal \
firmware/
arduino-cli upload \
--fqbn Seeeduino:samd:seeed_wio_terminal \
--port /dev/ttyACM0 \
firmware/You can simulate sensor readings via the terminal using mosquitto_pub:
mosquitto_pub -h localhost -t "wio/temperature" -m "22"
mosquitto_pub -h localhost -t "wio/humidity" -m "55"
mosquitto_pub -h localhost -t "wio/activity" -m "1"
mosquitto_pub -h localhost -t "wio/noise" -m "30"
mosquitto_pub -h localhost -t "wio/food" -m "12"
mosquitto_pub -h localhost -t "wio/switch" -m "true"- Branches:
issue-XXX-short-description - Commits:
#<issue> - <type>: <short description> - MRs are reviewed by @fatu before merging to
main
See .gitlab-ci.yml for the full CI pipeline definition.
Group 3 — Ctrl Z
| Member | Main contributions |
|---|---|
| Ifty Zubaer | React dashboard (live readings, alert banners, historical view), backend integration, CI/CD pipeline, wiki documentation, project management |
| Andra-Maria Fatu | Temperature/humidity firmware, food and water level sensors, Wio Terminal display, firmware refactoring, MR reviews |
| Maryam Jamil | PIR activity sensor, MongoDB database integration, food and water alert banners |
| Lucia Yetunde Malumi | Noise level sensor, threshold configuration via MQTT |
📽️ Watch the PetPal demo on YouTube
The video demonstrates the full system — live dashboard readings, alert banners, threshold configuration, and the hardware setup — and covers the problem PetPal solves and its potential as a product.
Built as part of DIT114 Project: Systems Development (Spring 2026) at the University of Gothenburg.