This code supports a paper accepted at the 30th IEEE Symposium on Computers and Communications (SAIA-2025).
ParkSense is an IoT sensor system for parking occupancy and environmental monitoring. It combines parking space detection using time-of-flight sensors with environmental monitoring capabilities for temperature and humidity.
data_listener/: TypeScript service that processes MQTT messages and stores data in PostgreSQLdevices/: Arduino sketches for the IoT devicesgateway_btm/: Low-level gateway code for Heltec WiFi LoRa32 v3 (ESP-NOW to LoRa)gateway_top/: Top-level gateway code for Heltec WiFi LoRa32 v3 (LoRa to MQTT)sensor/: Sensor node code for ESP32 boards
mosquitto/: MQTT broker configurationweb_server/: Dashboard interface for data visualizationdatabase/: PostgreSQL initialization scripts
- Sensor nodes: ESP32 boards with VL53L0XV2 (ToF) and DHT22 sensors
- Gateways: Heltec WiFi LoRa32 v3 boards
- Appropriate power supplies and enclosures
- Clone the repository
- Configure environment variables in
docker-compose.yml - Run the server stack:
This will start:
docker compose up
- PostgreSQL database (port 5432)
- Mosquitto MQTT broker (port 1883)
- Data processing service
- Web dashboard (port 3000)
-
Install Arduino IDE
-
Install required libraries
-
Flash the devices:
- Upload
sensor/main_sensor.inoto ESP32 boards - Upload
gateway_btm/main_gateway_btm.inoto low-level Heltec gateways - Upload
gateway_top/main_gateway_top.inoto top-level Heltec gateways
- Upload
-
Configure each device's
config.hwith appropriate network settings and pins
The web interface will be available at http://server_ip:3000
Sensors → (ESP-NOW) → Low-level Gateway → (LoRa) → Top-level Gateway → (MQTT) → Server