-
Notifications
You must be signed in to change notification settings - Fork 8
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
did not work on Gosung SP1 v2.4 #3
Comments
This is interesting. The plug is responding, but it is sending back a binary string. Either the encryption is failing or the plug is not compatible. The payload we get back from pytuya should look something like this:
To verify that it is not the config, can you try running the script manually (not docker) and on a MacOS or Linux host? |
I updated the |
@jasonacox
Likewise, powermonitor returns the following: Under the update firmware section of Tuya I see that these Gosund SP1 devices have: wheras my other devices have : Perhaps there have been some changes with these newer models? |
@jasonacox I don't know if this is of any help since I don't know exactly what your library does to extend Tuyapi but it seems that the ports and encryption on newer firmware is different to earlier firmware versions: codetheweb/tuyapi#175 I had a look on wireshark and it does appear that these 2 devices on firmware 1.0.6 do do some outbound communication on port 6667. Not sure if that is of any help though. |
I grabbed a copy of your latest files and now get a message about there being no handlers for tuyapi. And after a bit more looking it seems that these SP1 devices require the key to be input into your script inorder to connect/decode the connection. My other devices didn't need this key. I'm hoping to find the keys and have this working. I'll report back once I've got some news either way. |
Hmm, even with the keys I'm getting:
Any suggestions? |
I'm now able to get some random looking output (similar to @corgan222) before the "result":error bit. Every line of the output starts with 3.3 which makes me think that these Gosund devices are usin protocol 3.3 as mentioned here: https://github.com/codetheweb/tuyapi
Any idea what could be done to test this with powermonitor? Thanks. |
Ok, so this device uses the v3.3 protocol. It needs the device key to connect with the device, and then to decode the encrypted output. However, this library doesn't have a way to handle the v3.3 protocol -although pytuya can handle it. I've rewritten some big chunks of powermonitor and added that to my forked version. I'll submit a pull request in the next day or two. In the meantime @corgan2222 feel free to use my fork: https://github.com/codeclinic/powermonitor |
This is great! Yes, please add a contributor note for yourself in README and submit a PR. Thanks @corgan2222 |
@corgan2222 If possible could you test my fork with your devices. It's working great with my Gosund SP-1's but it'd be good to know it works for others too. Thanks. |
@jasonacox I've sent the pull request with my changes. Let us know how you get on @corgan2222 |
hey and thanxs for the efforts! Its been some time and since then i flashed my gosund the oldscool way. Actually i dont have a fresh gosund atm, but i have an uncracked sonoff pow r2. Should this work too? https://www.amazon.de/Verbesserte-Pow-Verbrauch-Fernbedienung-Messschalter-Kompatibel/dp/B07C5P7NPQ |
As far as I am aware the underlying PyTuya is purely for Tuya/Smartlife/Jinvoo devices |
after the first run with docker i got this messages:
9b5ca1b7ed17: Pull complete Digest: sha256:a9c34fdb540a2d042197028cf3886123b7cc5e517359f4f6844b7275d78e122c Status: Downloaded newer image for jasonacox/powermonitor:latest ERROR:pytuya:Unexpected status() payload=b'3.3\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x01\x19\xf9\xa2\x17%\xe6\xfek\xe8v-\x11\x86\x04@\xb5K\x866\x19\x97Oce\x8b+x\x88\xd6\x187\x8cI\xa7\x15(\x86/\xd0L\xc54\xf8\x92N+#z\xdf2V\xfea\xb4\x82n\x9f"\xea%\xc4\xd6\x89\x1din8\xfb\x8d\x0b\x92G\x93\xb3\xadq\x1f\xa3\x11l' ERROR:pytuya:Unexpected status() payload=b'3.3\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x01\x19\xf9\xa2\x17%\xe6\xfek\xe8v-\x11\x86\x04@\xb5K\x866\x19\x97Oce\x8b+x\x88\xd6\x187\x8c>(\x97\xf7\xbb1\x9d\x81\xb8\x96\xafb\xc7[\xec\xca3\x1a\xd2\xadN\xbe\xbf\x82\xf5\xfc-\xc4\x1a\xa1\xc1\x1fin8\xfb\x8d\x0b\x92G\x93\xb3\xadq\x1f\xa3\x11l' Polling Device 60020372840d8e6fa9d2 at 192.168.2.38 Dictionary b'3.3\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x01\x19\xf9\xa2\x17%\xe6\xfek\xe8v-\x11\x86\x04@\xb5K\x866\x19\x97Oce\x8b+x\x88\xd6\x187\x8cI\xa7\x15(\x86/\xd0L\xc54\xf8\x92N+#z\xdf2V\xfea\xb4\x82n\x9f"\xea%\xc4\xd6\x89\x1din8\xfb\x8d\x0b\x92G\x93\xb3\xadq\x1f\xa3\x11l' Dictionary b'3.3\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x01\x19\xf9\xa2\x17%\xe6\xfek\xe8v-\x11\x86\x04@\xb5K\x866\x19\x97Oce\x8b+x\x88\xd6\x187\x8c>(\x97\xf7\xbb1\x9d\x81\xb8\x96\xafb\xc7[\xec\xca3\x1a\xd2\xadN\xbe\xbf\x82\xf5\xfc-\xc4\x1a\xa1\xc1\x1fin8\xfb\x8d\x0b\x92G\x93\xb3\xadq\x1f\xa3\x11l' ERROR: No response from plug 60020372840d8e6fa9d2 [192.168.2.38].
after that, i got no message from the script. testet on a synology docker and a raspi4 in python.
greetz Stefan
Gosung SP1 v2.4 arendst/Tasmota#5323
The text was updated successfully, but these errors were encountered: