arrian / lifx-python

Python bindings for LIFX lightbulbs.
15 stars 4 forks source link

timeout #5

Closed frakman1 closed 9 years ago

frakman1 commented 9 years ago

Hi Arrian,

(This is not really an issue but I had no other way to communicate this)

I just tried your excellent python library and whilst running the example_off.py script, I noticed that I would get a timeout error :

python example_off.py ('0.0.0.0', 56700) Traceback (most recent call last): File "example_off.py", line 3, in lifx.Lifx().off() File "C:\Python27\lifx-python-master\lifx-python-master\lifx\lifx.py", line 11, in init self.network = Network() File "C:\Python27\lifx-python-master\lifx-python-master\lifx\network.py", line 27, in init self.connect() File "C:\Python27\lifx-python-master\lifx-python-master\lifx\network.py", line 57, in connect raise Exception('Handshake timed out.') Exception: Handshake timed out.

After some experimentation, I saw that if I increased the 'timeout' variable on line 22 of network.py from 1 to 2, that it then worked perfectly.

Just wanted to share that in case others with slow networks ran into this.

arrian commented 9 years ago

Thanks. I've updated the timeout.