Skip to content

horner/HomebridgeZero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Setting up Homebridge

Just some project to keep track of how I made a roller shade for HomeBridge.

Installing on Rasberry Zero

From Mac:

diskutil list
diskutil unmountDisk /dev/disk2
sudo dd bs=1m if=Downloads/2019-04-08-raspbian-stretch-lite.img of=/dev/disk2 conv=sync
diskutil eject /dev/disk2

Boot device

Run package install

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y curl nodejs npm libavahi-compat-libdnssd-dev
sudo npm install -g --unsafe-perm homebridge
sudo npm install -g npm@latest
sudo npm update npm -g

Install GPIO control plugin for Homebridge

cd /tmp; wget https://lion.drogon.net/wiringpi-2.50-1.deb; sudo dpkg -i wiringpi-2.50-1.deb; cd -
sudo npm install -g --unsafe-perm homebridge-gpio-device

Run Homebridge once and pair

(see pics below)

homebridge

Make it run on boot

sudo npm install -g pm2 --unsafe-perm
pm2 startup
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
pm2 start homebridge
pm2 save

Configure GPIO pins

vi .homebridge/config.json

{
  "bridge": {
    "name": "Name",
    "username": "Mac",
    "port": 51826,
    "pin": "Some-pin"
  },

  "description": "Apartment automation system via RaspberryPi Zero",
  "accessories": [
		{
			"accessory": "GPIODevice",
			"name": "Roller Shade",
			"type": "WindowCovering",
			"inverted": true,
			"pins": [22,21],
			"shiftDuration": 1,
			"initPosition": 99
		}
  ],

  "platforms": [ ]
}

Developer Notes

Pics

Run Homebrew

Scan Code

Setup in phone

Configure

Wire

Solder

Click below to watch: Watch the video

About

Homebridge Zero

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published