Skip to content

Instantly share code, notes, and snippets.

@brianehlert
Last active June 3, 2016 17:32
Show Gist options
  • Save brianehlert/6b7fa7c86be098722d73f944e96b1bf9 to your computer and use it in GitHub Desktop.
Save brianehlert/6b7fa7c86be098722d73f944e96b1bf9 to your computer and use it in GitHub Desktop.
Gateblu-Forever on Ubuntu
1) Install Ubuntu Server
Instead of adding a 'pi' user in step 7 name your admin user 'pi' with a password of 'raspberry' during installation
The Service configuration of gateblu-forever assumes this is running on a RaspberryPi
1. Add openSSH server (makes it easier to remotely connect with puTTY and copy / paste)
2) Install LTS node and npm from nodejs.org and node legacy (check http://nodejs.org for latest LTS release numbers)
sudo apt-get update
sudo apt-get upgrade -y
sudo curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y nodejs-legacy
sudo apt-get install -y npm
node -v
3) Global install of node-gyp for modules / plugins that need to build
sudo npm install -g -y node-gyp node-pre-gyp
4) Install Gateblu Service
sudo npm install -g -y gateblu-forever --unsafe-perm
sudo curl -o /etc/init.d/gateblu-service https://raw.githubusercontent.com/octoblu/gateblu-forever/master/.installer/raspbian/init.d/gateblu-service
sudo chmod +x /etc/init.d/gateblu-service
sudo update-rc.d gateblu-service defaults
5) Add 'pi' user
This makes it all easier as the init scripts assume this and run as this user.
sudo adduser pi
raspberry
raspberry
6) Start Gateblu
sudo service gateblu-service start
7) Find the UUID and token
Wait a minute or two after starting Gateblu. We need it to generate an identity and write the meshblu.json file.
cd /home/pi/gateblu-service
Do an ls a couple times until the meshblu.json configuration file is written.
nano meshblu.json
*you will need to copy and paste the uuid and token
8) Claim the Gateblu instance
Open Things, Scroll down to Octoblu, Select Gateblu, select Connect Gateblu, select Already Downloaded, select Claim an Existing Thing, add a name and paste the uuid and token, select Connect Gateblu
Additional Notes:
sudo service gateblu-service start
sudo service gateblu-service stop
basic File Locations
You can find:
• debug log at: /home/pi/gateblu-service/gateblu.log
• meshblu.json file at: /home/pi/gateblu-service/meshblu.json
To update you must re-install:
sudo npm install -g gateblu-forever --unsafe-perm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment