studioimaginaire / phue

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

SW upgrade in Philips Hue Gateway breaking API? #122

Closed JLindh closed 6 years ago

JLindh commented 6 years ago

Hey, I performed a FW upgrade on the Philips Hue gateway the other day (Through the Phillips Hue iOS app). Seems like that broke my python script; specifically by using the get_light_objects().

Ex. I execute

ip_address = config.phue_ip_address
b = Bridge(ip_address)
b.connect()
lights = b.get_light_objects()

which causes the error

Traceback (most recent call last): File "runAWSDTdemo.py", line 23, in lights = b.get_light_objects() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/phue.py", line 771, in get_light_objects lights = self.request('GET', '/api/' + self.username + '/lights/') File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/phue.py", line 670, in request return json.loads(response) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 339, in loads return _default_decoder.decode(s) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

JLindh commented 6 years ago

New firmware upgrade to gateway fixed the issue.