- Installation
- ...
Please create a config.json file
{
"credentials": {
"ssid": "YOUR_SSID",
"password": "YOUR_PASSWORD"
}
}
- Please make sure your controller is connected with a DATA CABLE.
- Open the terminal and navigate into this directory
- Run the init.sh script to install al dependencies and flash the controller.
#!/usr/bin/env bash
brew install --build-from-source [email protected]
xcode-select --install
brew install picocom
brew install pip3
pip3 install esptool
pip3 install adafruit-ampy
binary='binary/esp8266-[0-9]*-v*.bin'
port='/dev/cu.usbserial-1420'
esptool.py --port $port erase_flash
esptool.py --port $port --baud 460800 write_flash --flash_size=detect 0 $binary
## Install Node.JS & Homebridge on a Raspberry PI
- Setup the Repository
curl -sL https://deb.nodesource.com/setup_14.16.0 | sudo bash -
- Install node.js additional packages
sudo apt install -y nodejs gcc g++ make python net-tools
- Upgrade node.js to the newest LTS version
wget http://nodejs.org/dist/v14.16.0/node-v14.16.0-linux-armv7l.tar.xz
- Unpack the node.js LTS version
tar -xvf node-v14.16.0-linux-armv7l.tar.xz
- Navigate into the unpacked folder
cd node-v14.16.0-linux-armv7l.tar.xz
- Transfer the folder and restart your device
sudo cp -R * /usr/local/
shutdown -r now
- Install Homebridge and Homebridge UI
sudo npm install -g --unsafe-perm homebridge homebridge-config-ui-x
- Setup Homebridge as a service that will start on boot
sudo hb-service install --user homebridge
- Make sure that you have all npm packages are update to date
npm install -g npm-check-updates
- Restart your device
shutdown -r now
Now homebridge is runing on port 8581 You can get your IP Adress with this command
hostname -I
- Execute homebridge/install.sh with
./homebridge/install.sh
- Add the contents of homebridge-config.json to the accessories array in the homebridge config.json file at /var/lib/homebridge/config.json
- Restart homebridge with command
systemctl restart homebridge.service
- Execute mqtt/install.sh with
sudo ./mqtt/install.sh
A list of technologies used within the project:
- Node.js: Version 14.16.0
- Homebridge: Version 1.3.4