← All projects

pomoDoNotDisturb

Boötes · Updated May 2023

Show availability status via a Pi 3 and Pi Zero by hosting a Flask service that uses Socket.io to relay updates. Pi's talk to each other via USB/Ethernet.

pomoDoNotDisturb

Purpose

Have a small screen showing if you are available, do not disturb, or out of office and another screen as a control hub. I wanted to learn something new and learn how to make a pi zero communicate with a Raspberry Pi 3. I also wanted to keep it offline.

What it can do

Demo

For my setup I have the Pi Hub with a touchscreen and and the Pi Zero on a regular hdmi screen

Alt Text

What I learned

Install Instructions for Docker

  1. Install Docker
  2. Clone repository
  3. Open terminal and navigate to repository
  4. Create docker image
    docker build -t pomodonotdisturb -f .Dockerfile .
    
  5. Run server in background on docker
    docker run -d -p 5000:5000 pomodonotdisturb
    
  6. Open browser and go to the following address
    http://localhost:5000/hub
    
    1. The page should now be served

Install + Run Instructions for Linux

  1. Clone repository
  2. Open terminal and navigate to repository
  3. Install libraries
    pip install -r requirements.txt
    
  4. Run server
    python src/server.py
    
  5. Open browser and go to the following address
    http://localhost:5000/hub
    
    1. The page should now be served

Install Instructions for PI3 + PI Zero W

Setup Pi Zero W

Setup Pi Hub(Pi 3)

Putting it all together

Development Setup

ToDo

Application restarts when any .py file changes using python-hotreload

Make sure that file sharing is enabled for Docker. To enable file sharing go to Docker Dashboard -> Settings -> Resources -> FILE SHARING and enable for your drive.

Docker Development Setup

  1. Clone repository
  2. Open terminal and navigate to repository
  3. Create docker image
    docker build -t pomodonotdisturb -f .Dockerfile .
    
  4. Run options:
    1. Run in terminal
      docker run -it --rm -e "APP_ENVIRONMENT=development" -v %cd%:/app -w /app -p 5000:5000 pomodonotdisturb
      
    2. Run in the background
      docker run -it --rm -e "APP_ENVIRONMENT=development" -v %cd%:/app -w /app -d -p 5000:5000 pomodonotdisturb
      
  5. Open browser and go to the following address
    http://localhost:5000/hub
    
    1. The page should now be served

Linux Development Setup

  1. Clone repository
  2. Open terminal and navigate to repository
  3. Install libraries
    pip install -r requirements.txt
    
  4. Run server and watch files for changes
    python src/sourceChangeMonitor.py src/server.py
    
  5. Open browser and go to the following address
    http://localhost:5000/hub
    
    1. The page should now be served
  6. When you make a change, the app should restart