Setting up the Mini - Josh-Duncan/HomeBridge-Mini GitHub Wiki
Get Ubuntu Installed
-
Install Ubuntu 16.04. SSH Server is the only non default option that I installed.
-
Update Ubuntu to 18.04
- Apply the updates
sudo apt update && sudo apt dist-upgrade && sudo apt autoremove
-
I reboot for good measure (this is what happens when you're raised with Microsoft)
-
Upgrade the OS
sudo do-release-upgrade
-
Update Ubuntu to 20.04
sudo do-release-upgrade -d
Configure the OS
Set the Mac Mini so that it will restart on a power failure.
Thanks to Dioxaz's workshop for this solution, and explaining how to solve the problem for other models if this doesn't work.
-
Create and update the rc.local file
sudo nano /etc/rc.local
-
Paste the following
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. setpci -s 0:03.0 0x7b.b=20 exit 0
-
Set the command
sudo setpci -s 0:03.0 0x7b.b=20
-
Restart to test
Install HomeBridge
The Prerequisites
-
Install Node.js
sudo apt install nodejs
-
Install Node Package Manager
sudo apt-get install npm
HomeBridge
-
Install the HomeBridge application
sudo npm install -g --unsafe-perm homebridge
-
Test execution
homebridge
-
Install HomeBridge config UI
sudo npm install -g --unsafe-perm homebridge-config-ui-x
-
Configure the config.json file
sudo nano ~/.homebridge/config.json
{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "manufacturer": "homebridge.io", "model": "homebridge", "port": 51826, "pin": "031-45-154" }, "description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.", "ports": { "start": 52100, "end": 52150, "comment": "This section is used to control the range of ports that separate accessory (like camera or television) should be bind to." }, "platforms": [{ "platform": "config", "name": "Config", "port": 8080, "log": { "method": "file", "path": "/var/log/homebridge.log" }, "service": "homebridge" }] }
-
Set Homebridge to auto start
sudo hb-service install --user %username%