-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for the new sdk #273
Comments
Hey, are you saying this works for new firmware that was previously not compatible? |
Yes. |
I hope it will work for the latest tuya devices, bought some door sensors and stuff that would be handy to flash like this. |
I just tried this on a Nedis WIFIP310FWT that couldn't be flashed using the old method. I can confirm that this worked very well |
Amazing job well done! Care to give a brief overview of how you figured it out? Just to satisfy my curiosity, I'm really interested! Thanks! |
I'll be checking this out tonight got 4 gosunds with the new firmware on them I'll report back if they work. |
So just use the build from CT? And import the recent files from you? |
@M4dmartig4n Go ahead and open a PR and we can work together to get this merged. Will require a few small tweaks to be compatible with #226. You can reach me directly at my gmail of the same name. |
@kueblc I will be afk for a moment, but will do that. Apart from my coding style ;) , we need to figure a way to identify devices with previous/new sdk in order to provide them the right answers (for example, mqtt messages, and upgrade answers are quite different). Maybe there is a parameter in the request, I dunno. A "hack" would be to check the source ip in fake_registration server, since new sdk requests are proxyfied through psk-frontend and thus come from 127.0.0.1. |
@EverythingSmartHome I will probably write a small blog post about it in the near future |
Do you have Telegram or Signal?
Sure, check for
This would work fine too, this entire project is a "hack" 😛 |
Thanks for the efforts. I was unable to install as the pre-req libssl-dev seemed to be missing/absent. I tried a Kali-linux environment, along with my own Proxmox/Debian LXC container script previously working well for Tuya 1.0. I fixed the error, and was able to proceed. I attempted conversion with Teckin Sp20 outlet with no success. I can see it finds the device and talks to it, and I would say it engages stage one - but never actually backs up or proceeds. It does the leave the device crippled/bricked and unable to proceed. (that is ok it is a test unit and has serial connections ready to re-flash back to stock). I am able to re-flash back to stock firmware which DOES work, and I am able to add it to the APP and it detects v1.0.3 and updates it, blocking Tuya Convert v1 -- as expected. I have another AliExpress plug that doesn't have a firmware update for it, and therefor I can't test with. [-=SrZ=-] |
@SirRedZ can you elaborate on what you mean by "bricked"? You can't put it back into EZ config mode after attempting the process? |
Another missing prerequisite is |
Correct. The module's behavior is modified, and button access is unresponsive. Unplugging and plugging in flashes the light once, but that is it. I recognize this behavior after the bootloader has been applied??? mid-state? Only serial flashing allows me to recover. |
Since you already have it connected to serial, it would be great to get a backup of the firmware in this state. Did you back it up before reflashing? |
Along with the missing libssl-dev pre-req which was already mentioned I noticed another issue with my Smart Connect bulbs. After connecting it is posting to the following URL a couple of times (and failing): POST /d.json?a=tuya.device.config.get&et=1&other={"token":"00000000","region":"US"}&t=14&uuid=some UUID&v=4.1&sign=some hex string It seems to be asking for some sort of configuration, but I'm not sure which |
i'm trying for an hour. i got the smart bulb in config mode. tuya convert is searching. but no luck. do i need to start pairing this device thrue my phone?if yes wich app do you use? |
You only need to connect to the WiFi with your phone, no apps or anything else If it doesn’t switch to continuous and keeps on flashing, repeat the process. It took me 10 times for it to finally to connect |
yes flashing 2 times a sec. i guess i found a problem. |
...and then boom, it worked. Saved me from having to try to solder pins that are about 1/8 away from a tall plastic switch soldered to the pcb. THANK YOU!!! |
still no luck, thanks anyhow. i will keep trying and post my findings. |
Hi All, URI:/gw.json?a=tuya.device.upgrade.silent.get&gwId=63120466c44f33863260&t=26&v=4.1&sign=31d615cf31fbc6a63e0031d0685a06c7 URI:/gw.json?a=s.gw.dev.timer.count&gwId=63120466c44f33863260&t=167&sign=28d676260773c01b4dbfba9d8a94d556 The last line keeps repeating |
This should be resolved when we merge this with #226 |
Colin, do you still want a copy of firmware in the 'frozen state' ? |
I thought after reading the comments above I should check my logs.... Maybe it was working and crashed for me?> URI:/gw.json?a=tuya.device.upgrade.silent.get&gwId=88020554cc50e3cf1954&t=7&v=4.1&sign=fab950f88c43806fa17e9bcca40bdf34 |
@SirRedZ Yes, I can use the backup to hopefully debug what went wrong. Doesn't look like the server crashed, it's a |
Worked with the changes. Thanks guys for all the great work. |
teckin_sp20_afterfw_convertattempt.zip Here is the FW in "bricked" state. Here are the exact steps.
Sonoff-xxx access point visible. IT WORKS. I had to jump through hoops - it works. This was the device I originally used to report the failure- block also! GREAT WORK!. [-=SrZ=-] |
My current conclusion is brute force (unplug/plugin/restart tuya convert process, etc...) gets it to go eventually. Lightbulbs are a No-go after trying 4-5 different bulbs Zero response. I did my test module 4 times andDigiBlurDIY did 2 or 3 different devices and all eventually converted. There were all previously confirmed BLOCKED in the past. All were added to the app to make sure they had latest firmware, and then removed from the app to begin the conversion. Thanks everyone- I hope this helps! [-=SrZ=-] |
@Photo64 attach your logs. I will also mention that using apple devices as the other device seemed problematic at times. Due in part to how they share the SSID info, how they will disco when they sleep and how they dislike not having internet. |
The process appears to start correctly, the vtrust-flash on my tablet shows connected however after putting the bulb into flash mode and it not connecting after a few minutes the vtrust-flash on my tablet shows "not connected" and then goes to a "Wifi Connection Failure" |
@Photo64 I can also confirm having issues with Android devices but iOS works fine. |
What are they expecting in the GPIOs column? |
Tried using an Amazon fireHD7 tablet and my MotoG6 Android phone. Had no issues with the FireHD tablet the other day when converting the smart plug |
Here are the log files |
@danmed you can leave it blank, just fill out what you know. The GPIO column is for mapping the pins to their functions, see the other compatible devices wiki for examples. |
@Photo64 your logs indicate that the device did connect and attempt to install the intermediate firmware. It is unclear if it completed before you halted the process, you can try to resume by plugging the device back in while |
How would I know if it's resuming or completed? It never goes beyond just seeing the dots and then it seems the access point loses wifi connection. |
It would stop printing dots. You shouldn't be losing WiFi connection, but there will be no internet access through the connection, do not confuse the two. Also note that you do not need to put the device back into pairing mode nor connect a third device, since this is only required to start the process, not resume it. |
Well after several attempts I finally was able to flash both bulbs. The one thing I noticed and I have no idea if this impacts it in any way but I couldn't get them to flash until on both bulbs I got the slow blinking first and the smart app access point to show on my tablet. Once that appeared I turned on/off the bulb to get the fast blinking and then it decided to begin the flashing. Could have been a coincident but it only worked on both when that happened. |
Glad to hear it @Photo64 |
Did you succeed flashing the LSC led strip via OTA? I managed to flash the LSC smart bulbs, but with the led strip no luck.. |
@
I didn't try it yet, I'll think i try tomorrow. |
I flashed the filament ones (both e14 and e27) just with the 'new' OTA method. I also have a multi color led e14, but didnt try to flash that one. There isn't a template available, and I dont have experience creating one, but maybe I will try tomorrow . |
@luchtgitaar And also, did you chose for /flash3? |
@TimelessNL I see you did great work on the LSC bulbs. Have you tried the ceiling light one? Still need to do a first attempt at any bulb, but disassembly of this one couldn't be easier. 3 screws, some removing of covers and you've got a WR3L on a breakout board with headers 😮 |
@luchtgitaar I am afraid you cant flash the RGB ones. |
@Beanow unfortunately the WR3L is based on the RTL8710BN and thus can't be flashed with ESP82xx firmware like Tasmota. I am not aware of any custom firmware built for the RTL8710BN at this time, though I would be thrilled to learn otherwise. |
Bummer. But this may be a fun one to test with. And looks like there's a fair bit of info on https://github.com/TuyaInc/tysdk_for_rtl8710bn/blob/master/wifisdk_for_rtk_871x/component/soc/realtek/8711b/misc/rtl8710b_ota.c |
@Beanow yeah I also bought that ceiling light myself. I had to do allot of rework on mine since the overall production quality of these is very low... couple of dry solder joints, flux remains and solder balls floating around. In the process I did replace the RTL chip with an ESP-12. They are pin compatible after all. So running Tasmota after replacing the SoC was quite easy.
@luchtgitaar It isn't just a 'template' that needs to be worked on. the RGBW E14/GU10's use a rather unknown 5channel i2c chip that controls the LED power. So you can't just pwm your way out of this one😄. There is a proof of concept in Tasmota-dev if you're interested. |
That's one way to do it. Guessing the one TYWE2S/TYWE3S are the ones you can use right? Like the one in the motion sensor. |
I suppose so yes. But it don't have to be a tuya module though. |
It's funny you linked this file in particular @Beanow, I was just looking into it myself 😛 |
@kueblc and @Beanow did you see this github? https://github.com/8devices/platformio-realtek-rtl8710b |
Well I was thinking about this in terms of easily removing
It is the file that said OTA so yeah I would look at that first :P @Xenomes I hadn't seen that. But looks like PlatformIO is some kind of abstraction layer to make the development process more unified. It isn't a ready-to-go firmware, it's tools to build firmware. Frankly though unless we have a financial sponsor I won't be able to pick up a project to build the firmware from scratch. A few too many projects I'm already maintaining 😅 |
Successfully flashed 4x Teckin SP22. So I ve ordered again the same modules from Amazon. Maybe all have an upgraded rom? |
@angomania couple things, the latest can be found at #279, the fork isn't being maintained. And unfortunately your new Teckins are not using an ESP82xx so you won't be able to use Tasmota or other ESP based firmware, OTA or otherwise. |
Please do all testing and reporting against #279 so we can move forward with merge. Locking this issue so users see this and do not accidentally install an older unmaintained version. |
Hi all,
I did succeed in flashing a device with the new tuya sdk with tuya-convert.
Changes needed are in my own fork, for reference
https://github.com/M4dmartig4n/tuya-convert
It is not ready for a pull-request, since it drops support for older sdk atm.
Enjoy !
The text was updated successfully, but these errors were encountered: