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

Problem Bbox integration with 2022.7.1/2 #74715

Closed
mcpfr opened this issue Jul 8, 2022 · 6 comments
Closed

Problem Bbox integration with 2022.7.1/2 #74715

mcpfr opened this issue Jul 8, 2022 · 6 comments

Comments

@mcpfr
Copy link

mcpfr commented Jul 8, 2022

The problem

After upgrade in 2022.7.1, Bbox integation not run and i have error homeassistant.components.device_tracker
see log in attached
log device_tracker_error.log

And i have an error in my python scripts for the same API.

log bbox inegration error.txt

For a booth, the return is ... Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:997)

Thanks for your help and sorry for my english, please

What version of Home Assistant Core has the issue?

core-2022.7.1

What was the last working version of Home Assistant Core?

core-2022.6.7 or before core-2022.5.x and core-2022.4.x tested

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Bbox

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bbox/

Diagnostics information

log device_tracker_error.log
log bbox inegration error.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@probot-home-assistant
Copy link

bbox documentation
bbox source
(message by IssueLinks)

@mcpfr mcpfr changed the title Problem Bbox integration in 2022.7.1 Problem Bbox integration with 2022.7.1 Jul 8, 2022
@mcpfr
Copy link
Author

mcpfr commented Jul 10, 2022

Hello,

For test, I just redid a complete installation directly in 2202.7.2 on another HD to start from the Pi.
I just added the lines below to the "configuration.yaml"

device_tracker:

  • platform: bbox
    host: xx.xx.xx.xx (ip bbox)

And I got exactly the same error...

Logger: homeassistant.components.device_tracker
Source: components/bbox/device_tracker.py:83
Integration: Dispositif de suivi (documentation, issues)
First occurred: 11:11:09 (1 occurrences)
Last logged: 11:11:09

Error setting up platform legacy bbox
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in validate_conn
conn.connect()
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 414, in connect
self.sock = ssl_wrap_socket(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create
self.do_handshake()
File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='mabbox.bytel.fr', port=443): Max retries exceeded with url: /api/v1/hosts (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 248, in async_setup_legacy
scanner = await hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/bbox/device_tracker.py", line 36, in get_scanner
scanner = BboxDeviceScanner(config[DOMAIN])
File "/usr/src/homeassistant/homeassistant/components/bbox/device_tracker.py", line 55, in init
self.success_init = self._update_info()
File "/usr/src/homeassistant/homeassistant/util/init.py", line 192, in wrapper
result = method(*args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/bbox/device_tracker.py", line 83, in _update_info
result = box.get_all_connected_devices()
File "/usr/local/lib/python3.10/site-packages/pybbox/init.py", line 112, in get_all_connected_devices
resp = api.execute_api_request()
File "/usr/local/lib/python3.10/site-packages/pybbox/bboxApiCall.py", line 48, in execute_api_request
resp = self.call_method(self.api_url.get_url())
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 723, in send
history = [resp for resp in gen]
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 723, in
history = [resp for resp in gen]
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 266, in resolve_redirects
resp = self.send(
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 563, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='mabbox.bytel.fr', port=443): Max retries exceeded with url: /api/v1/hosts (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:997)')))

@mcpfr mcpfr changed the title Problem Bbox integration with 2022.7.1 Problem Bbox integration with 2022.7.1/2 Jul 10, 2022
@Biscotte31
Copy link

Hello,
I'm having the same issue with the BBox integration.
I downgraded to Core v. 2022.6.7 to keep it working...

@earion68
Copy link

earion68 commented Aug 8, 2022

Hi all, it looks like the problem is not with Home Assistant nor with the pybbox library it relies on, but by HomeAssistant 2022.7 using the latest OpenSSL library which prevents access to the Bbox.
As this is a really specific issue and we should use this integration in our internal network anyway, I created a custom integration that does not verify the DH Key.

You can find my custom integration here: https://github.com/earion68/hass_custom_bbox

@Biscotte31
Copy link

Thanks buddy !
@mcpfr also created a temporary solution, but it seems that it modifies the whole HA ssh security level.
See here

Yours should be better for long-term service.

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 6, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants