If you have a situation where you want two Relays on one wifi controlled board, then the Dual my be your solution. The manufacturer has made several revisions to the board. The newest is called the R2. The R2 plus Tasmota firmware is great. If you have a non-R2, then you'll be able to use it through MQTT, but you won't be able to connect external switches.
So as long as you get an R2 you’re golden.
Steps:
Same software prep as with the Sonoff Basic:
Download latest Tasmota (10.0.0a or newer)
Download Arduino IDE
Add Portable folder
Add ESP Board Manager URL
[ Ссылка ]
Add Libraries: ArduinoJson and PubSubClient
Change Max Packet Size to 512 in PubSubClient.h
Add personal Wifi and Mqtt info to user_config.h, and make the Project name unique for this board.
Connect the USB/Serial link to USB. Connect Rx,Tx,Gnd, but not 3.3v yet.
Connect GPIO0 to GND. For R2 GPIO0 is Button0, so a jumper between those two will do it. For the original you have to either solder the wire to the pin on the bottom (I’m not going to try to describe where it is. It’s in the video) or scratch off the green and connect to the track on top (again, gotta see the image in the video).
When GPIO0 is connected to ground you can connect the 3.3v line and the board will start in Programming mode.
Upload the sketch from the Arduino IDE
Find your new board in “connected devices” in your router, copy the IP address and paste in a browser
Go to Configuration and Configure Module. Choose your board (05 Dual, or 39 Dual R2), save and the board will reset
If you have R2 and are using external switches, go back to Configure Module and set 09 Switch1 for Button0 and 10 Switch2 for Button1. Save and it’ll reset again.
Finally go to the Console. Type seriallog0 - enter, then if you’re using a push button switch type switchmode1 4.
Finally go to your configuration.yaml and add the new Dual as a switch:
[ Ссылка ]
switch:
- platform: mqtt
name: "Name1"
command_topic: "cmnd/Projectname/power1"
state_topic: "stat/Projectname/POWER1"
qos: 1
payload_on: "ON"
payload_off: "OFF"
retain: true
- platform: mqtt
name: "Name2"
command_topic: "cmnd/Projectname/power2"
state_topic: "stat/Projectname/POWER2"
qos: 1
payload_on: "ON"
payload_off: "OFF"
retain: true
![](https://i.ytimg.com/vi/pGbDFsNMOkw/mqdefault.jpg)