-
-
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 devices using the new TLS SDK #279
Conversation
Added optional argument "--protocol" which specifies whether to use the old or new MQTT encoding Cleaned up a bit, adding some descriptive variable names and reducing code clutter
Attempted to integrate new API responses with old ones, based on et=1 param **Untested**
Print request details, method, headers, and decrypted payload Print response payload
Removed additional config.get payload, does not appear to be necessary and in some cases was causing problems Revert upgrade type to 0 since we are trying to update the firmware on the main ESP82xx, not an external MCU
Tidying up by removing some redundant endpoints and adding comments Now all but the activation endpoints use encryption when requested
…if schema is shorter than expected Added missing URLs in activation response Readded .updatestatus to avoid .upgrade from catching this endpoint Verify payload decryption is JSON
…ted for .active endpoints
…thon vs python3 for psk-frontend
Also this Kali setup, I can ssh to it like the raspbian ? |
@amiraness and yeah user pass are root:toor |
Tried new-api and official tuya-convert after new-api was merged with Gosund SP112 (identical to Blitzwolf SHP5) but did not succeed, logs attached: smarthack-mqtt.log After that I opened the Plugs and flashed them using an usb serial converter, I don't know if this is of any use to you but here is a backup of the original FW: |
Allright I have made some progress. I had tried to upgrade my tuya-convert 1 to tuya-convert 2 and I supposed that caused issues even though the install script worked flawlessly. I have flashed 3 of 4 teckin sp20's but one seems to be bricked pre flashing tasmota. It seems to have got stuck somewhere in the coming online process and I cant get it to continue. When I plug the device in sometimes I get a blue purple light for a moment but sometimes I get a slow blue flashing light. The button does nothing and it doesn't matter when I press it or how long I press it, it wont go into pairing mode. Not sure where it is stuck or how I can proceed. Can somebody help me out. I have tried to get it going in the app too but no dice (ps by the way my succesfull flashing sequence had the led solid blue then red and wait on that for awhile like a full page of dots with putty expanded to screen size and then the back up begins) |
Hi there, I tried with the Teckin SP21. It seemed to me the flashing part worked. But now the Plug is not responding or showing any (blue) lights at all... Here the output (sorry for the strange formatting): `====================================================== https://github.com/ct-Open-Source/tuya-convert ======================================================
|
@WolfgangHusen Please use triple backticks (
Furthermore, do you see a WiFi network |
@WolfgangHusen Triple ``` on lines of their own before and after the log messages should fix that formatting ;) Single ` is for short inline snippets. I'm curious though... when I did all my tuya devices, I skipped flash2, and went straight to flash3... was I just fortunate? |
@NicolaiVdS @kueblc installed kali on my pi 3b but that doesnt start the AP vtrust-flash it hangs on:
Fixed the iptables for me. |
Alright KALI didn't do it for me. But I finally got all my TUYA devices flashed! What I did was install rasbian light and start with |
@WolfgangHusen if the flashing was successful, which it looks like it was, the device will not show any lights or respond to anything because it's not configured yet. Look for a
@pfeerick you'll only need to run |
@kueblc no but managed to flash smart plugs, led strip just 1 light to go which is probably not ESP compatible. |
@bruvv did you managed to flash the action bulbs? |
@amiranees no the E27 isn't esp controlled according to the logs. |
@bruvv so al this time we assume we could but it wasn't possible? Damn :) |
Didn't take it apart yet ;) so cannot say for sure. But I did manage to flash the led led strip and the smart wall plugs tho |
thanks @kueblc: I must have been blind. I can confirm Teckin SP21 works fine. |
today I flashed a Gosund SP111. Went also fine (even though I had to restart the flashing process several times before the plug was identified). |
Ok as mentioned I have one sp20 plug that went through the flashing process but seems to be bricked. It produces no ssid that I can see. When I plug it in it flashes blue slowly for awhile then stops. It cannot be reached or paired in the tuya smart life. Can anybody help |
I was able to flash 4 Feit electric rgb bulbs from Costco the other day with this update. |
I have been trying to get tuya-convert running on my rPi 3b+ (with raspbian buster) to flash my Brilliant smart plugs. I originally hit a brick wall with an earlier version of the code as they seem to come with a firmware that expects https. Since I saw this version out I thought i'd try again. Everything seems to spin up correctly, and I can connect my phone to the vtrust-flash AP. However when I put the plug into pairing mode, it doesn't seem to want to connect. On further investigation I found the following lines in the smarthack-psk.log (repeated adnauseaum):
Any suggestions on where further I should look or what else I could try? Cheers. |
@sam-ward did you run |
Because I had been messing around with the image so much, I started with a freshly formatted SD card. All I had done was change the hostname, apt-get dist-upgrade, and apt-get install git. |
Is |
That did the trick thank you. The system default must have been changed somewhere along the line. After doing that I also had to rerun install_prereq, as the python2 was missing the sslpsk module. But I have it flashed successfully now. |
Flashed Blitzwolf BW-SHP6 using rpi3b+ on stretch without any issues! |
I've just flashed two SmartDGM PP-W162 plugs using master branch without issues. Tested on Debian testing/unstable. |
smarthack-udp.log I have previously successfully flashed numerous wall switches, smart plugs and bulbs from various manufacturers using Tuya firmware. This is the first one I haven't been able to flash. It came with the 1.0.5 firmware that I have read has caused problems for many users. I am using the latest Tuya-convert software (2.2.4 ) on a Pi 4B. Bulb flashes fast, then after 1st step stops flashing, but the second step never completes. It keeps retrying until it times out. Looking at the logs, what seemed most interesting was in smarthack-psk.log: Searching on that error I found a suggestion to install Does this just mean that I'm running up against the new firmware limits, or are there additional steps I can take? Here are the log files: smarthack-udp.log |
Huge thanks to @M4dmartig4n for his work reverse engineering and developing a PoC (#273). Would not be possible without him.
This PR incorporates @M4dmartig4n's PSK proxy which enables newer Tuya devices to communicate with
tuya-covert
over HTTPS/MQTTS, along with other changes to maintain compatibility with older firmware and improve compatibility with newer firmware.secKey
mq_pub_15
Please test and provide feedback here, thanks!