dmslabsbr / hoymiles

Hoymiles ADD-ON for Home Assistant
119 stars 30 forks source link

SSL: CERTIFICATE_VERIFY_FAILED #142

Open cnadler86 opened 6 months ago

cnadler86 commented 6 months ago

Change method send_request to the following: image

then it works also when running api in vscode

Cosik commented 6 months ago

Sorry don't understand.

cnadler86 commented 6 months ago

Hi.

Sorry, I posted the issue in a hurry. I was trying to use the hoymilesapi as standalone in vs code and I had problems logging in. The problem was something with SSL certificate (I do not have really a clue about ssl). I added two lines of code and then it worked. It also might be my proxy settings in vs code or python, but if this also works well in HA, it might be a little improvement in the code.

Cosik @.***> schrieb am Sa. 9. März 2024 um 14:44:

Sorry don't understand.

— Reply to this email directly, view it on GitHub https://github.com/dmslabsbr/hoymiles/issues/142#issuecomment-1986861212, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDFDZHN7VZEKZ32VUVPG4OTYXMG5LAVCNFSM6AAAAABEMS5EO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWHA3DCMRRGI . You are receiving this because you authored the thread.Message ID: @.***>

cnadler86 commented 6 months ago

You could also handle it in a try catch, if the actually implementation throws an ssl error, then use mine (I could send you the information of the respective exception)

Cosik @.***> schrieb am Sa. 9. März 2024 um 14:44:

Sorry don't understand.

— Reply to this email directly, view it on GitHub https://github.com/dmslabsbr/hoymiles/issues/142#issuecomment-1986861212, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDFDZHN7VZEKZ32VUVPG4OTYXMG5LAVCNFSM6AAAAABEMS5EO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWHA3DCMRRGI . You are receiving this because you authored the thread.Message ID: @.***>