studioimaginaire / phue

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

occasional socket.error: [Errno 111] Connection refused requiring physical reboot? #212

Closed 88gts closed 5 months ago

88gts commented 5 months ago

i will occasionally see this error against my bridge, and the only way to recover is to physically reboot. it seems to be occurring more often now than ever before. is there a way to remotely reboot the bridge or help avoid these connection errors? note that i CAN control the bridge via the app in this state.

from phue import Bridge b = Bridge('10.0.1.15') on = b.get_light(1,'on') Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/phue.py", line 836, in get_light 'GET', '/api/' + self.username + '/lights/' + str(light_id)) File "/usr/local/lib/python2.7/dist-packages/phue.py", line 650, in request connection.request(mode, address) File "/usr/lib/python2.7/httplib.py", line 1055, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 1089, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 1051, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 889, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 851, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 832, in connect self.timeout, self.source_address) File "/usr/lib/python2.7/socket.py", line 571, in create_connection raise err socket.error: [Errno 111] Connection refused