codetheweb / tuyapi

🌧 An easy-to-use API for devices that use Tuya's cloud services. Documentation: https://codetheweb.github.io/tuyapi.
MIT License
2.08k stars 342 forks source link

socket.timeout: timed out #367

Closed MrBuushy closed 4 years ago

MrBuushy commented 4 years ago

Error: line 4, in data = d.status() File "C:\Users\Diaboli Sica\AppData\Local\Programs\Python\Python37\lib\site-packages\pytuya__init.py", line 279, in status data = self._send_receive(payload) File "C:\Users\Diaboli Sica\AppData\Local\Programs\Python\Python37\lib\site-packages\pytuya\init__.py", line 175, in _send_receive s.connect((self.address, self.port)) socket.timeout: timed out

Code: import pytuya

d = pytuya.OutletDevice('xxxxx', 'xxxxx', 'xxxxx') data = d.status()

Questions: 1) Is there any way to use ethernet instead of wifi? 2) When using wifi, does the light bulb have to be near to the pc? 3) Can I have my phone near the light and let my pc control the light over the internet using the phone as a connector?

kueblc commented 4 years ago

Looks like you're looking for python-tuya, not tuyapi, a JS library.

MrBuushy commented 4 years ago

Oh ok. I thought to put it here because it looked like python-tuya was dead.