clach04 / python-tuya

Python interface to ESP8266MOD WiFi smart devices from Shenzhen Xenon. NOTE I'm not using any devices with this library so I can't test :-(
MIT License
239 stars 55 forks source link

[Errno 54] Connection reset by peer #8

Closed 312362115 closed 6 years ago

312362115 commented 6 years ago

the status method is ok. and the set_staus method is raise the error.

Traceback (most recent call last):
  File "pytuya.py", line 330, in <module>
    data = d.set_status(not switch_state)  # This requires a valid key
  File "pytuya.py", line 235, in set_status
    data = s.recv(1024)
socket.error: [Errno 54] Connection reset by peer
312362115 commented 6 years ago

oh, the key is not valid.