HomeHome AutomationIs Sonoff DIY 2.0 better?

Is Sonoff DIY 2.0 better?

It's time to try Sonoff DIY mode 2.0 and see the changes

Last year I wrote some harsh words about Sonoff DIY mode. It was a step in the right direction, but I felt somehow unimpressed after playing with REST implementation in Shelly 1 (review). A few days ago, ITEAD announced Sonoff DIY 2.0 mode – with improvements, so it’s time to revisit it. I will test on my Sonoff Mini (review).

Sonoff DIY 2.0

Sonoff DIY 2.0 no longer requires a physical switch. The hardware jumpers present on Sonoff Basic R3 (teardown) and Sonoff Mini (review) are things of the past now and the REST API is available through the software implementation. It’s a step in the right direction for sure. If you are on 3.5 firmware already – you can start with REST API in less than a minute.

The problem is, that at the time of writing, Sonoff DIY 2.0 mode is available only on devices that come with that physical switch: Sonoff Basic R3, Sonoff Basic R3 RF and Sonoff Mini. To take advantage of the improved REST API, you have to be on Sonoff 3.5 firmware.

I’m sure in time we will see more devices compatible with it, but can’t help but wonder, why such a slow start.

Buy Sonoff Basic R3

Buy it using these links to support NotEnoughTech.

eWeLink updates, pairing and Sonoff DIY

Despite a major overhaul of the eWeLink app just days ago, updating the firmware to 3.5 is still an issue. The firmware fails, and you have to resort to a hotspot bypass to flash the latest firmware.

Fortunately, the annoying process of pairing Sonoff devices in DIY 1.0 is gone, and all you have to do is to reset your Sonoff to factory settings (hold down the button for 5 seconds) and then enter compatible pairing mode (hold button for further 5 seconds once reset and powered up).

Adding Sonoff device is as simple as searching for ITEAD-XXXXX SSID (pass: 12345678) and adding your WiFi credentials.

Sonoff DIY 2.0 in action

The documentation could use a little polish with working examples, (there is no info about what is the default port number – 8081) but overall it has the information you need to get your Sonoff of the ground.

The REST API is composed in http:sonoff_ip:port/path and takes HTTP post requests in JSON format. Here are handy shortcuts:

http://192.168.1.179:8081/zeroconf/info       //device info
http://192.168.1.179:8081/zeroconf/switch     //power on|off
http://192.168.1.179:8081/zeroconf/startup    //startup behviour
http://192.168.1.179:8081/zeroconf/signal_strength  //signal
http://192.168.1.179:8081/zeroconf/pulse  //inching
http://192.168.1.179:8081/zeroconf/wifi    //wifi creds
http://192.168.1.179:8081/zeroconf/ota_unlock  //unlock OTA
http://192.168.1.179:8081/zeroconf/ota_flash  //flash ota

The request should contain the relevant information and it takes a format like this (you will have to modify the data keys for each URL above:

{
"deviceid": "",
"data": {"switch": "on"}
}

At this point, working with Sonoff DIY 2.0 is identical to the previous version. You can control Sonoff R3 series device, obtain the status and flash Tasmota OTA without messing about with cables and FTD1232.

Buy Sonoff Mini

Buy it using these links to support NotEnoughTech.

Sonoff DIY in NodeRED

I made a flow that covers all the aspects of the Sonoff controls. Feel free to use it to your heart’s content. It submits a custom payload as an HTTP POST. Just select your payload, IP and URL type.

Conlcusion

It’s easier now than ever to use the Sonoff DIY mode and have complete control over your Sonoff device via LAN without flashing Tasmota. I only wish the API would follow Shelly.cloud and Yeelight, allowing both – cloud controls (including voice assistant integrations) and REST API at the same time. Until then, we have to lean on substitutes like Alexa in NodeRED or alternatives for Google Home. Have you used Sonoff DIY yet? Is it enough to keep you from flashing Tasmota? Let me know in this Reddit thread.

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services

client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image

Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

0
To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

0
Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

Sonoff Zigbee Bridge – review

0
Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

DIY Smart Washing Machine – for about 15 bucks!

0
Learn how to add washing machine notifications to your Google Home on the cheap

Nora – Google Assistant in NodeRED

0
Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

Smart Home

I damaged the cheapest Smart Socket with power metering for you

0
Sonoff S60 has an exeptional price for a smart socket with a power meter - I decided to check it out and see how flashable it is

The end of Tasmota? Sonoff SwitchMan M5 Matter

0
These are one of the least expensive Matter devices to automate your lights. Will Sonoff SwitchMan M5 Matter put an end to Tasmota?

Meros TRV to the rescue?

0
I got my hands on another TRV - this time from Meross. I heard good things about the brand so I wanted to see if Meross TRV would be good to manage smart heating.

Aqara brings Thread sensors but…

0
Aqara brings new Thread sensors to their ecosystem. First sensors to support Matter this way are Aqara Motion and Light Sensor P2 and Aqara Contact Sensor P2

Multi-lights for your ceiling from Aqara

0
This is the biggest light I held in my hands so far. It's ZigBee and it comes from Aqara - meet Aqara Ceiling Light T1M