Sonoff RF Bridge 433 MHz

model: Sonoff RF Bridge 433 MHz

Links

OpenMQTTGateway, Sonoff RF Bridge with custom firmware, Sonoff RFB, Itead wiki: Sonoff RF Bridge 433,

more links

ESPurna, Home Assistant community: 433toMQTTto433 gateway device list, Hacking the Sonoff RF Bridge 433, Sonoff-Tasmota, Sonoff RF Bridge 433, ESPHome links Remote Receiver, Remote Transmitter

other links

SonoffLED-HomeAssistant, ESPHome, Using ESPHome on Sonoff RF Bridge,

local links

bb, c1, back to home automation page.

History / work log

2021-12-17: c1 - with the toolchain port installed, and configured for platformio esphome can update the bridge

INFO Reading configuration config/sonoff-rf-bridge.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing sonoff-rf-bridge (board: esp01_1m; framework: arduino; platform: platformio/espressif8266 @ 2.6.3)
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|-- <ESPAsyncWebServer-esphome> 2.1.0
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|-- <ESP8266WiFi> 1.0
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESP8266mDNS> 1.2
Compiling .pioenvs/sonoff-rf-bridge/src/esphome/components/remote_transmitter/remote_transmitter.cpp.o
Compiling .pioenvs/sonoff-rf-bridge/src/esphome/components/remote_transmitter/remote_transmitter_esp32.cpp.o
Compiling .pioenvs/sonoff-rf-bridge/src/esphome/components/remote_transmitter/remote_transmitter_esp8266.cpp.o
Compiling .pioenvs/sonoff-rf-bridge/src/main.cpp.o
Linking .pioenvs/sonoff-rf-bridge/firmware.elf
Building .pioenvs/sonoff-rf-bridge/firmware.bin
RAM:   [====      ]  39.9% (used 32708 bytes from 81920 bytes)
Flash: [====      ]  40.5% (used 415096 bytes from 1023984 bytes)
========================= [SUCCESS] Took 6.08 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of sonoff-rf-bridge.local
INFO  -> 10.1.161.22
INFO Uploading config/.esphome/build/sonoff-rf-bridge/.pioenvs/sonoff-rf-bridge/firmware.bin (419248 bytes)
INFO Compressed to 291295 bytes
Uploading: [============================================================] 100% Done...


INFO Waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from sonoff-rf-bridge.local using esphome API
INFO Successfully connected to sonoff-rf-bridge.local
[21:00:21][I][app:102]: ESPHome version 2021.12.1 compiled on Dec 17 2021, 20:59:42
[21:00:21][C][wifi:488]: WiFi:
[21:00:21][C][wifi:350]:   Local MAC: DC:4F:22:82:57:E8
[21:00:21][C][wifi:351]:   SSID: [redacted]
[21:00:21][C][wifi:352]:   IP Address: 10.1.161.22
[21:00:21][C][wifi:354]:   BSSID: [redacted]
[21:00:21][C][wifi:355]:   Hostname: 'sonoff-rf-bridge'
[21:00:21][C][wifi:357]:   Signal strength: -61 dB ▂▄▆█
[21:00:21][C][wifi:361]:   Channel: 10
[21:00:21][C][wifi:362]:   Subnet: 255.255.0.0
[21:00:21][C][wifi:363]:   Gateway: 10.1.10.1
[21:00:21][C][wifi:364]:   DNS1: 10.1.10.1
[21:00:21][C][wifi:365]:   DNS2: 0.0.0.0
[21:00:21][C][logger:233]: Logger:
[21:00:21][C][logger:234]:   Level: DEBUG
[21:00:21][C][logger:235]:   Log Baud Rate: 115200
[21:00:21][C][logger:236]:   Hardware UART: UART0
[21:00:21][C][remote_transmitter:018]: Remote Transmitter...
[21:00:21][C][remote_transmitter:019]:   Carrier Duty: 50%
[21:00:21][C][remote_transmitter:020]:   Pin: GPIO5
[21:00:21][C][remote_receiver.esp8266:060]: Remote Receiver:
[21:00:21][C][remote_receiver.esp8266:061]:   Pin: GPIO4
[21:00:21][C][remote_receiver.esp8266:066]:   Buffer Size: 1000
[21:00:21][C][remote_receiver.esp8266:067]:   Tolerance: 25%
[21:00:21][C][remote_receiver.esp8266:068]:   Filter out pulses shorter than: 50 us
[21:00:21][C][remote_receiver.esp8266:069]:   Signal is done after 2000 us of no changes
[21:00:21][C][captive_portal:144]: Captive Portal:
[21:00:21][C][web_server:162]: Web Server:
[21:00:21][C][web_server:163]:   Address: sonoff-rf-bridge.local:80
[21:00:21][C][ota:082]: Over-The-Air Updates:
[21:00:21][C][ota:083]:   Address: sonoff-rf-bridge.local:8266
[21:00:21][C][ota:086]:   Using Password.
[21:00:21][C][api:134]: API Server:
[21:00:21][C][api:135]:   Address: sonoff-rf-bridge.local:6053
[21:00:21][C][api:139]:   Using noise encryption: NO
[21:00:21][C][mdns:084]: mDNS:
[21:00:21][C][mdns:085]:   Hostname: sonoff-rf-bridge
[21:00:28][D][api:098]: Accepted 10.1.161.33
[21:00:28][D][api.connection:771]: Home Assistant 2021.11.3 (10.1.161.33): Connected successfully

2021-12-17: c1 - after installing esphome on my FreeBSD workstation, see if the esphome dashboard finds the device

tingo@kg-core2$ esphome dashboard config/
2021-12-17 19:53:45,035 INFO Starting dashboard web server on http://0.0.0.0:6052 and configuration dir config/...

the device is online, but as soon as I try install, I run into problems

INFO Reading configuration config/sonoff-rf-bridge.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing sonoff-rf-bridge (board: esp01_1m; framework: arduino; platform: platformio/espressif8266 @ 2.6.3)
--------------------------------------------------------------------------------
Tool Manager: Installing platformio/toolchain-xtensa @ ~2.40802.0
Error: Could not find the package with 'platformio/toolchain-xtensa @ ~2.40802.0' requirements for your system 'freebsd_amd64'

but there is a port of the toolchain on github freebsd-ports-esp-quick-toolchain. Let me try to install that.

2021-12-16: today I soldered up resistors and cut wires per Sonoff RF Bridge Direct Hack.

2021-12-15: I brought the ESPHome-ified RF bridge back home and powered it on - yes Home Assitant discovered it. Nice!

2021-12-15: bb - ESPHome can be installed by following the Getting Started with ESPHome guide. Then I had to add esphome to PATH:

tingo@kg-bsbox:~/work/bitraf/2021/20211215_Sonoff_RF_Bridge_433_flashing$ export PATH=$HOME/.local/bin:$PATH

the I could start the dashboard

tingo@kg-bsbox:~/work/bitraf/2021/20211215_Sonoff_RF_Bridge_433_flashing$ esphome dashboard config/
2021-12-15 18:41:12,834 INFO Starting dashboard web server on http://0.0.0.0:6052 and configuration dir config/...
2021-12-15 18:41:24,843 INFO 304 GET / (127.0.0.1) 28.95ms

from there I could create a config, then Install, Manual download the get the file sonoff-rf-bridge.bin on my computer. Next step was to connect the RF bridge to a usb serial adapter (3.3V): 3.3V, Tx to Rx, Rx to Tx and GND, press button on RF bridge when powering on (hold for >= 2 secs). Finally, the flashing

tingo@kg-bsbox:/zs/tingo/work/bitraf/2021/20211215_Sonoff_RF_Bridge_433_flashing$ ll /dev/tty[ACU]*
crw-rw----+ 1 root dialout 188, 0 Dec 15 18:57 /dev/ttyUSB0
tingo@kg-bsbox:/zs/tingo/work/bitraf/2021/20211215_Sonoff_RF_Bridge_433_flashing$ ~/dl/linux/ESPHome-Flasher-1.4.0-Ubuntu-x64.exec -p /dev/ttyUSB0 sonoff-rf-bridge.bin 
Using '/dev/ttyUSB0' as serial port.
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting...
Detecting chip type... ESP8266
Connecting...

Chip Info:
 - Chip Family: ESP8266
 - Chip Model: ESP8285N08
 - Chip ID: 008257E8
 - MAC Address: DC:4F:22:82:57:E8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
 - Flash Size: 1MB
 - Flash Mode: dout
 - Flash Frequency: 40MHz
Erasing flash (this may take a while)...
Chip erase completed successfully in 4.0s
Flash will be erased from 0x00000000 to 0x00066fff...
Compressed 418160 bytes to 290540...
Wrote 418160 bytes (290540 compressed) at 0x00000000 in 7.0 seconds (effective 474.8 kbit/s)...
Hash of data verified.

Leaving...
Hard Resetting...
Hard resetting via RTS pin...
Done! Flashing is complete!

Showing logs:
Serial port closed!

It seems to have worked. 2021-12-15: bb - ESPHome-Flasher can be used for initial flashing. The Ubuntu version runs under Debian at least:

tingo@kg-bsbox:~$ ~/dl/linux/ESPHome-Flasher-1.4.0-Ubuntu-x64.exec -h
usage: esphomeflasher 1.4.0 [-h] [-p PORT] [--esp8266 | --esp32 | --upload-baud-rate UPLOAD_BAUD_RATE]
                            [--bootloader BOOTLOADER] [--partitions PARTITIONS] [--otadata OTADATA] [--no-erase]
                            [--show-logs]
                            binary

positional arguments:
  binary                The binary image to flash.

optional arguments:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  Select the USB/COM port for uploading.
  --esp8266
  --esp32
  --upload-baud-rate UPLOAD_BAUD_RATE
                        Baud rate to upload with (not for logging)
  --bootloader BOOTLOADER
                        (ESP32-only) The bootloader to flash.
  --partitions PARTITIONS
                        (ESP32-only) The partitions to flash.
  --otadata OTADATA     (ESP32-only) The otadata file to flash.
  --no-erase            Do not erase flash before flashing
  --show-logs           Only show logs

it also has a gui.

2021-12-14: see also the thread Sonoff RF Bridge with ESPHOME? in Home assistant community.

2021-12-14: inspecting the Sonoff bridge I have; it is a R2 V1.0 version. Text on the PCB reads: "433BRIGE R2 V1.0" and "2017.11.23". It has a ESP8285, a chip labeled "B810", "F8G", "A00PHG", a SYN470R, and more. It looks like it can use Portisch firmware - if I want.

2021-08-09: I re-created this page on my self-hosted web server.

2018-04-12: build night at Bitraf - I made a programming adapter with pogo pins and tried to program OpenMQTTGateway firmware on it, but failed:

Archiving built core (caching) in: /tmp/arduino_cache_930131/core/core_esp8266_esp8266_esp8285_CpuFrequency_80,UploadSpeed_115200,FlashSize_1M512_e0dd0f708b1c93aef43c9d33ec94c1f3.a
Sketch uses 277015 bytes (55%) of program storage space. Maximum is 499696 bytes.
Global variables use 35648 bytes (43%) of dynamic memory, leaving 46272 bytes for local variables. Maximum is 81920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

not sure why.

2018-04-07: inside - on the component (top) side of the PCB, the large flat power LED dominates the centre piece. Unfortunately it also covers the two places where you can solder in pin headers for programming the devce. Perhaps I need a pogo pin adapter here.

2018-04-07: opening the box - there are four small philips screws underneath the four rubber feet on the bottom of the case. Pry off the feet, unscrew screws and the bottom comes off.

2018-04-07: I connected the RF Bridge to my Fedora laptop. The logo on top lights up green (power), the left LED is dark (red = 433) and the right LED blinks blue (WiFi), but the device doesn't show up with 'lsusb' perhaps it only have power via usb. Yes - the schematic confirms that only power is taken from the microUSB connector.

2018-04-06: you can also use rtl_433 (requires rtl-sdr and a rtl-sdr dongle) for decoding. A lot of device protocols is supported.

2018-04-06: see HowToHack_RemoteControl in rc-switch repo for ideas on how to figure out 433 MHz protocols. Also see 433Utils.

2018-02-15: received a pick up note in my (physical) mailbox, and fetched the package from my local PIB (Extra Trondheimsveien). Wow, the module is small.

2018-01-26: got a shipment notice from Itead, my order was shipped.

2018-01-25: I ordered a Sonoff RF Bridge 433 MHz from Itead at USD 14.90 + USD 4.52 in shipping.