Closed joe-a-b closed 2 years ago
Are you able to control these lights with the SmartLife app? Do you have other Tuya devices that do work? If so, two suggestions:
1) See if the device firmware can be upgraded
2) See if you can run py -m tinytuya wizard
and still pull down the local key (will also create a tuya-raw.json file)
You may still be able to control these if you can get the local key (you have the IP address and the wizard will provide you with the ID and local key for all your devices).
Why are they not showing up right in the scan? It could be that they are using a new/different UDP key to encrypt the broadcast. TinyTuya listens for these broadcast packets during scan mode. If they changed the key, it would not be able to decrypt anything but the IP address which is what you are seeing. If that is something Tuya is doing for new devices, we will need to add that new key to TinyTuya if we can determine what it is. However, it could also be a bug in the firmware these particular lights are using. In any case, the UDP key is not the same as the Local device Key that is used to control and decrypt status messages from the device which is why I am hopeful that you can still control them.
For now, we will call this the d0
firmware Tuya device.
Thank you! Yes, i'm able to control via the tuya smart app (connected to developer cloud account). I think the only part not working is the ip address detection (and payload) since they all say no ip found. However, I'm able to monitor and send values, if i use the examples and enter the ip. Received Payload: {'dps': {'25': '0503e8'}, 't': 1639295663}
Send Heartbeat Ping < Received Payload: {'dps': {'25': '0103e8'}, 't': 1639295667} Send Heartbeat Ping < Received Payload: {'dps': {'25': '0503e8'}, 't': 1639295669} Send Heartbeat Ping < Received Payload: {'dps': {'25': '1003e8'}, 't': 1639295672} Send Heartbeat Ping <
d = tinytuya.BulbDevice('DEVICE_ID_HERE', 'IP_ADDRESS_HERE', 'LOCAL_KEY_HERE'). d.set_version(3.3) d.set_value(25, sys.argv[1])
and i tried those values like '1003e8'.
How do i send the second 't' parameter?
The 't'
timestamp parameter is part of the Tuya payload, it isn't a data point you can set.
Here is on you might try - one of my favorites :)
d.set_value(25, '07464602000003e803e800000000464602007803e803e80000000046460200f003e803e800000000464602003d03e803e80000000046460200ae03e803e800000000464602011303e803e800000000')
Hi @joe-a-b I'm closing this issue unless there is more to add or bugs we need to address. Thanks for your help.
I bought (nearly 20) EJ's SUPER CAR Led Fairy Lights for Bedroom-66Ft 20M RGBIC Plug in Work with Alexa Google Home,App Remote Controlled/Music, string lights for christmas (lightshowpi setup) - It's working fine enough outside to turn/on/off set modes with phone app. Sometimes few locations are a little unreliable on the wifi, i have mesh network out there, and 1 string for testing at my desk. using windows command line, (but also tried linux raspi4B). All that aside i think it's able to communicate. I pulled latest git code, and also tried latest pip install upgrade.
I was looking into seeing if i could do some kind of script to control the modes/colors during the show. (i've already got a few raspi4B's using shairport-sync from pc itunes streaming to some speakers/fm broadcast)
Reproduce steps:
py -m tinytuya scan nocolor
it appears to show "d0" byte where the "3.3" version string would be in the payload. They all return that. I put wireshark on just to see the udp packets. it appears to be about at about byte position 21 in the result, where i think the version was supposed to be.
I was just trying to figure out what was different about all the lights return payloads during the scan (attached capture):
I manually collected list of macids/ip's, using router/and tuya app info to match them up. My next steps would be to try to figure out what command i would send to them to set the scene and rgb color (assuming i'm not blocked by the payload issue).
I suspect even if I have the local device key i may have trouble communicating if it can't decode/unencrypt the responses, is that correct?