Skip to content

Installation

jmg1138 edited this page Dec 1, 2017 · 23 revisions

These installation instructions were tested on a Raspberry Pi 2 Model B running Raspbian Stretch Lite

Install some prerequisites / dependencies:

sudo apt-get update && sudo apt install -y curl build-essential git libatk1.0-0 libcups2 libfontconfig1 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libxcomposite1 xdg-utils

Install nodejs 8.x and yarn:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt install -y nodejs
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt install yarn

Install the unblinkingBot:

sudo mkdir -p /usr/local/unblinkingbot
cd /usr/local/unblinkingbot
sudo git init .
sudo git remote add origin https:/nothingworksright/unblinkingbot.git
sudo git pull origin master
sudo yarn

Store the unblinkingBot db files and the motionEye settings files on a mounted external drive, so that the applications can be quickly replaced without losing the settings. Create symlinks so that they are available for the bot under /usr/local/unblinkingbot/db and /usr/local/unblinkingbot/motioneye.

For example, if the unblinkingBot db files and motionEye conf files are stored on an external USB drive which has been mounted at /mnt/external and the files are organized like this:

mnt
└── external
    ├── motion
    │   ├── etc
    │   │   └── motioneye
    │   │       ├── core
    │   │       ├── motion.conf
    │   │       ├── motioneye.conf
    │   │       ├── prefs.json
    │   │       ├── thread-1.conf
    │   │       ├── thread-2.conf
    │   │       ├── thread-3.conf
    │   │       └── thread-5.conf
    │   └── var
    │       └── lib
    │           └── motioneye
    └── unblinkingbot
        └── db
            ├── 000005.ldb
            ├── 000026.log
            ├── CURRENT
            ├── LOCK
            ├── LOG
            ├── LOG.old
            └── MANIFEST-000025

Then these commands would create the proper symlinks:

sudo ln -s /mnt/external/unblinkingbot/db /usr/local/unblinkingbot/
sudo ln -s /mnt/external/motion/etc/motioneye /usr/local/unblinkingbot/

Last, copy the systemd service file into place, and enable the service.

sudo cp /usr/local/unblinkingbot/unblinkingbot.service /lib/systemd/system/unblinkingbot.service
sudo systemctl enable unblinkingbot.service
Clone this wiki locally