The new Sonoff DualR3

I use the following ESPHome config for my DUALR3 (v2.0 with the newer bl0939 power meter) and works fine.

substitutions:
  devicename: mydevicename01

esphome:
  name: $devicename

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  encryption:
    key: "blah"

ota:
  password: "blah"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "$devicename Fallback Hotspot"
    password: "blah"

captive_portal:

uart:
  tx_pin: GPIO25
  rx_pin: GPIO26
  baud_rate: 4800
  parity: NONE
  stop_bits: 2

sensor:
  - platform: wifi_signal
    name: "$devicename WiFi Signal"
    update_interval: 60s
  - platform: bl0939
    update_interval: 30s
    voltage:
      name: "$devicename Voltage"
    current_1:
      name: "$devicename Current 1"
    current_2:
      name: "$devicename Current 2"
    active_power_1:
      name: "$devicename Active Power 1"
    active_power_2:
      name: "$devicename Active Power 2"
    energy_1:
      name: "$devicename Energy 1"
    energy_2:
      name: "$devicename Energy 2"
    energy_total:
      name: "$devicename Energy Total"
  - platform: uptime
    name: "$devicename Uptime"

text_sensor:
  - platform: version
    name: "$devicename ESPHome Version"

output:
  - platform: gpio
    pin: GPIO27
    id: relay1
  - platform: gpio
    pin: GPIO14
    id: relay2

switch:
  - platform: output
    name: "$devicename Relay 1"
    output: relay1
    id: sw1
  - platform: output
    name: "$devicename Relay 2"
    output: relay2
    id: sw2

status_led:
  pin:
    number: GPIO13
    inverted: yes

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "$devicename Button"
    on_press:
      - logger.log: "$devicename Button"
      - switch.toggle: sw1
  - platform: gpio
    pin:
      number: GPIO32
      mode: INPUT_PULLUP
      inverted: True
    name: "$devicename Switch 1"
    on_press:
      - logger.log: "$devicename Switch 1"
      - switch.toggle: sw1
  - platform: gpio
    pin:
      number: GPIO33
      mode: INPUT_PULLUP
      inverted: True
    name: "$devicename Switch 2"
    on_press:
      - logger.log: "$devicename Switch 2"
      - switch.toggle: sw2
1 Like

Hi guys. Quick question. I’ve been looking for a way to flash ESPhome on this device without soldering any wire, is it possible? Already read the article posted before and they say there is no OTA flashing, but that article is from a year ago, so maybe an update could add this feature. Do I have to do the soldering? Thanks!!

Check this one: OTA flashing of virgin Itead Sonoff devices

2 Likes

I use alligator clips for this one.

1 Like

Ohh this sounds easy, gonna try it, thanks!

Anyone successfully also using it as a BT Proxy on top of all the functions? Thanks.

Just wanted to update that I have it successfully working as a BT Proxy as well.

1 Like

Hi everyone! I’m trying to upload a simple ESPHome config to my new sonoff dual r3 v2.0 but less than 1 sec after the boot it starts to reset continuously.
The config is as simple as it can be:

esphome:
  name: dual-r3-test
  platform: ESP32 
  board: esp32dev

And here is the log:

INFO Reading configuration sources/dual_r3.yaml...
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
[20:27:18]ets Jul 29 2019 12:21:46
[20:27:18]
[20:27:18]rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
[20:27:18]configsip: 0, SPIWP:0xee
[20:27:18]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[20:27:18]mode:DIO, clock div:2
[20:27:18]load:0x3fff0030,len:1184
[20:27:18]load:0x40078000,len:13132
[20:27:18]load:0x40080400,len:3036
[20:27:18]entry 0x400805e4
[20:27:18][I][logger:258]: Log initialized
[20:27:18][I][app:029]: Running through setup()...
[20:27:18][I][app:062]: setup() finished successfully!
[20:27:18][I][app:102]: ESPHome version 2023.2.3 compiled on May 23 2023, 20:26:07
[20:27:18][C][logger:293]: Logger:
[20:27:18][C][logger:294]:   Level: DEBUG
[20:27:18][C][logger:295]:   Log Baud Rate: 115200
[20:27:18][C][logger:296]:   Hardware UART: UART0
[20:27:20]ets Jul 29 2019 12:21:46
[20:27:20]
[20:27:20]rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
[20:27:20]configsip: 0, SPIWP:0xee
[20:27:20]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[20:27:20]mode:DIO, clock div:2
[20:27:20]load:0x3fff0030,len:1184
[20:27:20]load:0x40078000,len:13132
[20:27:20]load:0x40080400,len:3036
[20:27:20]entry 0x400805e4
[20:27:21]ets Jul 29 2019 12:21:46
[20:27:21]
[20:27:21]rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
[20:27:21]configsip: 0, SPIWP:0xee
[20:27:21]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[20:27:21]mode:DIO, clock div:2
[20:27:21]load:0x3fff0030,len:1184
[20:27:21]load:0x40078000,len:13132
[20:27:21]load:0x40080400,len:3036
[20:27:21]entry 0x400805e4
[20:27:21]ets Jul 29 2019 12:21:46
etc...

The dual r3 is powered by a pc power supply… so I don’t think it’s a power issue. Any idea what the problem could be?

1 Like

And of course in the end the problem was the power supply… I tried 3 before before writing here… the fourth was the good one!!

Just an info for others who will try to use aligator clips, they works but…
my aligator clips were too strong for the board, first flash went successfully, but I did one mistake,
and when I tried to reconnect alligators, circuit were shorted as aligators “teeths” uncover some contacts (scratched), like SW1, so just take into account that you need “gentle” mini alligators for that

Really cool!

Hi, I use my DUALR3s to control the window rolling shutters. On some I have wifi disconnection issues that piss me off. I would like to convert them with ESPHome.
I ask you:

  • I keep all the same functions on Home Assistant?
  • Can I choose at which level to raise the rolling shutter?
  • Does the management of the interlocked buttons work?

Thanks to all

1 Like

Hi, I’m using Sonoff Dual R3 in Home Assistant(2023-09). I have flashed the device with Tasmota and it works so far fine. All Entities are reported by Sonoff Dual R3 via MQTT to Home Assistant.

If I look up all entities in HA Home Assistent, there is no Temperature reported.

Does anyone know, how to get the Temperature-Entity, which is reported byTasmota beside the Voltage, Power, Current etc. on the screen in my browser. This Temperature I would like to have in HA as an entity. Does anyone know whether that is possible?
.

Tasmota offers to use the zero crossing detection on GPIO4 built into the energy monitoring chip to switch the relay on zero crossing.

This allows for safer and more reliable relay operation. Is this something that ESPHome came do? I couldn’t find anything about it.

1 Like

Hi, could someone help me, I am trying to flash about 20 Sonoff Dual R3s but when ever I flash it it ends up in boot loop. It returns this:

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4

I am getting little bit desperate, I have tried everything, web flasher, esphome CLI, different USB to TTL convertors, but still the same :frowning:

This is thrown by web flasher.

I have very similar if not exactly the same issue. Have you been able to solve that?

1 Like

Make sure you have mains power connected to the Dual R3. As I recall you can flash the device powered from the usb serial connection but it won’t boot.

Edit: Probably want to disconnect serial connection before attaching mains power.

1 Like

Thanks a lot for answer! So flashing should work just by using USB to TTL and then I should connect it to main power (220V) and it should boot?

I have already tried that yesterday , but let me double check it.

I programmed one of these with esphome last year and I remember I had the boot loop problem.

After some searching I recall coming across a post that mentioned the Dual R3 needs more power than can be supplied from the USB TTL adapter. Wiring it up to the mains resolved the issue for me.

They are a pain to connect up so if you have 20 to do I wish you good luck.

Actually with the alligator clips it is pretty easy, one would take me 2-3 mins if there would not be the boot loop issue :slightly_smiling_face:

I will connect it to main power later today and let you know if it helped. I really hope it will work, I have already spent two days on that.