No Tasmota and eWeLink cloud to control the SONOFF device? YES!

Did you ever expect to control the SONOFF device by your own application without Tasmota firmware flash ? Since the middle of 2019, SONOFF released a DIY mode for BASICR3, RFR3, MINI and D1 that users are able to discover the SONOFF device via mDNS discovery mechanism as well as control the device according to the published REST API protocol.

let’s call the first version of the DIY mode as Edition 1.0, as some of home-automation community members known, when the device was switched into DIY mode, it connected with a specfic WiFi network which is defined by SONOFF, the device WiFi configuration setting can be changed via the tool from Github. Now! SONOFF develops DIY mode 2.0 which is much easier and faster to switch into DIY mode and set up the device.

Let’s check it out and see how easy and speedy to set up a DIY mode device in minutes!

The way to switch into DIY mode of the new version (2.0) is totally different with the 1.0 one. No enclosure disassembly and jumper plug-in is needed, in DIY mode 2.0, long pressing the pairing button for seconds leads device switch into Compatiable Pairing Mode (AP) which set the device as Access Point. A hotspot of the Access Point can be found in the name of ITEAD-XXXXXXX (password: 12345678), connect it!

A web page for the configuration of WIFi network that the device will connected with is stored in DIY mode device which can be accessed by the URL of http://10.10.7.1/ as below shown, after configuring the SSID and Password, the device will reboot and connect with the WiFi network that just entered.

With a successful WiFi network connection, the device will be blinking in this way as below shown. Device IP address appears in the router management dashboard.

Wow, The device is under your control now!

As you can check the REST API protocol from SONOFF website developer page, the capability includes ON&OFF Switch, Power-On State, Inching, network SSID and password reset, signal strength,retrieve device info etc.

Let’s try to control the SONOFF device [1] with ON&OFF, Inching and retrieve device info via Postman application. As we known from the developer page of DIY mode protocol, ON&OFF control is defined by sending a HTTP request to the URL of http://[ip]:[port]/zeroconf/switch,

{ 
"deviceid": "",
"data": {
  "switch": "on"
  }
}
AttributeTypeOptionalDescription
switchStringNoon: turn the switch on, off: turn the switch off

Here is the demo of ON&OFF in Postman:

The inching function is available to be controlled via the request as below

URL: http://[ip]:[port]/zeroconf/pulse

{ 
"deviceid": "",
"data": {
  "pulse": "on",
  "pulseWidth": 2000
  }
}
AttributeTypeOptionalDescription
pulseStringNoon: activate the inching function; off: disable the inching function
pulseWidthNumberYesRequired when “pulse” is on, pulse time length, positive integer, ms, only supports multiples of 500 in range of 500~36000000

Now the inching setting is on with pulsewidth 2000ms, thus, when device is turned on, it will automatically turn off after 2000ms.

To get the device info, send a request via a URL request of

http://[ip]:[port]/zeroconf/info.

{ 
"deviceid": "",
"data": { }
}

Empty object, no attribute is required.

A response feedback of the device info is coming.

How easy the whole process is, isn’t it?

PS: DIY mode 2.0 is availble for the device (BASICR3, RFR3 MINI and D1) with firmware 3.5.0, if the device firmware is below 3.5.0, update the firmware via eWeLink APP is needed.

Dimmer product DIY Mode tutorial:

The process of device set up and control becomes more convenient and speedy. The real sense of DIY mode is to explore the way to control the SONOFF device [1] and save the time from no Tasmota firmware flash, without eWeLink cloud go through, you are still able to get the fully control for the SONOFF device [1] , integrate the device in the home-automation platform such as Home Assistant, OpenHAB,Homeseer etc which makes more possibilities happen.

Control the SONOFF device in the way as you want, enjoy the home-automation journey!

By the way, more SONOFF products will be integrated with DIY mode, stay tuned!

SONOFF, Your Smart Choice.

PS: [1] The SONOFF device refers to BASICR3,RFR3, MINI and D1.

Leave a Reply

Your email address will not be published. Required fields are marked *