Closed cyberdie closed 3 years ago
I've just verified that api.wattio.com certificate is public and can be correctly validate from my browser so the problem must be the other one...
Hi! I think that when the component was made, my python, for some reason, couldn't verify certificate's authenticity so instead of more research i just forced them to go on an unsecure way ...
I can probably do some test this weekend, however, if you want to test your self you just need to remove the parameter verify=False from requests calls on __init__.py (lines 415, 437, 451, 468, 492, 510, 523 and 537).
E.g:
api_call_response = requests.get(
WATTIO_STATUS_URI, headers=api_call_headers, verify=False
)
Change to:
api_call_response = requests.get(
WATTIO_STATUS_URI, headers=api_call_headers
)
That should do the trick :)
Hi @dmoranf , i'll try it and get back to you ASAP. Thank you
You were right. I've deleted all "verify=false" ocurrences and errors have gone. Thanks you!
Thank you for your testing! i've modified the file in the repo :)
Hi, i'm running HA with docker over Raspberry with Wattio custom component. The issue is related to API connections that seems to be doing in a insecure way ....or the certificate of the site is not public and cannot be validated....
The HA logs are clear:
/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: **Unverified HTTPS request is being made to host 'api.wattio.com**'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning,