In order to integrate Sonoff Bridge with Node-RED we need to change the firmware to Tasmota.

To do this you will need:

Let’s take it apart! Remove the back sticker and the covers for the 4 screws. Grab a screwdriver.

Gently take the board out and locate the RF on/off switch. Before you can upload tasmota, the switch must be in OFF position (change it back to ON position AFTER flashing your Bridge).

Connect the wires from the USB serial adapter to the bridge. I chose not to solder the pins to the board and just hold them with my finger during the update. Be careful not to bend the side antennas.

While pressing the reset button on the bridge, connect the USB serial adapter to your PC. I use an USB extension cable.

Start nodeMCU-flasher. In the first tab (Operation) select the COM port for your device. In the second tab (Config) select the Tasmota .bin file.

On the advanced tab, please make sure the settings are matching:

Click on “Flash” and get your phone ready .

When the upload is done, the board will create an access point for you to connect to. Search for a “sonoff-…” open wifi network and connect to it. Open your favorite browser and type http://192.168.4.1

Remember that switch that you turned OFF earlier? Now is a good time to turn it back ON.

You will get a wifi setup page as shown in the picture below. Enter your wifi network details and click save.

For further configuration you will have to find your device on your network. You can scan the entire network or take a look at the dhcp list on your router.

Go to Configuration -> Configure Module page -> Change Module type to “25 Bridge” and click Save.

You can connect the bridge to Node-RED very easy using MQTT.

You might need to install some drivers for the serial adaptor. Download and install them from here.