For Sonoff Basic R3 DIY, version 3.6.0 - how to put into DIY mode [steps 1-3 can be skipped if the firmware is already at an acceptable level] 1. Make sure the device is first successfully connected to the EWeLink App, by adding the device. 2. Upgrade to the latest firmware version, 3.6.0 or later. 3. Remove it from EWeLink , the status LED will blink two short and one long. 4. Long press the button for 5 seconds to enter Compatible Pairing Mode (AP) and The LED indicator will blink continuously. 5. From mobile phone or PC WiFi setting, an Access Point of the device named ITEAD-XXXXXXXXXX will be found, connect it with default password 12345678. 6. Open the browser and access http://10.10.7.1/. 7. Next, make sure you have a router that works under 2.4G. Fill in WiFi SSID and password on the http://10.10.7.1/ page that the device would have connected with. 8. From the router you can get the device IP and MAC address [or uses Fing app on the phone] . 9. Now you use HTTPost as described below, Of course the LED indicator will still be flashing 2 flashes and a pause. HttpPost parameters and inputs: Standard calling: HttpPost IP address Deviceid Request EG HttpPost 192.168.1.100 10006006f on This will turn the device at that address on. Parameters Ip address: Address of the device on your network DeviceId: the EWelink deviceID [not checked, so some value] Request [optional]: can be: on, off, info, input, or omitted on: turn the device on off: turn the device off info: return a file, HttpPost.log with device details input: One of the other acceptable commands it requires a file named HttpPost.JSON to be present and which instructs the device to respond and create an HttpPost.log file with the result if the file is missing it will resort to info mode if omitted it checks the status of the device Return code: 0: the device is off 1: the device is on 5: there is an error 10: the device is not responding When switching on and off the program checks that the action succeeded and returns the current state, if it failed it returns 5 Note: Sonoff Basic R3 in DIY mode is a 4 state device. it can be used to detect if a circuit to which it is attached is on or off, as well as detecting devices it feeds are on or off. EG HttpPost 192.168.1.100 10006006f This will return error code 10 if the device is powered off, eg all devices on its circuit are off If it returns 1 or 0 then the circuit to which it is attached is active. The 1 or 0 indicates also the state of the output of the Sonoff is on or off, for any devices attached to it. Useful links: http://developers.sonoff.tech/sonoff-diy-mode-api-protocol.html http://developers.sonoff.tech/basicr3-rfr3-mini-http-api.html http://developers.sonoff.tech/d1-http-api.html