clyra / unifics

Unifi Counter Sensor
GNU General Public License v3.0
13 stars 4 forks source link

2023.6 InsecureRequestWarning #25

Closed woodmj74 closed 1 year ago

woodmj74 commented 1 year ago

Since 2023.6 I am receiving the following warnings in the logs from this integration:

2023-06-08 13:30:35.760 WARNING (SyncWorker_8) [py.warnings] /usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py:1056: InsecureRequestWarning: Unverified HTTPS request is being made to host '192.168.0.10'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(

I have disabled all integrations associated to unifi and tracked them back one by one to confirm this is generating this error. I am using a cloudkey as the controller and as such haven't installed any certs etc. on the machine. Prior to 2023.6 this was working without errors.

Any suggestions would be gratefully received to resolved these warnings.

woodmj74 commented 1 year ago

A similar issue with this release on the Proxmox integration. The following comments where posted which may help here....

https://github.com/home-assistant/core/issues/94243#issuecomment-1584562393

clyra commented 1 year ago

Hi,

This is annoying... and I couldnt find a way to prevent it. But you can make HA ignore that. You may follow that link or as I use it:

logger:
  default: info
  logs:
    requests.packages.urllib3.connectionpool: critical
woodmj74 commented 1 year ago

okay thanks @clyra - appreciate you looking into it. Seems to be fairly wide spread over a number of integrations (both core and custom) so hopefully someone will find a way of tackling it globally. :-)

woodmj74 commented 1 year ago

I'm not sure if this is of any help?

https://github.com/home-assistant/core/issues/94243#issuecomment-1586672393

clyra commented 1 year ago

Hi @woodmj74

New version is out with the same "fix" used in the proxmox integration. Seems to work with a minor issue: it still log a warning when the integration starts, but goes silent after that. Not sure if we can fix that because it seems to be done by HA.

woodmj74 commented 1 year ago

Hi @clyra - thanks, appreciate you looking into this.

Initial testing looks good, as you say get the initial message but then silent so happy with that. Will close and many thanks again.

plouf34 commented 6 months ago

Hello, Any news regarding this issue? I've the same error in HA log: /usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host '192.168.1.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings warnings.warn(

nicx commented 6 months ago

+1