Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tam
{
"wfst_pin":"9",
"rf_study_feq":"0",
"owm":"1",
"rsthold":"3",
"wfst_lv":"1",
"netyc":"1",
"infrr":"8",
"netnc":"0",
"infre":"7",
"crc":"46",
"}":"false",
"fac_pin":"loqui5wq9whciaerbJ5Agw_di{abi",
"id":"null",
"swv":"2.0.8",
"bv":"40.00",
"pv":"2.2",
"lpv":"3.3",
"pk":"keym4vvjhx4sd9kk",
"firmk":"keym4vvjhx4sd9kk",
"cadv":"1.0.3",
"cdv":"1.0.0",
"dev_swv":"2.0.8",
"s_id":"null",
"dtp":"0",
"sync":"0",
"attr_num":"0",
"mst_tp_0":"0",
"mst_ver_0":"null",
"mst_tp_1":"0",
"mst_ver_1":"null",
"mst_tp_2":"0",
"mst_ver_2":"null",
"mst_tp_3":"0",
"mst_ver_3":"null }{nc_tp",
"ssid":"null",
"passwd":"null",
"md":"0",
"random":"0",
"wfb64":"1",
"stat":"0",
"token":"null",
"region":"null",
"reg_key":"null",
"dns_prio":"0 } )95Agw_wsm{nc_tp",
"psk_key":"NujFeKQ682eztk0jHOfpRt02ifO9LqwWDcllJ",
"auth_key":"6APzRTif0qKPtmgyUQy7nghfOKMc1FSD",
"ap_ssid":"SmartLife",
"ap_passwd":"null",
"country_code":"null",
"bt_mac":"null",
"bt_hid":"null",
"prod_test":"false",
"lckey":"null",
"h_url":"null",
"h_ip":"null",
"hs_url":"null",
"hs_ip":"null",
"hs_psk":"null",
"hs_psk_ip":"null",
"mqs_url":"null",
"mqs_ip":"null",
"mq_url":"null",
"mq_ip":"null",
"ai_sp":"null",
"ai_sp_ip":"null",
"mq_psk":"null",
"mq_psk_ip":"null",
"time_z":"null",
"s_time_z":"null",
"w{uuid":"49c07d75a7a784c7",
"wx_uuid":"null",
"dy_tls_m":"0",
"cloud_cap":"0",
"psk21_key":"null } )95Agw_wsm{nc_tp",
"ap_s{wfst_pin":"9"
}
Sorry, no meaningful pins data found. This device may be TuyaMCU or a custom one with no Tuya config data.
No module information found.
And the Tuya section starts, as usual, at 2023424
"wfst_pin":"9",
"infrr":"8",
"infre":"7",
p.kaczmarek2 wrote:
Very good information!
I wonder what is that:"wfst_pin":"9",
WFST? What could it stand for? Is the IR receiver (or IR sender) on P9? Or is it a standby?
Also..."infrr":"8", "infre":"7",
Are those pin numbers? P8 and P7? Maybe one is send and second receive?
jassuncao wrote:Hope this is useful.
merni99 wrote:I also have developer skills.
$ git clone https://github.com/olivluca/tuya_rf.git
$ cd cd tuya_rf
$ python -m venv ./venv
$ source venv/bin/activate$ pip install esphomeexternal_components:
- source:
type: local
path: components
components: [ tuya_rf ]
esphome:
name: tuya
bk72xx:
board: cbu
framework:
version: latest
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable logging
logger:
web_server:
version: 3
# Enable Home Assistant API
api:
reboot_timeout: 0s
ota:
platform: esphome
#status led
output:
platform: gpio
id: status
pin: P9
#reset button, it has an external pull-down in my board
binary_sensor:
- platform: gpio
id: reset_button
pin: P23
#rf transmitter and receiver
tuya_rf:
id: rf
receiver_disabled: true
dump: raw
#for the ir leds
remote_transmitter:
id: ir
pin: P7
carrier_duty_percent: 50%
#for the ir receiver
remote_receiver:
pin:
number: P8
inverted: true
button:
- platform: template
name: turn off receiver
web_server:
sorting_weight: 1010
on_press:
- tuya_rf.turn_off_receiver:
- platform: template
name: turn on receiver
web_server:
sorting_weight: 1020
on_press:
- tuya_rf.turn_on_receiver:
- platform: template
name: Right up
web_server:
sorting_weight: 10
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret RightUp
- output.turn_off: status
- platform: template
name: Right Down
web_server:
sorting_weight: 20
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret RightDown
- output.turn_off: status
- platform: template
name: Right Stop
web_server:
sorting_weight: 30
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret RightStop
- output.turn_off: status
- platform: template
name: Right up
web_server:
sorting_weight: 10
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret RightUp
- output.turn_off: status
- platform: template
name: Right Down
web_server:
sorting_weight: 20
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret RightDown
- output.turn_off: status
- platform: template
name: Right Stop
web_server:
sorting_weight: 30
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret RightStop
- output.turn_off: status
- platform: template
name: Left up
web_server:
sorting_weight: 40
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret LeftUp
- output.turn_off: status
- platform: template
name: Left Down
web_server:
sorting_weight: 50
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret LeftDown
- output.turn_off: status
- platform: template
name: Left Stop
web_server:
sorting_weight: 60
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret LeftStop
- output.turn_off: status
- platform: template
name: Middle up
web_server:
sorting_weight: 70
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret MiddleUp
- output.turn_off: status
- platform: template
name: Middle Down
web_server:
sorting_weight: 80
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret MiddleDown
- output.turn_off: status
- platform: template
name: Middle Stop
web_server:
sorting_weight: 90
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret MiddleStop
- output.turn_off: status
- platform: template
name: All up
web_server:
sorting_weight: 100
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret AllUp
- output.turn_off: status
- platform: template
name: All Down
web_server:
sorting_weight: 110
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret AllDown
- output.turn_off: status
- platform: template
name: All Stop
web_server:
sorting_weight: 120
on_press:
- output.turn_on: status
- remote_transmitter.transmit_raw:
transmitter_id: rf
repeat:
times: 3
wait_time: 0s
code: !secret AllStop
- output.turn_off: status
esphome compile tuya.yaml.esphome/build/tuya/.pioenvs/tuya/esphome_2024.12.4_cbu_bk7231n_lt1.8.0.uf2
# Your Wi-Fi SSID and password
wifi_ssid: "wifiSSID"
wifi_password: "WIFIPassword"
RightUp: [8717, -4779, 1621, -344, 752, -754, 368, -762, 362, -344, 781, -375, 721, -375, 746, -750, 375, -718, 406, -379, 749, -715, 375, -375, 750, -343, 784, -719, 371, -750, 375, -750, 374, -753, 375, -715, 406, -375,
750, -718, 410, -343, 747,-749, 378, -747, 343, -375, 754, -749, 372, -375, 750, -375, 719, -381, 744, -375, 750, -344, 781, -344, 754, -375, 715, -785, 344, -403, 719, -375, 753, -372, 750, -719, 406, -719, 378, -750, 341, -781, 344, -375]
RightStop: [8322, -4813, 1564, -385, 741, -750, 376, -719, 407, -375, 723, -372, 750, -344, 782, -751, 344, -754, 372, -375, 720, -750, 376, -375, 753, -373, 750, -720, 375, -750, 376, -754,
372, -719, 406, -720, 375, -375, 751, -754, 419, -297, 750,-751, 375, -751, 382, -368, 720, -750, 376, -375, 751, -377, 717, -376, 750, -375, 751, -375, 726, -400, 719, -376, 750, -720, 406, -344, 754, -747, 345, -406, 719, -751, 377, -380, 744, -751, 375, -344, 751, -750]
RightDown: [8726, -4777, 1622, -344, 788, -712, 375, -750, 344, -406, 719, -410, 716, -406, 723, -746, 375, -750, 378, -341, 750, -781, 344, -375, 750, -385, 744, -715, 375, -750, 375, -750,
391, -738, 340, -782, 344, -406, 719, -753, 372, -375, 750,-750, 375, -721, 408, -346, 744, -750, 375, -376, 750, -375, 724, -401, 741, -356, 750, -372, 757, -368, 719, -375, 750, -754, 371, -375, 751, -375, 750, -722, 403, -719, 406, -719, 375, -750, 344, -410, 715, -407]
LeftUp: [8724, -4784, 1590, -373, 750, -719, 406, -719, 375, -375, 754, -371, 719, -375, 751, -750, 375, -753, 372, -344, 781, -719, 375, -375, 753, -372, 719, -781, 344, -750, 375, -754,
371, -751, 375, -718, 407, -343, 750, -750, 375, -375, 719,-750, 375, -725, 401, -375, 750, -719, 406, -344, 750, -378, 747, -375, 719, -375, 750, -375, 754, -371, 751, -718, 375, -376, 750, -377, 748, -344, 750, -375, 750, -750, 378, -716, 406, -719, 375, -719, 406, -344]
LeftStop: [8345, -4781, 1590, -406, 718, -750, 375, -722, 403, -344, 750, -374, 750, -375, 724, -776, 344, -750, 374, -375, 750, -753, 372, -375, 750, -343, 750, -758, 370, -747, 344, -781, 343, -750, 375, -753, 372, -375, 750, -718, 375, -375, 751,
-752, 372, -750, 344, -374, 750, -753, 372, -375, 750, -374, 719, -406, 730, -367, 747, -374, 750, -344, 750, -750, 378, -371, 750, -375, 719, -750, 375, -375, 753, -746, 375, -344, 781, -719, 378, -372, 750, -749]
LeftDown: [8689, -4780, 1563, -402, 719, -781, 344, -750, 375, -377, 747, -375, 719, -375, 781, -719, 378, -747, 343, -375, 767, -733, 375, -375, 756, -369, 750, -718, 375, -750, 378, -750, 372, -718, 375, -750, 375, -375, 753, -747, 343, -406, 719,
-719, 406, -722, 403, -344, 781, -718, 406, -344, 753, -372, 718, -407, 718, -375, 750, -376, 754, -370, 718, -750, 375, -375, 750, -375, 750, -344, 750, -749, 375, -753, 372, -718, 375, -750, 375, -375, 750, -347]
MiddleUp: [8754, -4748, 1588, -371, 750, -718, 406, -719, 375, -374, 753, -372, 718, -406, 719, -749, 375, -719, 406, -375, 749, -719, 406, -343, 753, -372, 750, -749, 344,
-781, 343, -753, 372, -750, 374, -719, 406, -375, 722, -746, 375, -343, 781,-719, 406, -722, 371, -375, 750, -749, 375, -375, 752, -372, 718, -375, 750, -374, 750, -344, 784, -340, 750, -749, 375, -750, 347, -378, 743, -375, 749, -375, 750, -718, 406, -719, 406, -718, 375, -750, 374, -347]
MiddleStop: [8340, -4783, 1627, -337, 750, -749, 375, -753, 340, -406, 734, -360, 749, -375, 753, -715, 406, -719, 406, -343, 750, -753, 371, -344, 781, -343, 750, -781, 343,
-750, 375, -718, 406, -719, 406, -718, 375, -375, 749, -750, 375, -343, 781,-722, 372, -749, 375, -375, 750, -718, 410, -371, 719, -406, 718, -375, 750, -343, 781, -344, 749, -375, 719, -780, 344, -753, 372, -374, 750, -718, 407, -374, 753, -715, 406, -344, 750, -749, 375, -347, 746, -750]
MiddleDown: [8751, -4751, 1590, -407, 725, -744, 375, -750, 375, -344, 750, -378, 747, -375, 750, -719, 407, -718, 391, -360, 750, -719, 406, -375, 719, -375, 750, -750, 344,
-750, 375, -750, 379, -746, 375, -719, 407, -343, 782, -722, 372, -375, 719,-781, 344, -750, 375, -410, 715, -751, 375, -343, 782, -347, 755, -367, 719, -428, 697, -406, 719, -379, 746, -751, 375, -750, 344, -375, 753, -372, 719, -781, 344, -781, 344, -723, 403, -718, 407, -344, 781, -344]
AllUp: [8714, -4779, 1590, -375, 725, -774, 344, -749, 375, -375, 749, -379, 746, -343, 781, -719, 375, -749, 379, -371, 750, -749, 375, -375, 718, -406, 719, -749, 375,
-750, 375, -749, 375, -718, 375, -750, 398, -352, 749, -757, 368, -375, 721,-750, 371, -750, 408, -345, 746, -750, 375, -343, 750, -375, 753, -375, 746, -375, 749, -375, 719, -406, 718, -375, 749, -375, 750, -375, 753, -371, 719, -374, 719, -781, 343, -785, 371, -719, 374, -750, 375, -375]
AllStop: [8348, -4747, 1632, -368, 751, -718, 407, -719, 375, -375, 718, -376, 750, -406, 719, -719, 407, -718, 406, -344, 781, -719, 375, -344, 753, -372, 750, -750, 375,
-719, 407, -753, 372, -719, 406, -719, 375, -375, 725, -775, 344, -406, 719,-750, 375, -760, 369, -371, 757, -712, 406, -344, 751, -374, 750, -375, 718, -375, 750, -375, 756, -368, 750, -375, 749, -344, 781, -343, 750, -750, 374, -375, 719, -781, 343, -375, 750, -718, 406, -375, 750, -721]
AllDown: [8698, -4773, 1585, -374, 750, -750, 350, -743, 375, -374, 750, -375, 718, -406, 719, -750, 374, -750, 406, -312, 782, -749, 375, -343, 750, -375, 750, -752, 372,
-718, 407, -718, 406, -718, 419, -709, 372, -375, 749, -750, 344, -406, 721,-747, 374, -750, 375, -375, 749, -722, 403, -375, 749, -344, 750, -375, 758, -366, 719, -406, 718, -406, 718, -395, 733, -372, 749, -375, 750, -343, 750, -750, 375, -749, 375, -750, 343, -785, 340, -406, 718, -406]
OpenBeken is a custom, Tasmota-like firmware for non-ESP chips. Currently, this part of the guide applies to BK7231 only, as that's the only chip supported both by LT and OBK.
OBK is compatible with standard Beken OTA packages, but the web panel does a filename check to prevent chip type mismatch. Grab the image_bk7231t_app.ota.rbl file from build directory (note: without "UG" in the name!), rename it to something like OpenBK7231T_esphome.rbl (change T to N depending on the chip type), and drop it on the OTA panel.
tuya_rf:
id: rf
receiver_disabled: true
dump: raw
tx_pin:
number: P20
inverted: true
rx_pin:
number: P22
inverted: trueQuote:The rf signal is quite noisy, so I do some filtering to receive the codes:
The starting pulse must be longer than 6ms but shorter than 10ms.
any time I see a starting pulse I discard the data and start again (usually the same code is sent more than once).
the pauses cannot last more than 6ms, if I see a pause longer than that I discard the data and start again.
the end pulse is around 90ms, I look for a pulse of at least 50ms to detect the end of the data.
if the end pulse never arrives, when the receiving buffer is about to overflow I discard the data and start again.
TL;DR: For S11-SH4-CBU-V2.4, 3 core pins matter: P7 IR emit, P8 IR receive, P9 WiFi status; "IR works like a charm" with ESPHome, while RF433 needs tuya_rf or further OpenBeken driver work. This FAQ helps Avatto/Smatrul users flash, map pins, and replay IR/RF codes. [#21618884] Why it matters: The S11 can become a local Home Assistant IR/RF bridge, but only if firmware, pins, and raw RF timing are handled correctly.
| Alternative | IR support | RF433 support | Typical use in thread |
|---|---|---|---|
| OpenBeken | Works for IR scripting | RF driver still requested | Existing BK7231 firmware and web app |
| ESPHome + olivluca/tuya_rf | Works on P7/P8 | Learn/replay raw RF | Home Assistant YAML workflow |
| ESPHome + CC1101 helper | External decoder | Cleaner protocol analysis | Debugging Dooya-style RF |
Key insight: Use P7/P8/P9 as the stable base mapping, then choose firmware by RF needs. ESPHome already shows working RF workflows, while OpenBeken still needs a dedicated RF driver port.
Mini pin table:
| Function | Pin |
|---|---|
| WiFi status LED | P9 |
| Infrared receive | P8 |
| Infrared emit | P7 |
remote_transmitter on P7 with 50% carrier duty. Set remote_receiver on P8 with inverted: true. For RF, add tuya_rf and use raw dumps or protocol dumps. [#21618884]wfst_pin means WiFi status, infrr means infrared receive, and infre means infrared emit. The mapped values are P9, P8, and P7. "wfst_pin" is a Tuya configuration field that assigns the WiFi status indicator GPIO, letting firmware blink or hold the LED during connection state changes. One contributor used WiFiLED blinking during connection and steady on after connection. [#20636079]bk72xx and board: cbu. 2. Find image_bk7231n_app.ota.rbl, without UG in the filename. 3. Rename it to OpenBK7231N_esphome.rbl and upload it in OpenBeken OTA. This solved a failed USB-to-TTL serial flash on an already OpenBeken-flashed Avatto S11. [#21429534]olivluca/tuya_rf. [#21407223]bk72xx board: cbu, enabling firmware builds for BK7231-based Tuya devices. The working YAML sets bk72xx, board: cbu, and framework version: latest. [#21412540]src/driver/drv_main.c for the driver table. Then create a file such as drv_rf.c. Use an existing driver, such as drv_httpButtons.c, as the structure example. The maintainer stated help was welcome because no RF device was available locally. [#20940597]RFSend and the xdrv_17_rcswitch.ino code path. The OpenBeken maintainer pointed to RFSend search results and line-level rcswitch code. For receive-only work, migrate the RF receiver path instead. The thread separates sending and receiving because each needs different driver behavior and command handling. [#21040232]olivluca/tuya_rf ESPHome external component, enable raw dumping, then replay captured arrays. 1. Add external_components from the local repo or GitHub URL. 2. Configure tuya_rf with id: rf, receiver_disabled, and dump: raw. 3. Use remote_transmitter.transmit_raw with transmitter_id: rf, repeat count, and captured code. One example used repeat 3 for Dooya commands. [#21412540]tx_pin P20 and rx_pin P22 were set inverted. [#21441995]0 represented as 900, -300. Rolling-code devices are excluded. [#21432262]tuya_rf, P7 IR transmit, P8 IR receive, and Home Assistant API support. OpenBeken remains useful when it is already installed, especially for OTA migration to ESPHome. [#21429534]remote_transmitter to P7 and remote_receiver to P8 with inversion enabled. A working S11 YAML used carrier_duty_percent: 50% for the IR LEDs. Another example used dump: all and tested LG TV power with transmit_lg data 0x20DF10EF, 32 bits. The thread also shows NEC testing with address 0xFA05 and command 0xEB14. [#21618884]