Last active
September 26, 2016 21:22
-
-
Save NxSoftware/7d106a34359b246281e0913a1ecea49b to your computer and use it in GitHub Desktop.
This file contains 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
Expand file-system to allow access to the entire SD card | |
sudo raspi-config | |
-- | |
Enable SSH and logging | |
sudo nano /etc/init.d/domoticz.sh | |
-- | |
Disable power management for WLAN | |
sudo nano /etc/modprobe.d/8192cu.conf | |
# Disable power management | |
options 8192cu rtw_power_mgnt=0 | |
-- | |
If using a vanilla Rasbian install: | |
Disable the system trying to use ttyAMA0 (used by the Razberry GPIO) | |
Remove the following from /boot/cmdline.txt: | |
console=serial0,115200 | |
Temporarily stop by using: | |
sudo systemctl stop serial-getty@ttyAMA0.service | |
sudo systemctl disable serial-getty@ttyAMA0.service | |
Though this will be re-enabled at boot unless the console is removed from cmdline.txt | |
-- | |
Install ARMv6 version of node | |
sudo apt-get remove nodejs | |
sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*} /var/db/receipts/org.nodejs.* | |
hash -r | |
wget https://nodejs.org/dist/latest/node-v6.6.0-linux-armv6l.tar.gz | |
tar -xvf node-v6.6.0-linux-armv6l.tar.gz | |
cd node-v6.6.0-linux-armv6l | |
sudo cp -R * /usr/local/ | |
cd ~/ | |
sudo apt-get install libavahi-compat-libdnssd-dev | |
sudo npm set prefix '/usr' -g | |
sudo npm install -g homebridge --unsafe-perm | |
sudo npm install -g homebridge-edomoticz --unsafe-perm | |
-- | |
Edit ~/.homebridge/config.json and add correct room ID | |
Launch homebridge at startup: | |
sudo nano /lib/systemd/system/homebridge.service | |
[Unit] | |
Description=HomeBridge Service | |
After=multi-user.target | |
[Service] | |
User=pi | |
Type=idle | |
ExecStart=/usr/bin/homebridge | |
[Install] | |
WantedBy=multi-user.target | |
# eof | |
sudo chmod 644 /lib/systemd/system/homebridge.service | |
sudo systemctl daemon-reload | |
sudo systemctl enable homebridge.service | |
sudo reboot | |
Check status: sudo systemctl status homebridge.service -l | |
Restart: sudo systemctl restart homebridge | |
Homebridge setup instructions at: https://www.domoticz.com/forum/viewtopic.php?f=36&t=10272 | |
-- | |
Ensure domoticz backup script is running (https://gist.github.com/NxSoftware/f32b643ae8b1ac016a1d48cc5cd8a8a1) | |
crontab -e | |
0 1 * * * sudo ~/domoticz/scripts/domoticzBackup.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment