studioimaginaire / phue

A Python library for the Philips Hue system
Other
1.52k stars 267 forks source link

unable to connect to bridge #158

Closed el-tocino closed 4 years ago

el-tocino commented 4 years ago

using phue 1.1 (or 1.0) python 3.5.2 or 2.7.2

>>> import phue
>>> b = phue.Bridge(ip='192.168.1.100')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/phue.py", line 628, in __init__
    self.connect()
  File "/usr/local/lib/python3.5/dist-packages/phue.py", line 751, in connect
    self.register_app()
  File "/usr/local/lib/python3.5/dist-packages/phue.py", line 705, in register_app
    response = self.request('POST', '/api', registration_request)
  File "/usr/local/lib/python3.5/dist-packages/phue.py", line 669, in request
    return json.loads(response)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Using an incorrect IP address, I get a connection refused (as expected).

Probably something glaringly obvious I'm doing wrong, but not sure what.

krishnajalan commented 3 years ago

I am getting the same error can someone help me out.