Closed stecooper closed 6 years ago
@stecooper huh. Are you able to sniff the traffic between your phone and device with Wireshark and send the PCAP file to me?
@codetheweb Thanks for the reply, is there connectivity between the phone and the device directly or does it go via the remote server API? I'm on Android btw and I have tried on bluestacks on Windows with Wireshark running at the same time but while I can see broadcast packets from the device, I can't see any communication from the PC IP with Bluestacks running the app (https://play.google.com/store/apps/details?id=com.efamily.cloud) and the device itself.
Ok. I'm not sure how packet sniffing an emulator works, so I'm sorry but I can't help you out there.
The Tuya app turns on/off the device locally, then sends the status of it to a remote server.
If you are able at some point to sniff the traffic with Wireshark, please send it to me and I'll see what I can do.
Hi,
In requests.json how did you find the prefix and suffix for status, on and off?
I can use your sample code to get the status of my Smart Plug without any issues and can switch on but not off. From a plug switched off to on I do get an error but it does come on:
But then I try to turn off again
Could the suffix / prefix be my issue? My Smart Plug is a UK version, not sure if that could be the issue (https://www.amazon.co.uk/Wireless-Switch-Function-Android-Devices/dp/B071SDNGW2/ref=sr_1_3?ie=UTF8&qid=1510959884&sr=8-3&keywords=smart+plug)?
Thanks