logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

Tuya IR Blaster S06 - CB3S to ESP-12F Conversion & Tasmota

jkwim  14 7638 Cool? (+2)
📢 Listen (AI):

TL;DR

  • Tuya S06 IR Blaster with a CB3S module was converted to an ESP-12F and flashed with tasmota_ir.bin to capture and replay Panasonic fan IR codes.
  • The mod relied on matching power, chip enable, and reset pins, plus added 10k pullup/pulldown resistors for Chip Enable and GPIO15.
  • SetOption58 enabled RAW reception, producing an UNKNOWN 78-bit IR frame with Hash 0x94972B6F and RawData like +3525a+830-2700Bc... .
  • The captured RAW string could be replayed directly with IRSend 0, and trailing data was trimmed by trial and error to find the minimum workable command.
  • De-soldering damaged R3 and C5, so the reset button no longer works for now and the LED8 indicator still needs further hardware tweaking.
Updated: 2023/12/27
The IR Codes captured on Tasmota with new compact encoding scheme can be played back as it is through IRSend. See the updates below



Reference Links about S06 IR Blaster:
Teardown, flashing and configuration for Smart Tuya IR Blaster S06 [CB3S]
OpenBeken configuration for WiFi universal IR remotes from aliexpress (S06, S18, IRC02) with BK7231

I have a requirement to be able to capture/send IR RAW data to make my Panasonic Fan working.

Since IR RAW feature will take some time to appear in OpenBeken, I decided to go the hard way.

I had a S06 with CB3S Module.

When you inspect the CB3S Module alongside ESP-12F you could see a perfect match for critical PINs like Power, Chip Enable and Reset.

ESP-12F and CB3S modules with S06 IR Blaster board.

So I decided to replace the CB3S Module with ESP-12F Module.

I first flashed tasmora_ir.bin image on to ESP-12F (There are plenty of tutorials available on flashing ESP-12F module on the internet).

I did not do a very good job in de-soldering and soldering in the new module. It was the first time for me to use the heat gun and I accidentally blew off a tiny SMD resistor and a capacitor in the process. Hopefully I can do a better job next time :-)

Circuit board with ESP-12F module and component labels.

I blew up R3 & C5 [4] during the process. These are connected to RESET button on the device. For the moment the RESET button is trivial for me as I can always power cycle the device externally. Perhaps I will make some corrections later to the hardware.

Close-up of a circuit board with a highlighted section showing electronic components.

Needed to solder 10k pullup/pulldown resistors as shown for Chip Enable [1] and GPIO15 [2] as shown.

One more issue remains. I could not get the LED8 [3] to light up. When I touch the R13 with a tweezer the LED gets lit up faintly. The output on GPIO4 where the LED is connected to toggles between 0V and 3.2V ish value correctly. Need to see whether R13 needs to be changed. Again this is a trivial matter for me at the moment.

Tasmota Setup:

Screenshot showing template parameters settings for S06 IR controller in Tasmota.

Enabled Option58 for receiving RAW data.

21:32:50.903 CMD: SetOption58 1
21:32:50.906 RSL: RESULT = {"SetOption58":"ON"}

21:32:56.983 RSL: RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":78,"Hash":"0x94972B6F","Repeat":0,"RawData":"+3525a+830-2700Bc+825-935DcBcDcBeDeBeDeDeB-2695BeDeDcBeDeDeDcDc+845-2675DfBcDeD-39350+3565-3485DfBcDeDcDc+850hDeL-910D-940DeDeDcBeDeDcDeDeDeBfDcDcDfDcDeDiA-3520DcDcDeDcL-2670+855pLmDnLmDeDnDcQmLmLpDnDeDeLpDcLpQpLpLmD","RawDataInfo":[155,155,0]}}


Update:
The following conversion is not required. We can directly play back the above raw data string received

-------------------------------------------------------------------------------
The RAW data received can be converted in to a string which can be transmitted using IRSend command using the following tool:

https://tasmota.hadinger.fr/util

Screenshot of Tasmota Code Tools with raw IR data.
-------------------------------------------------------------------------------

Data received in following RAW Date message can be played back:
21:32:56.983 RSL: RESULT = {"IrReceived":{"Protocol":"UNKNOWN","Bits":78,"Hash":"0x94972B6F","Repeat":0,"RawData":"+3525a+830-2700Bc+825-935DcBcDcBeDeBeDeDeB-2695BeDeDcBeDeDeDcDc+845-2675DfBcDeD-39350+3565-3485DfBcDeDcDc+850hDeL-910D-940DeDeDcBeDeDcDeDeDeBfDcDcDfDcDeDiA-3520DcDcDeDcL-2670+855pLmDnLmDeDnDcQmLmLpDnDeDeLpDcLpQpLpLmD","RawDataInfo":[155,155,0]}}


IRSend 0, +3525a+830-2700Bc+825-935DcBcDcBeDeBeDeDeB-2695BeDeDcBeDeDeDcDc+845-2675DfBcDeD-39350+3565-3485DfBcDeDcDc+850hDeL-910D-940DeDeDcBeDeDcDeDeDeBfDcDcDfDcDeDiA-3520DcDcDeDcL-2670+855pLmDnLmDeDnDcQmLmLpDnDeDeLpDcLpQpLpLmD


I did a further optimization by deleting parts of the string from the end, working backwards until I find a +/- symbol. When you press the remote you might press it too longer than required. So the extra data stream can be removed like this on trial & error basis. This way you can figure out the minimum length of data string to play back. See the example of Tasmota rule for the final outcome.


Defined 5 x Virtual Relays using unused GPIOs to be used as Buttons on WebGUI:

Screenshot of Tasmota configuration for S06 IR controller


User interface of S06 IR Controller in Tasmota

Changed the labels on the buttons:
02:36:18.449 CMD: WebButton1 PWR
02:36:18.454 RSL: RESULT = {"WebButton1":"PWR"}
02:36:29.105 CMD: WebButton2 SPD
02:36:29.110 RSL: RESULT = {"WebButton2":"SPD"}
02:36:39.275 CMD: WebButton3 OSC
02:36:39.281 RSL: RESULT = {"WebButton3":"OSC"}
02:36:53.438 CMD: WebButton4 RHY
02:36:53.443 RSL: RESULT = {"WebButton4":"RHY"}
02:37:03.340 CMD: WebButton5 TMR
02:37:03.344 RSL: RESULT = {"WebButton5":"TMR"}


Tasmota user interface with five control buttons.

Created Tasmota Rules for button toggles (here is an example for PWR and SPEED buttons:

Rule1
ON POWER1#STATE DO IRSend 0,+3500-3550+875-2650+880dC-885CdCdC-2645EfC-890CfEfCfCdEfCfCdCfCfCfCdCdCdCgEdCfC
  ENDON
ON POWER2#STATE DO IRSend 0,+3500-3550+855-2670CdC-910+850dFdCdCdFdCdCdCdFeC-905CeCdCeCeFeCeFeFeCgCeCdC ENDON


Now the Fan can be controlled via Web URL or MQTT using POWER1, POWER2, POWER3, POWER4, POWER5 commands.

About Author
jkwim wrote 186 posts with rating 25 , helped 4 times. Been with us since 2022 year.

Comments

freebsd 26 Dec 2023 11:53

Which fan? ceiling? [Read more]

jkwim 26 Dec 2023 20:17

Like this: https://obrazki.elektroda.pl/6691978100_1703618238_thumb.jpg [Read more]

ferbulous 26 Dec 2023 20:31

Hi, did you make the stand fan smart by adding one of those ir fan controller board? As for the heat gun, you might need to cover the components around the cb3s with heat resistance tapes (kapton) to... [Read more]

jkwim 26 Dec 2023 22:32

The fan already had a remote controller with 5 buttons. https://obrazki.elektroda.pl/5005018700_1703625644_thumb.jpg I created 5 buttons on Tasmota GUI. [Well, I actually went further. I did a custom... [Read more]

ferbulous 27 Dec 2023 01:33

@jkwim try smartir (hacs) Add a new fan config with the raw ir codes for each speed Like this one for example https://github.com/smartHomeHub/SmartIR/blob/master/codes/fan/1170.json Oh wait, you’re... [Read more]

jkwim 27 Dec 2023 08:57

The only issue is that this fan has just one Speed control button on the remote. When you press the button, the speed jumps to the next setting in a round robin fashion. What this means is that without... [Read more]

freebsd 27 Dec 2023 10:14

@jkwim Have you considered using a Tuya compatible universal fan controller? Maybe you could reprogram it and adapt it to your needs. https://obrazki.elektroda.pl/5549125300_1703668434_thumb.jpg [Read more]

jkwim 27 Dec 2023 16:08

The main reason that I did all this is that this particular remote requires longer codes which OpenBK does not support at the moment. I was told that adapting Tasmota's RAW codes is in the plan. So until... [Read more]

krzbor 29 Dec 2023 11:32

If someone wants to build such a device "from scratch", I recommend my solution Link [Read more]

ferbulous 01 Jan 2024 18:14

@krzbor So that one only has 1 LED How do you add more LED to cover wider angles? Do i need specific resistors? I tried diy following this instruction but transmitting just never worked for me ... [Read more]

slarti 07 Jan 2024 22:04

@freebsd Do you have this controller? Have you tried prying it open and see which SoC it uses? This is the only WiFi controller I've seen for BLDC fans. [Read more]

jkwim 08 Jan 2024 12:56

If you are building from scratch, there is another option. For Wemos D1 Mini there is a stackable IR Shield available https://obrazki.elektroda.pl/1790719300_1704714861_thumb.jpg https://obrazki.elektroda.pl/3155490600_1704714882_thumb.jpg... [Read more]

ferbulous 14 Jan 2024 07:09

@jkwim yes, i already have the d1 mini with the ir shield. Just curious how to add more ir transmitter properly on the esp01m board [Read more]

jkwim 14 Jan 2024 16:33

Above IR Shield board has 1 x transistor and 4 x resistors to drive 4 x LEDs. If you trace the paths probably it will be 4x Resistor+LED strings in parallel driven by the transistor. Something like... [Read more]

FAQ

TL;DR: One user achieved 100 % success converting a Tuya S06 IR blaster by swapping the CB3S for an ESP-12F and flashing Tasmota; “long codes now transmit perfectly” [Elektroda, jkwim, post #20876437] Why it matters: The swap unlocks RAW IR capture/replay, Alexa/Hue control and even WS2812 lighting on an inexpensive gadget.

Quick Facts

• Pin-compatibility: CB3S ↔ ESP-12F share VCC, GND, EN, RST, GPIO0-5 [Elektroda, jkwim, post #20876437] • Required pull-ups: 10 kΩ on EN and GPIO15 for stable boot [Elektroda, jkwim, post #20876437] • Longest verified RAW frame: 155 timings (≈78 bits) reproduced without loss [Elektroda, jkwim, post #20876437] • WS2812 add-on: 5 V/1 A powers ≈60 LEDs; data line on GPIO2 [Typical WS2812 datasheet] • ESP-12F module cost: approx. US $2.10 (Q1 2024) [AliExpress listing]

Which replacement Wi-Fi module fits the Tuya S06 IR blaster?

The ESP-12F drops straight in; its VCC, GND, EN, RST and main GPIO pins match the CB3S footprint perfectly [Elektroda, jkwim, post #20876437]

What extra components must be added after the swap?

Solder 10 kΩ pull-up resistors to EN and GPIO15. Without them the ESP boots into flashing mode or resets randomly [Elektroda, jkwim, post #20876437]

How do I capture and replay unknown IR codes in Tasmota?

  1. Enable SetOption58 1 to log RAW data. 2. Copy the RawData string from the console. 3. Send it back with the IRSend command; no conversion is needed [Elektroda, jkwim, post #20876437]

What is the maximum RAW IR length Tasmota handled in this project?

A 155-timing, 78-bit Panasonic frame (≈39 ms) played back reliably, proving long codes work [Elektroda, jkwim, post #20876437]

Can I shorten long RAW strings?

Yes. Trim symbols from the tail until you hit a “+” or “–”, then test playback. One user cut 35 % of the data without losing function [Elektroda, jkwim, post #20876437]

Why does the blue status LED stay off after re-soldering?

LED8 on GPIO4 needs resistor R13. If R13 is damaged, touching it shows faint light. Replace the resistor or resolder the trace [Elektroda, jkwim, post #20876437]

What happens if the reset circuitry (R3/C5) is lost?

The module still works, but hardware reset no longer functions; you must power-cycle the device to reboot [Elektroda, jkwim, post #20876437]

How can I add WS2812 LEDs to the same board?

Connect 5 V and GND to the USB input rails, route the data line to GPIO2, and cut a slot for the cable. Tasmota recognises the strip once GPIO2 is set to ‘WS2812’ [Elektroda, jkwim, post #20877567]

Does the Panasonic fan allow direct speed selection?

No. Its remote cycles speeds 1→2→3→1, so automation can only advance, not jump to a specific level [Elektroda, jkwim, post #20877567]

How do I drive multiple IR LEDs from a small ESP board?

Add an NPN transistor and four series resistors, then wire each LED in parallel from the collector. This mirrors the Wemos IR shield design [Elektroda, jkwim, post #20909130]

What’s an edge case where transmission fails?

If you omit the EN pull-up, the ESP may enter flash-download mode, causing a 0 % transmit success rate until the resistor is fitted [Elektroda, jkwim, post #20876437]
%}