-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
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://github.com/nothingworksright/unblinkingbot.git
sudo git pull origin master
sudo yarn
Remove the x86-64 chromium that came with puppeteer, and install an armhf version:
rm -rf /usr/local/unblinkingbot/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/
wget http://launchpadlibrarian.net/343421371/fontconfig-config_2.12.6-0ubuntu1_all.deb
wget http://launchpadlibrarian.net/343421692/libfontconfig1_2.12.6-0ubuntu1_armhf.deb
wget http://launchpadlibrarian.net/343421691/fontconfig_2.12.6-0ubuntu1_armhf.deb
wget https://launchpad.net/ubuntu/+source/chromium-browser/62.0.3202.94-0ubuntu1.1388/+build/13761155/+files/chromium-browser_62.0.3202.94-0ubuntu1.1388_armhf.deb
wget https://launchpad.net/ubuntu/+source/chromium-browser/62.0.3202.94-0ubuntu1.1388/+build/13761155/+files/chromium-codecs-ffmpeg_62.0.3202.94-0ubuntu1.1388_armhf.deb
wget https://launchpad.net/ubuntu/+source/chromium-browser/62.0.3202.94-0ubuntu1.1388/+build/13761155/+files/chromium-codecs-ffmpeg-extra_62.0.3202.94-0ubuntu1.1388_armhf.deb
sudo dpkg -i fontconfig-config_2.12.6-0ubuntu1_all.deb
sudo dpkg -i libfontconfig1_2.12.6-0ubuntu1_armhf.deb
sudo dpkg -i fontconfig_2.12.6-0ubuntu1_armhf.deb
sudo dpkg -i chromium-codecs-ffmpeg_62.0.3202.94-0ubuntu1.1388_armhf.deb
sudo dpkg -i chromium-codecs-ffmpeg-extra_62.0.3202.94-0ubuntu1.1388_armhf.deb
sudo dpkg -i chromium-browser_62.0.3202.94-0ubuntu1.1388_armhf.deb
sudo rm *.deb
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
ಠ_ಠ unblinkingBot