Last active
October 22, 2016 10:08
-
-
Save Mikulas/33a603c0256e1de3312afb6e54a567e3 to your computer and use it in GitHub Desktop.
raspbian homebridge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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