ct-Open-Source / tuya-convert

A collection of scripts to flash Tuya IoT devices to alternative firmwares
MIT License
4.54k stars 497 forks source link

Alternatives for those of us with RTL8710 ("WARNING: it appears this device does not use an ESP82xx and therefore cannot install ESP based firmware") #484

Open TRSx80 opened 4 years ago

TRSx80 commented 4 years ago

First off, thank you @kueblc for picking up the torch on this, and thanks to everyone who contributed in the past, for that is the only way for any of us to Have Nice Things(tm). :smile:

I have been reading for the last couple days, unfortunately it appears that I have purchased some modules that contain the RTL8710 as I am getting the dreaded error as posted in the title. Therefore I won't bother posting logs, unless you feel they are relevant (so far all the threads I read point to this being a fairly reliable indicator).

At this point, I suppose the only things left to do are:

  1. Warn others.
  2. Contribute to any development that may be going on with RTL8710. and/or
  3. Put these to use in my home in some other way.

And so, on to each of those in turn:

1. Warn others

I would love to do my part, however I could not even seem to figure out exactly the model number of the plugs I purchased from AliExpress, but here is the link: https://www.aliexpress.com/item/4000346047401.html Any advice here would be appreciated.

2. Contribute to any development that may be going on with RTL8710

I read in some post that you were not aware of any stable alternative, is this still the case? I have fair amount of equipment here and I am very willing to sacrifice one or more of my units for the greater good (as so many others have done before us).

3. Put these to use in my home in some other way

So they are not a complete loss (and in case I get any more modules like this in future) I think I would like to do something like keeping them on their own subnet, not connected to Internet (ie, "Network Of Things" (NOT) ) and using something like TuyaApi with the tuya-mqtt wrapper for openHAB. But that is more a statement than a question, and leaving it here to offer others in my same situation an alternative.

EDIT: It just occurred to me maybe convert this info into a Wiki topic. But I guess I will see what discussion is generated first.

meingraham commented 4 years ago

A few months ago I saw a blog or a YouTube video (I could not find it again) where someone was able to flash an RTL Wi-Fi chip. It was a PoC of replacing the firmware only. There was no actual firmware for it. So, flashing is possible. But I have not seen any projects for an actual RTL firmware replacement.

TRSx80 commented 4 years ago

Thanks @meingraham for the feedback.

In the meantime, I tried to leave a warning on the item page thru feedback, although it hasn't shown up yet.

kueblc commented 4 years ago

Regarding 2., here are some potential resources that might help start an alternative firmware project

https://github.com/TuyaInc/tysdk_for_rtl8710bn/ https://www.amebaiot.com/en/ameba-arduino-getting-started-rtl8710/

amoksworld commented 4 years ago

I received some "no-name" sockets from ebay and got the message (...no esp...), too. Inspired of https://github.com/ct-Open-Source/tuya-convert/issues/483 I deceided not to give up to soon, because I got some SSL-errors, too. So I immolated one and had a look inside:

ea917c81-273c-46c9-8ac5-d5ce6f601fe2

7febde64-7a40-4bfc-9d7c-e31914dcb6e7

Does anyone know if this is an ESP or not ?!?

If so, I can try to extract the Firmware for debugging ...

kueblc commented 4 years ago

That is a WinnerMicro W600, not an ESP unfortunately

EDIT: there is a wealth of information on that chip here: https://w600.chip.haus/

TRSx80 commented 4 years ago

@kueblc, Do you think it's worth it do disassemble one of mine and confirm what is inside?

kueblc commented 4 years ago

You might be able to determine the manufacturer without opening it by the MAC address of the device

TRSx80 commented 4 years ago

Good idea. According to The Wireshark OUI lookup tool:

Results 28:6D:CD BeijingW Beijing Winner Microelectronics Co.,Ltd.

Tollbringer commented 4 years ago

TRSx80 ! Seriously? Are you a proud user of the imfamous Coco/Tandy product? It was my 1st PC.

It will be very interesting to see progress on RTL chips! if I am not mistaken - they add the 5ghZ range?

Not sure how that would help unless a lot of data needs to be transmitted/received.

Tollbringer!

brumela commented 4 years ago

How about replacing (resolder) RTL8710 module with something like this ESP8285 or similar?

meingraham commented 4 years ago

@brumela

I saw a couple of users post that they were able to replace the RTL based Tuya module with the ESP based Tuya module and that worked. The Tuya modules are pin compatible. The RTL and ESP Wi-Fi SoC are quite different in this regard.

TRSx80 commented 4 years ago

So, I started disassembling my unknown module. I decided to put that in a separate thread, which you should find linked immediately above this post (feature of GitHub when you link from somewhere else).

Laces commented 3 years ago

Hi, I also bought a tuya light switch but unfortunately there is no esp8226 inside, but something else. I managed to upload MicroPython with W600 tool but I can't use the WIFI of the chip. Did you guys saw this chip before? I'm out of ideas... PXL_20210120_123429107

Godkezza commented 3 years ago

Has there been any movement on this? I currently have four Teckin (SP27) plugs which I believe to have RTL8710 chips inside (haven't been able to open them yet as I don't want to damage them). Tuya is really playing up for me as I can no longer integrate with IFTT or Home Assistant.

Lahvuun commented 3 years ago

There isn't any alternative firmware for RTL8710 to my knowledge. An alternative that worked for me was localtuya with homeassistant.

Laces commented 3 years ago

I have ordered and ESP-12 and will try to replace the original chip with the ESP-12.

b0rder commented 3 years ago

I have ordered and ESP-12 and will try to replace the original chip with the ESP-12.

I found some Tuya devices with Realtek modules successfully modified by replacing WBR3 Module (RTL8720) to ESP-07. They are pins compatible (at least power and tx/rx). For example, here: https://github.com/aoe1/WThermostatBeca/blob/master/MH-1823.md Hope you will success also, so please keep in touch.

Laces commented 3 years ago

I gave up. I have tried to replace the original chip with an ESP-12, but couldn't upload a firmware, then I used a D1 mini to upload the firmware to the ESP-12 and soldered to the board once again, but still doesn't work. I assume some resistors are needed for the ESP-12 to be able to start which are not present on the board, so it's time to give it up and order a proper board. PXL_20210430_070454355 PXL_20210430_071026181

nx10 commented 2 years ago

I just wanted to link this thread, where somebody was able to flash a tuya WB2S with a custom home assistant / mqtt compatible firmware:

https://www.elektroda.com/rtvforum/topic3806769.html (scroll all the way down)

(I don't know enough about embedded to judge if this is helpful for this project, but just in case)

Edit: New project for WB2S/BK7231 (and XR809): https://www.elektroda.com/rtvforum/topic3850712.html The author is looking for information/photos of devices with these chips.

openshwprojects commented 2 years ago

Thanks for mention, @nx10 I am already able to also flash BL602 and RTL8710. MQTT and Home Assistant already works on BL602 devices.

https://www.elektroda.com/rtvforum/viewtopic.php?p=19984465#19984465

kuba2k2 commented 2 years ago

Regarding the RTL8710 in particular, I'm working on a PlatformIO development platform with Arduino support, with ESP32 compatibility in mind: https://github.com/kuba2k2/platformio-libretuya I already have some basics and WiFi AP/Station/Client/Server working on RTL8710, using Arduino example sketches directly. In the nearest future, I'll be adding more functionality and libraries (like HTTP(S), I2C, SPI, MQTT, etc). The goal is to run ESPHome on this chipset - which will provide a full-fledged Home Assistant integration for these unsupported Tuya boards.

In the (further) future, I'm planning to also support other chipsets, like BK7231T with which I have a few bulbs.

I'd happily accept any contribution, like testing the project, bug reports, or even code contribution :smile:

mstaack commented 2 years ago

Regarding the RTL8710 in particular, I'm working on a PlatformIO development platform with Arduino support, with ESP32 compatibility in mind:

https://github.com/kuba2k2/platformio-libretuya

I already have some basics and WiFi AP/Station/Client/Server working on RTL8710, using Arduino example sketches directly. In the nearest future, I'll be adding more functionality and libraries (like HTTP(S), I2C, SPI, MQTT, etc).

The goal is to run ESPHome on this chipset - which will provide a full-fledged Home Assistant integration for these unsupported Tuya boards.

In the (further) future, I'm planning to also support other chipsets, like BK7231T with which I have a few bulbs.

I'd happily accept any contribution, like testing the project, bug reports, or even code contribution :smile:

Sweet!

openshwprojects commented 1 year ago

@Laces OpenBeken now works on W800 with OTA (updating firmware by WiFi, but for initial flashsing you need wires), OpenBeken will also soon support W600 as well.

jbalius commented 1 year ago

Can maybe someone help me to identify chip on this noname RGBCW XLD-W70-1.1 ? Chip just says TY5, tuya convert says it is not ESP8266xx.

PSX_20220904_220904 PSX_20220904_220751

kuba2k2 commented 1 year ago

@jbalius https://i.ibb.co/Fsm0NhH/photo-2021-01-09-12-05-17.jpg

(from https://www.reddit.com/r/tasmota/comments/kpsbwf/ty5_mcu_identification/)

EDIT: btw, I have a working ESPHome port for RTL8710BN (and BK7231 too) - https://docs.libretuya.ml/docs/projects/esphome/ You're all welcome to give it a try :smile:

openshwprojects commented 1 year ago

OpenBeken already supports BK7231T, BK7231N, W800, W801, T34, XR809, BL602 and soon W600 and RTL.

We also have an interactive online devices database with device templates that is accessible through OBK javascript web panel. Devices database is held online, so even if you have old binary you will always have all new templates, even with photos: image

vinibali commented 1 year ago

Hi @kuba2k2 @openshwprojects! Are you planning to work together or join your forces? You both are very agile in the non-ESP development.

amirmazmi commented 1 year ago

Just found this. In case no one has seen this, someone swapped out the RTL with an esp.

"STOP using Tuya! Transplant your ESP8266 100%" by digiblurDIY on youtube - https://youtu.be/d_HpkIiWC3Y

VWFeature commented 1 year ago

I am only an egg, but it seems some of these problems w the Realtek RTL8710BN and Tuya in general are solved w LibreTiny: My understanding is limited; hope this helps someone else!

https://docs.libretiny.eu/docs/status/supported/#tuya-inc https://docs.libretiny.eu/docs/projects/esphome/ https://docs.libretiny.eu/docs/status/supported/

smiell commented 5 months ago

Hello, recently I bought wifi socket plug, that using Smart Life app and Tuya cloud. It is look like this: IMG_8243

I tried to tuya-convert but, It won't find my wifi socket, so I am considering about what is inside... ESPxx chip or RTL. I want flash esphome into.

I also check by mac addres C4:82:E1:28:3B:7A and vendor is Tuya Smart Inc. I do not know nothing about this wifi plug....

I bought this form polish marketplace allegro: https://allegro.pl/oferta/gniazdko-wifi-smart-watomierz-timer-licznik-14195644657

In product descryption is nothing that can give me more information about what is inside....

Maybe somone know what is inside and it is posibility to flash tasmota or esphome (esphome will be exactly!) into ;)

kuba2k2 commented 5 months ago

That plug is most likely based on a Beken chipset. There are currently two firmware options - ESPHome (with LibreTiny) or OpenBeken (Tasmota-like firmware).

mrfy commented 1 month ago

Hello, recently I bought wifi socket plug, that using Smart Life app and Tuya cloud. It is look like this: IMG_8243

I tried to tuya-convert but, It won't find my wifi socket, so I am considering about what is inside... ESPxx chip or RTL. I want flash esphome into.

I also check by mac addres C4:82:E1:28:3B:7A and vendor is Tuya Smart Inc. I do not know nothing about this wifi plug....

I bought this form polish marketplace allegro: https://allegro.pl/oferta/gniazdko-wifi-smart-watomierz-timer-licznik-14195644657

In product descryption is nothing that can give me more information about what is inside....

Maybe somone know what is inside and it is posibility to flash tasmota or esphome (esphome will be exactly!) into ;)

Hi, did you manage to flash this socket? Is that beken? I have similar. Also Tuya (based on mac address).

smiell commented 1 month ago

Hello, recently I bought wifi socket plug, that using Smart Life app and Tuya cloud. It is look like this: IMG_8243 I tried to tuya-convert but, It won't find my wifi socket, so I am considering about what is inside... ESPxx chip or RTL. I want flash esphome into. I also check by mac addres C4:82:E1:28:3B:7A and vendor is Tuya Smart Inc. I do not know nothing about this wifi plug.... I bought this form polish marketplace allegro: https://allegro.pl/oferta/gniazdko-wifi-smart-watomierz-timer-licznik-14195644657 In product descryption is nothing that can give me more information about what is inside.... Maybe somone know what is inside and it is posibility to flash tasmota or esphome (esphome will be exactly!) into ;)

Hi, did you manage to flash this socket? Is that beken? I have similar. Also Tuya (based on mac address).

In February this year, I successfully flashed 5 sockets of this type to the free Open Beaken software, authored by a Pole. Here I leave you the link to the repository Github repo

You will even find videos on their channel on how to change the firmware in similar modules that contain the BK7231 chip.

The software provides support for MQTT so In my opinion that is enough for using with home assistant and etc.

They also have their own flasher prepared for this ;)

mrfy commented 1 month ago

Hello, recently I bought wifi socket plug, that using Smart Life app and Tuya cloud. It is look like this: IMG_8243 I tried to tuya-convert but, It won't find my wifi socket, so I am considering about what is inside... ESPxx chip or RTL. I want flash esphome into. I also check by mac addres C4:82:E1:28:3B:7A and vendor is Tuya Smart Inc. I do not know nothing about this wifi plug.... I bought this form polish marketplace allegro: https://allegro.pl/oferta/gniazdko-wifi-smart-watomierz-timer-licznik-14195644657 In product descryption is nothing that can give me more information about what is inside.... Maybe somone know what is inside and it is posibility to flash tasmota or esphome (esphome will be exactly!) into ;)

Hi, did you manage to flash this socket? Is that beken? I have similar. Also Tuya (based on mac address).

In February this year, I successfully flashed 5 sockets of this type to the free Open Beaken software, authored by a Pole. Here I leave you the link to the repository Github repo

You will even find videos on their channel on how to change the firmware in similar modules that contain the BK7231 chip.

The software provides support for MQTT so In my opinion that is enough for using with home assistant and etc.

They also have their own flasher prepared for this ;)

Thank you very much for answer :). I have few sockets so I think it is worth to flash them. Are you using simple USB UART converter, something like this? https://allegro.pl/oferta/konwerter-usb-uart-rs232-cp2102-3-3v-5v-kable-15478664604

smiell commented 1 month ago

Yeas, I used simply USB uart converter ;) That should work fine USB UART Converter