Support For Tuya Module WB2S / Beken BK7231t #12022 - GitHub

Skip to content Dismiss alert {{ message }} / Tasmota Public
  • Notifications You must be signed in to change notification settings
  • Fork 4.8k
  • Star 22.2k
  • Code
  • Issues 6
  • Pull requests 6
  • Discussions
  • Actions
  • Projects
  • Security
  • Insights
Additional navigation options Support for Tuya module WB2S / Beken BK7231t #12022 stefan123t started this conversation in Ideas Support for Tuya module WB2S / Beken BK7231t #12022 @stefan123t stefan123t May 5, 2021 · 7 comments · 9 replies Return to top Discussion options {{title}} Something went wrong. Quote reply

stefan123t May 5, 2021

Dear Tasmota Developers,

I just bought my first Smart Device (an LSC Power Plug) which does not work with Tuya-Convert, as it is built with a Tuya WB2S module on board, which is sporting the Beken BK7231t Chip.

I do not necessarily want to replace it with an ESP8266 module, but rather prefer to use the Tuya SDK or something similar to flash Tasmota on top.

Are there any chances the Tasmota codebase can/will be ported to the BK7231t hardware platform too ? What are the challenges or are there hardware constraints that prevent it ?

I have seen that Beken provide a set of AliOS, FreeRTOS or RT-Thread based OSes on their repository overview for the BK7231 chipsets with the most recent repository talking about setting up avr-gcc for it and OTA too: bk7231u_freertos_aws BK7231U Startup for AWS FreeRTOS

What would be the best approach to port Tasmota to the Beken 7231 platform in general and the WB2S using the BK7231t in specific ?

Kind regards, Stefan

9 You must be logged in to vote All reactions

Replies: 7 comments 9 replies

  • Oldest
  • Newest
  • Top
Comment options {{title}} Something went wrong. Quote reply edited {{editor}}'s edit {{actor}} deleted this content . {{editor}}'s edit Something went wrong.

sfromis May 5, 2021

Until Arduino Core gets broadly implemented on that platform, if ever, porting Tasmota would be a major rewrite, in addition to the tweaks still needed in that case.

1 You must be logged in to vote All reactions 0 replies Comment options {{title}} Something went wrong. Quote reply

ediiiz May 5, 2021

Also got some wifi switches which use these WB2S / BK7231T chips. Bought them 1-2 months ago. Does your device also loose wifi connection after some time and isnt resetable? Only a complete cut of power from the wallbox brings them back to life.

3 You must be logged in to vote All reactions 0 replies Comment options {{title}} Something went wrong. Quote reply edited {{editor}}'s edit {{actor}} deleted this content . {{editor}}'s edit Something went wrong.

Jason2866 May 5, 2021 Collaborator

Arduino support is not enough, even it is well done. Tasmota has grown and has become complex. Compiling with Arduino IDE is impossible. For compiling Tasmota PlatformIO is needed. Platformio setup is part of Tasmota. For a port of Tasmota to a other MCU there is support from PlatformIO needed to. In short, port will not happen. Only way is to replace the module with a esp82xx driven one Example https://blakadder.com/frankenstein-saturday-3/

3 You must be logged in to vote All reactions 3 replies @sfromis Comment options {{title}} Something went wrong. Quote reply

sfromis May 5, 2021

If Arduino Core supports the platform (a very big if), I expect that "someone" would work on also getting PlatformIO support created. Of course, that's well beyond even the plausible horizon.

All reactions @stefan123t Comment options {{title}} Something went wrong. Quote reply

stefan123t May 13, 2021 Author

Thanks so first things first: Arduino core files for a hardware abstraction layer needs to be implemented. I found this to be introductory useful https://atadiat.com/en/e-arduino-core-source-files-make-new-core-building-steps/?amp=1

All reactions @sfromis Comment options {{title}} Something went wrong. Quote reply

sfromis May 13, 2021

While Arduino Core (without a lot of missing features) would be needed, that would only be part of it. As Tasmota is using code from a lot of other libraries, these would also have to be available on the different platform. This could take a long time. The steps needed for each library may not be that big, but someone would have to prioritize spending time on each, which may not exactly get to the top of their task list.

Such would also depend a lot on the Beken BK7231T becoming popular among people into open source, or makers, which may not be to be expected. Active vendor support for open source would be a good step.. Of course, someone willing to spend a lot of time could also help getting things moving....

After all of this, the PlatformIO support mentioned by Jason would also be needed for Tasmota.

All reactions Comment options {{title}} Something went wrong. Quote reply edited {{editor}}'s edit {{actor}} deleted this content . {{editor}}'s edit Something went wrong.

Jason2866 May 14, 2021 Collaborator

Looking at last github commits of Beken. Silence... For commercial users everything needed is there. Arduino is for hobbiest. Thats not a interesting business case for Beken. No modules are easy free availabe. None of the Tasmota devs will look at any alternative CPU without a very well done Arduino port. Arduino ports are not the scope of Tasmota crew. In short, no Arduino for sure no Tasmota.

1 You must be logged in to vote All reactions 0 replies Comment options {{title}} Something went wrong. Quote reply

mkaatman Jan 26, 2022

https://www.elektroda.com/rtvforum/topic3850712-30.html

2 You must be logged in to vote All reactions 1 reply @stefan123t Comment options {{title}} Something went wrong. Quote reply

stefan123t Jan 26, 2022 Author

Thanks for noting the following two github repos, which seem to be actively developed:

  • https://github.com/btsimonh/tuya-iotos-embeded-sdk-wifi-ble-bk7231t
  • https://github.com/btsimonh/hid_download_py

I will probably get another SmartLink device to start hacking on. Thanks to @btsimonh for freeing these devices too.

All reactions Comment options {{title}} Something went wrong. Quote reply

btsimonh Jan 26, 2022

Just for info, keep an eye on the above elektroda thread for updates. The hid_download_py repo has been updated to be able to use SPI for flashing (had to do it because I bricked my dev device...). It implements UART flashing and SPI flashing in python - which is one step towards a cross platform PlatformIO implementaiton. p.kaczmarek2 has made great strides in terms of firmware, and I build something which did not include the Tuya library. p.kaczmarek2 has just published a repo, and that's likely to be the master rather than my SDK fork.

The initial target will be a 'Tasmota-like' firmware with simple webui, MQTT, and some configurability - but it won't BE tasmota for all the above mentioned reasons. One question would be licensing. Tas is firmly GPL, and as such if we were to directly 'borrow' code from Tas, we should be GPL as well? - I suspect that would be a good idea, as it would make porting Tas drivers far easier. I suspect development would be faster if we could use things like pre-formed HTTP strings, etc. without licensing implications. @arendst - Theo, could you comment on your feelings about the use of TAS IP in other OSS projects? And use of the Web interface 'look and feel'? I'd like to feel that this development/prototype could complement Tas, not compete with Tas...

1 You must be logged in to vote 👍 1 All reactions
  • 👍 1
2 replies @openshwprojects Comment options {{title}} Something went wrong. Quote reply

openshwprojects Jan 26, 2022

BK7231T update (English version coming soon): https://www.elektroda.pl/rtvforum/topic3866123.html#19842837 GPL is a viral license and borrowing code seems out of the question, but I don't think it's a problem. Most of the information (including TuyaMCU protocol documentation) is already freely available and implementing most of the stuff is not as hard at it seems. Futhermore, SDK differences would it make hard to copy/pase anyway. PS: My HTTP server/panel/configurator is also implemented in a specific, multiplatform way, because I am going to support XR809 devices with the same WWW panel codebase soon: https://www.elektroda.com/rtvforum/topic3806769.html

❤️ 2 All reactions
  • ❤️ 2
@arendst Comment options {{title}} Something went wrong. Quote reply edited {{editor}}'s edit {{actor}} deleted this content . {{editor}}'s edit Something went wrong.

arendst Jan 26, 2022 Maintainer

As tasmota is GPL-3.0 you're bound to it's rules.

All reactions Comment options {{title}} Something went wrong. Quote reply

bsoerni Apr 20, 2022

I have a question about LSC (TUYA) power outlets. Is there a howto (soldering is possible) to flash tasmota on these parts?

THANXS P.S.: I have the new versions without ota possibility

1 You must be logged in to vote All reactions 3 replies @btsimonh Comment options {{title}} Something went wrong. Quote reply

btsimonh Apr 20, 2022

if they are not ESP based, you have two options. 1/ transplant - if a module which has an ESP equivalent, you can transplant the whole module 2/ if the module is Beken, go with openbeken (see above). It's not Tasmota, but is in current development.

All reactions @Weltkugel Comment options {{title}} Something went wrong. Quote reply

Weltkugel May 20, 2022

LSC Smart POWER PLUG (Art. No. 2578685)

I changed the CB2S (BK7231N) with an ESP-01. This Pinout-configuration is working without solderin pullup-resistors.

(CB2S) P6 -> Relay -> (ESP-01) RX GPIO3 (CB2S) P7 -> Button -> (ESP-01) TX GPIO1 (CB2S) P8 -> LED1 -> (ESP-01) D3 GPIO0 (CB2S) P26 -> LED2 -> (ESP-01) D4 GPIO2

(CB2S) VCC -> VCC -> (ESP-01) VCC (CB2S) GND -> GND -> (ESP-01) GND (ESP-01) CHIP_EN -> bridged -> (ESP-01) RESET

The ESP-01 matches isolated behind the button without case modifactions. LSC

The BK7231N will now be used with @openshwprojects repository for another project.

👍 1 🎉 1 All reactions
  • 👍 1
  • 🎉 1
@Cutty6343 Comment options {{title}} Something went wrong. Quote reply

Cutty6343 Jun 23, 2023

HI,

May I ask what firmware you used, if you flashed the ESP-01?

I ordered some and I want to try in a similar Tuya plug.

TIA

All reactions Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Category 💡 Ideas Labels Tuya Related Type - Issue related to Tuya Devices 11 participants @stefan123t @mkaatman @btsimonh @arendst @Jason2866 @ediiiz @Weltkugel @sfromis @openshwprojects @bsoerni @Cutty6343 Heading Bold Italic Quote Code Link Numbered list Unordered list Task list Attach files Mention Reference Menu Select a reply Loading Create a new saved reply 👍 1 reacted with thumbs up emoji 👎 1 reacted with thumbs down emoji 😄 1 reacted with laugh emoji 🎉 1 reacted with hooray emoji 😕 1 reacted with confused emoji ❤️ 1 reacted with heart emoji 🚀 1 reacted with rocket emoji 👀 1 reacted with eyes emoji You can’t perform that action at this time.

Từ khóa » Bk7231t Chip