Skip to content

Instantly share code, notes, and snippets.

@Mikulas
Last active October 22, 2016 10:08
Show Gist options
  • Save Mikulas/33a603c0256e1de3312afb6e54a567e3 to your computer and use it in GitHub Desktop.
Save Mikulas/33a603c0256e1de3312afb6e54a567e3 to your computer and use it in GitHub Desktop.
raspbian homebridge
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# Install nodejs
sudo apt-get update
sudo apt-get install gcc-4.8 g++-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
sudo dpkg -i node_latest_armhf.deb
node -v
# Install homebridge
sudo apt-get install git libavahi-compat-libdnssd-dev
sudo npm install -g --unsafe-perm homebridge
sudo npm install -g homebridge-lifx-lan
homebridge
cat << EOF > ~/.homebridge/config.json
{
"bridge": {
"name": "Vaclavkova",
"username": "CC:22:3D:E3:CE:31",
"port": 51826,
"pin": "031-45-154"
},
"description": "Vaclavkova",
"accessories": [],
"platforms": [
{
"platform": "LifxLan",
"broadcast": "192.168.0.255",
"duration": 3000,
"resendMaxTimes": 5,
"name": "LiFx"
}
]
}
EOF
nohup homebridge &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment