When you power on your smart relay (which is loaded with my Firmware) for the first time, an LED will light immediately – when you see this, press the button “L1”, or the only button if there is just one button and hold it for 5 seconds (or a bit longer to be on the safe side).
If you get a laptop with Wifi and look for available networks, you should see a new network starting with “Sonoff”. Connect to this – the default password is “password”.
Write down the name of this network as we will need it later.
Once connected, open a web browser and go to the following URL :
This should turn on the relays (and indication LEDs). Now go to the following URL :
This will turn all relays off again.
Connecting to the house WiFi
To connect your relay to the house wifi, continuing from above (with a computer connected to the relay’s own “Sonoff” wifi network), carefully enter the following URL, substituting <ssid> for the name of your wifi network.
For example, if your wifi network is called “spaceship” then you would enter http://192.168.4.1/wifi?ssid=spaceship
Next, to tell the relay the password for your wifi network, carefully enter the following, substituting <passwd> for your wifi password :
If you now power cycle the relay (do not press the button), it should automatically connect to your wifi network and be available to all devices on the network. Note that if your network name or network password contains symbols which are not valid in a URL, you might need to use escape characters, change the wifi details, or give up.
Using the wifi network name you wrote down earlier, try the following, replacing <relayname> with the network name you wrote down :
and this :
If these do not work, try the same, without “.local”.
From the Terminal
From the terminal on a Mac or Raspberry Pi, try typing the following command
wget -qO – http://<relayname>.local/set?data=1111
This command can be called from inside Linux style bash scripts. Similar things can be done from within Python.