Skip to content

MakUrSpace/harmony

Repository files navigation

Harmony

Harmony integrates tabletop gaming utilities into a game recording and referreeing system.

Setup

  1. Flash Raspbian & update sudo apt update && sudo apt upgrade
  2. Install python: sudo apt install python3 python3-pip python3-dev
  3. Install nodejs:
    1. curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
    2. sudo apt-get install -y nodejs
  4. Install Graphviz: sudo apt-get install graphviz libgraphviz-dev pkg-config
  5. Install Python Dependencies: pip install -r requirements.txt
  6. Write Harmony Server configuration: vim ./harmony/observerConfiguration.json
  7. Start Harmony Server: cd harmony && python3 harmonyServer.py

NeoPixel Strip

  1. Connect NeoPixel to {NeoPixelPins}
  2. Install service definition file: cp ./observer/observerEyes.service /etc/systemd/system/observerEyes.service
  3. Reload systemd daemon: sudo systemctl daemon-reload
  4. Enable observerEyes NeoPixel service: sudo systemctl enable observerEyes
  5. Start observerEyes: sudo systemctl start observerEyes

Camera Setup

Any USB cameras need to be setup as IP cameras for Harmony to access them. Harmony suggests ayufan's camera-streamer and offers systemd service files for it.

Install camera-streamer

Instructions for debian package install from https://github.com/ayufan/camera-streamer/releases/tag/v0.2.6

PACKAGE=camera-streamer-$(test -e /etc/default/raspberrypi-kernel && echo raspi || echo generic)_0.2.8.$(. /etc/os-release; echo $VERSION_CODENAME)_$(dpkg --print-architecture).deb
wget "https://github.com/ayufan/camera-streamer/releases/download/v0.2.8/$PACKAGE"
sudo apt install "$PWD/$PACKAGE"

Configure Cameras

With camera-streamer installed, now each camera needs its service file installed and enabled. For each camera:

  1. Install camera serivce file: cp ./observer/dmaCameraServices/cam{camNum}-camera-streamer.service /etc/systemd/system/
  2. Reload systemctl daemon: sudo systemctl daemon-reload
  3. Enable camera service: sudo systemctl enable cam{camNum}-camera-streamer.service
  4. Start camera service: sudo systemctl start cam{camNum}-camera-streamer.service

Harmony is built on:

Install dependencies

  • sudo apt-get install build-essential cmake pkg-config libjpeg-dev libtiff5-dev libjasper-dev libpng-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libfontconfig1-dev libcairo2-dev libgdk-pixbuf2.0-dev libpango1.0-dev libgtk2.0-dev libgtk-3-dev libatlas-base-dev gfortran libhdf5-dev libhdf5-serial-dev libhdf5-103 python3-pyqt5 python3-dev graphviz libgraphviz-dev -y

Install graphs