10000 Hue light: No traceback for timeouts or refused connections to the bridge by azogue · Pull Request #8524 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Hue light: No traceback for timeouts or refused connections to the bridge #8524

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

Merged
merged 1 commit into from
Jul 17, 2017

Conversation

azogue
Copy link
Member
@azogue azogue commented Jul 17, 2017

Description:

When the Hue bridge is stressed**, some times a timeout or a ConnectionRefusedError happens. The exception doesn't need to be logged.

The errors are like this:

2017-07-17 23:15:32 ERROR (Thread-5) [homeassistant.components.light.hue] Cannot reach the bridge
Traceback (most recent call last):
  File "/home/homeassistant/.pyenv/versions/3.5.2/envs/hass35/lib/python3.5/site-packages/homeassistant/components/light/hue.py", line 182, in update_lights
    api = bridge.get_api()
  File "/home/homeassistant/.homeassistant/deps/phue.py", line 838, in get_api
    return self.request('GET', '/api/' + self.username)
  File "/home/homeassistant/.homeassistant/deps/phue.py", line 651, in request
    connection.request(mode, address)
  File "/home/homeassistant/.pyenv/versions/3.5.2/lib/python3.5/http/client.py", line 1106, in request
    self._send_request(method, url, body, headers)
  File "/home/homeassistant/.pyenv/versions/3.5.2/lib/python3.5/http/client.py", line 1151, in _send_request
    self.endheaders(body)
  File "/home/homeassistant/.pyenv/versions/3.5.2/lib/python3.5/http/client.py", line 1102, in endheaders
    self._send_output(message_body)
  File "/home/homeassistant/.pyenv/versions/3.5.2/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/home/homeassistant/.pyenv/versions/3.5.2/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/home/homeassistant/.pyenv/versions/3.5.2/lib/python3.5/http/client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/home/homeassistant/.pyenv/versions/3.5.2/lib/python3.5/socket.py", line 711, in create_connection
    raise err
  File "/home/homeassistant/.pyenv/versions/3.5.2/lib/python3.5/socket.py", line 702, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

A simple error message like "The bridge refused the connection" helps much more to analyse the logs.

** When doing a lot of light changes (in my case, with Hyperion working as an Ambilight TV with 6 hue bulbs), the bridge goes to some overload, and sometimes doesn't answer to HA.

Related issue (if applicable): fixes #8003

Example entry for configuration.yaml (if applicable):

light:
  - platform: hue
    host: 192.168.1.X
    allow_unreachable: true
    homebridge_hidden: true
    scan_interval: 12

Copy link
Member
@fabaff fabaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🐦

@fabaff fabaff merged commit 8c9b389 into home-assistant:dev Jul 17, 2017
@balloob balloob mentioned this pull request Jul 29, 2017
@azogue azogue deleted the hue-lights branch July 30, 2017 09:29
dethpickle pushed a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Dec 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Excessive traceback of errors updating hue lights: timeout and refused connections
4 participants
0