Updated March 23, 2018: New instructions confirmed to work with Raspbian "Stretch". Tested on Stretch released March 13, 2018. Note: the latest version of Raspbian "Stretch" does not work with the instructions below. We are working on an updated version where this will be resolved.
Follow the directions below if you already have a Raspbian Jessie or Stretch OS running on your network and wish to add the Tilt Pi app to it. Be sure to make a backup of your card in case the installation has any conflicts. If you're starting with a new Raspberry Pi or NOOBS, I recommend downloading our pre-installed image here and overwriting your NOOBS SD card. In the picture below, I have installed Tilt Pi on a SD card image for a 3.5" touchscreen available on Ali Express. Please note their may be unknown incompatibilities with other software installations and may require troubleshooting beyond the scope of these instructions.
Update March 20, 2018
Due to an updated nodejs version used in the script "update-nodejs-and-nodered", the bleacon scanning node will fail to install. A workaround is to manually install node package manager, "npm" and then install a version manager "n" for nodejs so that nodejs version 4.x can be installed first before installing bleacon. Once bleacon and dashboard UI are installed, nodejs and node-red can be updated. The instructions below incorporate these changes.
Using SSH from another computer or from a Raspberry Pi directly, open a command line window to enter the following commands. Install node package manager, "npm".
sudo apt-get update
sudo apt-get install npm
Install nodejs version manager, "n".
sudo npm install n -g
Install nodejs version 4.8.7 (this version will work with bleacon)
sudo n 4.8.7
Install bleacon, an iBeacon scanning node for Node-Red. Note: Tilt uses iBeacon format to broadcast data so any device that can scan for iBeacons can connect to it.
sudo npm install node-red-contrib-bleacon -g
Install dashboard UI for Node-Red.
sudo npm install node-red-dashboard -g
Update node-red and nodejs using the script provided by nodered.org. Raspberry Pi specific Node-Red install instructions for Raspbian Jessie.
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)
yes to installing Raspberry Pi specific nodes.
Set Node-Red to start on system start up.
sudo systemctl enable nodered.service
Download Tilt Pi “flow” from Baron Brew GitHub account to Raspberry Pi
wget -O /home/pi/flow.json https://raw.githubusercontent.com/baronbrew/TILTpi/master/flow.json
Reboot Raspberry Pi. Node-red will start at boot.
Run downloaded Tilt Pi app/flow in Node-Red:
curl -X POST http://localhost:1880/flows -H "Content-Type: application/json" -H "Node-RED-Deployment-Type: nodes" --data "@/home/pi/flow.json"
While still on your local WiFi network, use a web browser (Chrome or Firefox) to visit
http://localhost:1880/ui. If this doesn't work, you may need to find the IP address of your Raspberry Pi and go to
X.X.X.X is your Raspberry Pi's IP address.