Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket timeout/Communication error for LB110 #73

Closed
jonvtruong opened this issue Aug 4, 2017 · 1 comment
Closed

Socket timeout/Communication error for LB110 #73

jonvtruong opened this issue Aug 4, 2017 · 1 comment

Comments

@jonvtruong
Copy link

Hi,
I'm getting a socket timeout error when trying to get the state of my LB110 through python. When using "pyhs100 discover" on the command line I'm able to see and get info from the LB110 but not through python.

Traceback (most recent call last):
File "d:/Documents/Coding/Python/PyLight/main.py", line 9, in
print("Current bulb state: " + bulb.state)
File "C:\Users\jonvt\AppData\Local\Programs\Python\Python35\lib\site-packages\pyhs100-0.2.4.2-py3.5.egg\pyHS100\smartbulb.py", line 238, in state
light_state = self.get_light_state()
File "C:\Users\jonvt\AppData\Local\Programs\Python\Python35\lib\site-packages\pyhs100-0.2.4.2-py3.5.egg\pyHS100\smartbulb.py", line 116, in get_light_state
"get_light_state")
File "C:\Users\jonvt\AppData\Local\Programs\Python\Python35\lib\site-packages\pyhs100-0.2.4.2-py3.5.egg\pyHS100\smartbulb.py", line 64, in _query_helper
request={target: {cmd: arg}}
File "C:\Users\jonvt\AppData\Local\Programs\Python\Python35\lib\site-packages\pyhs100-0.2.4.2-py3.5.egg\pyHS100\protocol.py", line 44, in query
sock.connect((host, port))
socket.timeout: timed out

D:\Documents\Coding\Python\PyLight>python d:/Documents/Coding/Python/PyLight/main.py
Traceback (most recent call last):
File "C:\Users\jonvt\AppData\Local\Programs\Python\Python35\lib\site-packages\pyhs100-0.2.4.2-py3.5.egg\pyHS100\pyHS100.py", line 62, in _query_helper
request={target: {cmd: arg}}
File "C:\Users\jonvt\AppData\Local\Programs\Python\Python35\lib\site-packages\pyhs100-0.2.4.2-py3.5.egg\pyHS100\protocol.py", line 44, in query
sock.connect((host, port))
socket.timeout: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "d:/Documents/Coding/Python/PyLight/main.py", line 9, in
print("Current bulb state: " + bulb.state)
File "C:\Users\jonvt\AppData\Local\Programs\Python\Python35\lib\site-packages\pyhs100-0.2.4.2-py3.5.egg\pyHS100\smartbulb.py", line 238, in state
light_state = self.get_light_state()
File "C:\Users\jonvt\AppData\Local\Programs\Python\Python35\lib\site-packages\pyhs100-0.2.4.2-py3.5.egg\pyHS100\smartbulb.py", line 116, in get_light_state
"get_light_state")
File "C:\Users\jonvt\AppData\Local\Programs\Python\Python35\lib\site-packages\pyhs100-0.2.4.2-py3.5.egg\pyHS100\pyHS100.py", line 65, in _query_helper
raise SmartDeviceException('Communication error') from ex
pyHS100.types.SmartDeviceException: Communication error

@jonvtruong
Copy link
Author

had a typo in the ip address....lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant