RaspberryPi + GrovePi which monitors motion/sound in a conference room and compares with Google Calendar
It consists of 3 modules:
- RaspberryPi with GrovePi sensors - gathers metrics from sound and motion sensors and uploads them to Google Cloud Storage bucket,
- Google Calendar API exporter - Google Apps script which snapshots data from Calendar API for particular day and conf room to Google Cloud Storage bucket,
- Python scripts - which compares calendar and sensor data and outputs stats/charts.
Hardware consists of:
- Raspberry Model B+ running Raspbian for Robots OS,
- GrovePi,
- Grove PIR Motion Sensor,
- Grove Sound Sensor,
- 8GB SD Card + Charger + USB WiFi Adapter.
Raspberry is running Python script which gathers data from sensors every second and logs them to file. Log files are rotated every 5 minutes and then uploaded to Google Cloud Storage.
Code is stored in raspberrypi-monitor
directory. It contains Ansible playbook for configuring and deploying code to RaspberryPi.
More info about Raspberry setup you can find in raspberrypi-monitor subdirectory.
Google Apps script is stored in apps-scripts
.
It snapshots data from Google Calendar for particular conf room every 5 minutes using triggers. Scripts run on Google's servers.
Calendar data is dumped every few minutes to find cases when meeting is postponed (as Google Calendar don't store event history). It's using OAuth2 library in version 18.
Code is stored in scripts
directory. Currently they contain Jupyter Notebook files (.ipynb
extension) using mainly Pandas for data analysis.