Tasmota: Support of Sonoff Dual R2 variant

Created on 25 Nov 2017  Â·  20Comments  Â·  Source: arendst/Tasmota

Hello Tasmona community,

I have purchased 3 x Sonoff Dual modules. But those are different from any other mentioned module. (or just I not found anything on the web, maybe my fault) Does anyone have the same board?

The label on the board: Sonoff Dual R2. Ver 1.0 , 2017-7-20 (maybe the manufacturing date)
Inside the case there is only one chip a ESP8285.
The relays and the LEDs are directly connected to the ESP.

I will open a pull request according to the new module as soon as I am able to check in the necessary modifications to my fork repo.

Here is the pinning of the ESP:
This variant is more simpler then the previous one. (and perhaps cheaper for iTead)

PIN | Function
-- | --
GIO0 | BUTTON 0 (inside header)
GIO5 | L2 RELAY
GIO9 | BUTTON 1 (inside header)
GIO10 | SWITCH (on the case)
GIO12 | L1 RELAY
GIO13 | BLUE LED (inverted)

Some pictures about the board:

img_e5188 2

img_e5187

img_e5189

img_e5190

All 20 comments

since you have found what's connected to what, you should be able to use the
wemos module type and define the various GPIOs

As far as I see no it will not work 100%. Because the Button1 and the case switch are connected to the GPIO9 and 10, but in the "WeMos D1 mini" the GPIO 6 - 11 are not defined as GPIO_USER.

And otherwise in my opinion if this is an official Sonoff device then is should be supported by default.
I do not know when will iTead update the official wiki page and provide the schematic for this variant?

The R2 will be included in Tasmota as a seperate device.

For now I use your findings regardiog GPIO and add it to the next (pre)release.

Edit: The GPIO connections are based on the 4CH where button 3 is the one on the casing. I guess I configure button 1 and 2 as switch 1 and 2 and button 3 (GPIO10) as button 1. Let's see if that's useful...

Edit2: Like this:

  { "Sonoff Dual R2",  // Sonoff Dual R2 (ESP8285)
     GPIO_SWT1,        // GPIO00 Button 1 on header
     GPIO_USER,        // GPIO01 Serial RXD and Optional sensor
     0,
     GPIO_USER,        // GPIO03 Serial TXD and Optional sensor
     0,
     GPIO_REL2,        // GPIO05 Relay 2 (0 = Off, 1 = On)
     0, 0, 0,          // Flash connection
     GPIO_SWT2,        // GPIO09 Button 2 on header
     GPIO_KEY1,        // GPIO10 Button 3 on casing
     0,                // Flash connection
     GPIO_REL1,        // GPIO12 Relay 1 (0 = Off, 1 = On)
     GPIO_LED1_INV,    // GPIO13 Blue Led (0 = On, 1 = Off)
     0, 0, 0, 0
  }

I hate to be that guy to always push the documentation...
I'd suggest to keep the documentation up to date and one article that definitely would benefit from the images and a few details posted above is: https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-Dual (see for an example for two versions) @vanyid maybe you could invest a few minutes there?

The best thing I can see in this new version is that they have finally stopped using the fuse clips that were quite incapable of handling 16A. Have a look here for tales of woe when trying to use the fused Sonoffs with high currents: http://support.iteadstudio.com/support/discussions/topics/11000012976?page=1

@arendst still no documentation. Way to go 💯

For documentation I've annotated previous ESP8285 picture with pinout issued from the Espressif datasheet. I was looking for available GPIO pins. It appears that GPIO 2, 4, 6, 7, 8, 11, 14 & 16 are free but only available on the ESP8285 chip, which requires some squills to solder. Instead of ADC (pin6) it seems that it's GPIO15 that is used to monitor the power supply.
In fact the easiest way to connect a sensor will be to use RX and TX on the header. The sensor will have to be removable in case of serial reprogramming, but I guess not in case of OTA update..

[Edith]
dualr2_esp8285
I modified previous picture in order to clarified on the picture the RX and TX inversion between ESP8285 datasheet and the Sonoff notation.
dualr2_esp8285

In the meantime, I just managed to connect a DS18B20 on GPIO1 (TX).

2018-04-17 02_12_12-sonoff - configuration module | 2018-04-17 02_18_01-sonoff - menu principal
[/Edith]

@vanyid I have the same board, How do you flash tasmota firmware? I have the arduino uno, it is the same process as esp8266 but instead of select 8266 generic board I need to select generic esp8285 module?... It is compatible for add external switches?
Thank you

@cpfarher I hope you already found your answer in the wiki here. And YES the settings are the same for esp8285 and 8266.

Has anyone managed to get an AM2301 to work on the Dual R2. I have tried Button 0, Button 1 ,Tx and Rx and just get NaN as a response.(v6.2.1). Have tried other versions back as far as 5.12 and the sensor doesn't appear in the UI after configuration.
Resolved - duff ground connection in the 2.5mm jack socket.

Of course it works.
I used GPIO1 for that, the header also have Vcc and Gnd, this perfect for the purpose.
Here is a picture of my implementation as a roller shutter with wall switches on GPIO0 and GPIO9
Currently working on 6.0.0a but I'm confident it would work on other versions.

Hi. I've a new Version with Layer date from 2019-09-04

20200604_165311
20200604_165953
20200604_170012
20200604_170106

Yes I got 4 of them too and they behave the same as v1.0

Is it possible to use a bme280 over sda and scl? When I look at pcb 1.4 pin 14 is in use

Could you use the Rx and Tx pins at the top of the board?
Need to be careful at boot but should be ok.

Regards

Phil K

Sent from Outlook Mobilehttps://aka.ms/blhgte


From: Bersaker notifications@github.com
Sent: Friday, June 5, 2020 2:52:38 AM
To: arendst/Tasmota Tasmota@noreply.github.com
Cc: pmknowles pmknowles@outlook.com; Comment comment@noreply.github.com
Subject: Re: [arendst/Tasmota] Support of Sonoff Dual R2 variant (#1249)

Is it possible to use a bme280 over sda and scl? When I look at pcb 1.4 pin 14 is in use

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Farendst%2FTasmota%2Fissues%2F1249%23issuecomment-639210645&data=02%7C01%7C%7Cd035111a260343caac3708d808f32085%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637269187598070864&sdata=Pfhi%2BsNM4x41dhkKMAkCIHS7Kiz27qCA%2Bff7Hal8Bu8%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI5KPM7VNYTMQ6CPS36X45DRVBFWNANCNFSM4EFKIQTQ&data=02%7C01%7C%7Cd035111a260343caac3708d808f32085%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637269187598080859&sdata=UoWIvy1wcCanVdvTW%2F2%2BuGk1NmAsc1VhM9VZp498Egg%3D&reserved=0.

Yes, no problem to use the header on the top of board to connect a BME280 but you'll have to disable SerialLog (it's maybe automatic in Tasmota code).
The delicate point is to use Button 0 (GPIO9) which will prevent reboot if pull down.

2020-06-05 08_34_06-D11 VR_SdB2 - Configuration du Module

2020-06-05 08_35_47-D11 VR_SdB2 - Menu principal

I really wish people would read this page.
https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/
It’s not just GPIO0 that causes reboot problems. Tx (GPIO1) will also cause a boot fail if it’s taken low as will GPIO2

Regards

Phil K

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Xavier MULLERnotifications@github.com
Sent: 05 June 2020 07:52
To: arendst/TasmotaTasmota@noreply.github.com
Cc: pmknowlespmknowles@outlook.com; Commentcomment@noreply.github.com
Subject: Re: [arendst/Tasmota] Support of Sonoff Dual R2 variant (#1249)

Yes, no problem to use the header on the top of board to connect a BME280 but you'll have to disable SerialLog (it's maybe automatic in Tasmota code).
The delicate point is to use Button 0 (GPIO9) which will prevent reboot if pull down.

[2020-06-05 08_34_06-D11 VR_SdB2 - Configuration du Module]https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F33861984%2F83845079-7dc71f00-a708-11ea-91c7-31c8ffc315ca.png&data=02%7C01%7C%7C82d121a72cc84877e67a08d8091d1339%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637269367759298939&sdata=ra7LR5ZG1uJ%2FALC7A98bMbBAb85%2BfSwyUv9k9QdcvtQ%3D&reserved=0

[2020-06-05 08_35_47-D11 VR_SdB2 - Menu principal]https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F33861984%2F83845154-96373980-a708-11ea-8c2b-9470d5b10ccd.png&data=02%7C01%7C%7C82d121a72cc84877e67a08d8091d1339%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637269367759308935&sdata=8P1xleVpqAautHPRNpJkbeJT%2FF4uns1n6LtEgHIIwIY%3D&reserved=0

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Farendst%2FTasmota%2Fissues%2F1249%23issuecomment-639294310&data=02%7C01%7C%7C82d121a72cc84877e67a08d8091d1339%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637269367759318934&sdata=lpYhZIwuI9q9xWZpig2UhBzbcSAiyrA%2FkSQiOzANjbg%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI5KPM4WFQZCSGKA7TRRHOLRVCI4PANCNFSM4EFKIQTQ&data=02%7C01%7C%7C82d121a72cc84877e67a08d8091d1339%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637269367759328931&sdata=z8Wkf7OpVE3P6TyJcRflCTNgQoAeuY534MLbKNGmrPI%3D&reserved=0.

@pmknowles That's a great summary. You should add it to https://tasmota.github.io/docs/Peripherals/#usable-pins

Done

Phil

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: Michael Ingraham notifications@github.com
Sent: Friday, June 5, 2020 2:03:33 PM
To: arendst/Tasmota Tasmota@noreply.github.com
Cc: pmknowles pmknowles@outlook.com; Mention mention@noreply.github.com
Subject: Re: [arendst/Tasmota] Support of Sonoff Dual R2 variant (#1249)

@pmknowleshttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpmknowles&data=02%7C01%7C%7Cc57838f2c0ff4633942208d80950db33%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637269590160961097&sdata=dV3lleXIJk9QaRXoXdHaTeMT9P6L36CAqAMMV%2B7l0%2BY%3D&reserved=0 That's a great summary. You should add it to https://tasmota.github.io/docs/Peripherals/#usable-pinshttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftasmota.github.io%2Fdocs%2FPeripherals%2F%23usable-pins&data=02%7C01%7C%7Cc57838f2c0ff4633942208d80950db33%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637269590160971105&sdata=nacMydpYi8Clipk3hW3MB1t1xN0wNFbUVDNku1NMQ6U%3D&reserved=0

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Farendst%2FTasmota%2Fissues%2F1249%23issuecomment-639466676&data=02%7C01%7C%7Cc57838f2c0ff4633942208d80950db33%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637269590160981089&sdata=q65phjZT5uT3Q%2BZ2bYhMCiir76zyxDohAAAeFzSU5lc%3D&reserved=0, or unsubscribehttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAI5KPM23VZWXLXDSWADRKNDRVDUKLANCNFSM4EFKIQTQ&data=02%7C01%7C%7Cc57838f2c0ff4633942208d80950db33%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637269590160991077&sdata=FbCvIFJNAZ1qfKIH4krjvGF2ujyvO6EnFlD%2BF4wpKGo%3D&reserved=0.

The same exists for ESP32. Perhaps this would be great to add it, too.

https://randomnerdtutorials.com/esp32-pinout-reference-gpios/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jensuffhaus picture jensuffhaus  Â·  3Comments

Ndrinta picture Ndrinta  Â·  3Comments

kckepz picture kckepz  Â·  3Comments

wirelesssolution picture wirelesssolution  Â·  3Comments

luisfpinto picture luisfpinto  Â·  3Comments