Sonoff BasicR3
Usage
Installation
-
Install Homebridge on your hub
For example, Raspberry Pi:
-
Install the
@blackstarzes/homebridge-sonoff-basicr3
plugin in Homebridge -
Add the Sonoff BasicR3 platform to the configuration:
{ "bridge": { "name": "Homebridge" }, "accessories": [], "platforms": [ { "platform": "SonoffBasicR3" } ] }
-
Add the Homebridge accessory to HomeKit
Bootstrap
Once ssh-ed into the Pi:
# Update
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt dist-upgrade -y
# Install Node.js
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt-get install -y nodejs gcc g++ make python
node -v
sudo npm install -g npm
# Install Homebridge
sudo npm install -g --unsafe-perm homebridge homebridge-config-ui-x
sudo hb-service install --user homebridge
# Install mDNS
sudo apt-get install libavahi-compat-libdnssd-dev -y
Prepare your hardware for DIY mode
-
Download the eWeLink app on iOS or Android, connect and and upgrade to the latest firmware
This can be quite tricky the first time.
- Without the DIY jumper installed, power on the device. The blue LED should flash
..-
. - Press and hold the button until the blue LED flashes
.
continuously. - Open the eWeLink app and add the device (requires adding it to your network - only 2.4GHz).
- For firmware >=3.5, use quick pairing mode
- For firmware <3.5, use compatibility mode
- Go into the device settings and upgrade to the latest firmware.
- Without the DIY jumper installed, power on the device. The blue LED should flash
-
Supply mains power to the Sonoff BasicR3's input - the device should power up.
-
Press and hold the button until the blue LED flashes
..-
. -
Press and hold the button until the blue LED flashes
.
continuously. -
Connect to the
ITEAD-XXX
access point (password is12345678
) and navigate to http://10.10.7.1 and configure this with your SSID and password.
Development
Install homebridge
-
Follow the instructions at the GitHub Homebridge repository
sudo npm install -g --unsafe-perm homebridge
-
In the root directory of this repository, run:
npm run watch
-
Add the hub to your home (preferably in a development home), and develop away
-
Pull requests are welcome!