The new Sonoff DualR3 is here!
We got a nice little surprise in the mail today. The all new Sonoff DualR3, a Dual Relay Wi-Fi Smart Switch with Power Metering. With this ESP ‘thing’ you can operate (2) lights, appliances and motorized facilities like blinds and shutters. According to Sonoff it’s the first smart switch with TUV certification and a high-level of quality and reliability.
On the box it say’s it’s a DIY DUALR3, 2-gang WIFI smart switch. When opening up we found there actually is a ESP32 inside. That explains the ‘Bluetooth pairing’ option, which is mentioned on the Sonoff website. We found there are no headers on the board for easy external programming of the ESP, so let’s just hope the ‘DIY’ here means this board has the DIY architecture which allows Over The Air (OTA) flashing of the boards firmware. We tested this, but after putting the Dual R3 in AP mode, it get’s 192.168.1.1 and not the familiar 10.10.7.1 IP-Address. Visiting 192.168.1.1 from the browser just outputs some useless JSON data string 🙁
Bluetooth pairing using the EWlink software works like a charm, no complaints there but surely the device would become much more interesting to us Home Automation nerds if we could flash Tasmota or Esphome firmware. 😛
So we hacked our way into this ‘thing’ and soldered some wires to the tiny TX-RX, GND and 3V3 solder pads on the board. After that we hooked up a UART interface and pressed the Sonoff’s button while booting… et voila!
We put a default esp32 esphome config in it with just wifi, captive portal, api, OTA and logger modules active and booted the ‘thing’:
INFO Starting log output from sonoff_dualr3.local using esphome API INFO Connecting to sonoff_dualr3.local:6053 (192.168.207.226) INFO Successfully connected to sonoff_dualr3.local [17:58:45][I][app:105]: ESPHome version 1.16.2 compiled on Mar 4 2021, 17:40:36 [17:58:45][C][wifi:443]: WiFi: [17:58:45][C][wifi:303]: SSID: [redacted] [17:58:45][C][wifi:304]: IP Address: 192.168.207.226 [17:58:45][C][wifi:306]: BSSID: [redacted] [17:58:45][C][wifi:307]: Hostname: 'sonoff_dualr3' [17:58:45][C][wifi:311]: Signal strength: -68 dB ▂▄▆█ [17:58:45][C][wifi:315]: Channel: 1 [17:58:45][C][wifi:316]: Subnet: 255.255.255.0 [17:58:45][C][wifi:317]: Gateway: 192.168.207.1 [17:58:45][C][wifi:318]: DNS1: 192.168.207.101 [17:58:45][C][wifi:319]: DNS2: 0.0.0.0 [17:58:46][C][logger:185]: Logger: [17:58:46][C][logger:186]: Level: DEBUG [17:58:46][C][logger:187]: Log Baud Rate: 115200 [17:58:46][C][logger:188]: Hardware UART: UART0 [17:58:46][C][captive_portal:169]: Captive Portal: [17:58:46][C][web_server:132]: Web Server: [17:58:46][C][web_server:133]: Address: sonoff_dualr3.local:80 [17:58:46][C][ota:029]: Over-The-Air Updates: [17:58:46][C][ota:030]: Address: sonoff_dualr3.local:3232 [17:58:46][C][ota:032]: Using Password. [17:58:46][C][api:095]: API Server: [17:58:46][C][api:096]: Address: sonoff_dualr3.local:6053 [17:58:46][C][wifi_signal.sensor:009]: WiFi Signal 'WiFi Signal Sonoff DualR3' [17:58:46][C][wifi_signal.sensor:009]: Unit of Measurement: 'dB' [17:58:46][C][wifi_signal.sensor:009]: Accuracy Decimals: 0 [17:58:46][C][wifi_signal.sensor:009]: Icon: 'mdi:wifi'
After some tracing and trying we found the GPIO’s for the LED. Button, Relays and Switches.
esphome yaml:
substitutions: devicename: sonoff-dualr3 long_devicename: Sonoff DualR3 esphome: name: $devicename platform: ESP32 board: esp32dev wifi: ssid: !secret esphome_wifi_ssid password: !secret esphome_wifi_password power_save_mode: light ap: ssid: $devicename password: !secret esphome_ap_password captive_portal: api: password: !secret esphome_api_password ota: password: !secret esphome_ota_password web_server: port: 80 logger: baud_rate: 0 # remove # below to enable ble tracking #esp32_ble_tracker: uart: tx_pin: GPIO25 rx_pin: GPIO26 baud_rate: 38400 parity: EVEN stop_bits: 1 sensor: - platform: wifi_signal name: "$long_devicename WiFi Signal" update_interval: 60s - platform: cse7761 update_interval: 5s voltage: name: "$long_devicename Voltage" current_1: name: "$long_devicename Current 1" current_2: name: "$long_devicename Current 2" active_power_1: name: "$long_devicename Power 1" active_power_2: name: "$long_devicename Power 2" output: - platform: gpio pin: GPIO27 id: relay1 - platform: gpio pin: GPIO14 id: relay2 switch: - platform: output name: "$long_devicename - relay 1" output: relay1 id: sw1 - platform: output name: "$long_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: "$long_devicename button" on_press: - logger.log: "$long_devicename button" - switch.toggle: sw1 - platform: gpio pin: number: GPIO32 mode: INPUT_PULLUP inverted: True name: "$long_devicename switch 1" on_press: - logger.log: "$long_devicename switch 1" - switch.toggle: sw1 - platform: gpio pin: number: GPIO33 mode: INPUT_PULLUP inverted: True name: "$long_devicename switch 2" on_press: - logger.log: "$long_devicename switch 2" - switch.toggle: sw2
Ble tracking also works:
[21:08:41][D][esp32_ble_tracker:544]: Found device 54:D2:72:XX:XX:XX RSSI=-89 [21:08:41][D][esp32_ble_tracker:565]: Address Type: PUBLIC [21:08:41][D][esp32_ble_tracker:567]: Name: 'Nuki_XXXXXXXX' [redacted]
Some more pics:
Please subscribe to our newsletter!
[…] little while back we published this article on the new Sonoff Dual R3. We mentioned that the only disadvantage was that esphome did not yet […]
[…] ESP32-DOWD V3 with 4MB of flash memory. That’s great news! Some time ago Sonoff released the Sonoff Dual R3, which runs the same […]
[…] has just been released. Some of the new features are support for the CSE7761 (as found inside the Sonoff Dual R3, ESP32 Camera Webserver, CAP1188 Captive Touch Sensor and Improv via […]