markruys / gw2pvo

GoodWe to PVOutput
MIT License
45 stars 29 forks source link

GW2PVO error - Certicate verify failed - Max retries exceeded #45

Closed pspsspeed closed 4 years ago

pspsspeed commented 4 years ago

Hi, gw2pvo was working fine til yesterday when it stopped updating PVOutput with the error below:

WARNING HTTPSConnectionPool(host='globalapi.sems.com.cn', port=443): Max retries exceeded with url: /api/v1/PowerStation/GetMonitorDetailByPowerstationId (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

Were there any changes on SEMS that someone is aware of?

eNeRGy164 commented 4 years ago

They let the certificate expire. But they use a different (v2) api to login with their apps. So I created #42 for that.

pspsspeed commented 4 years ago

Thank you for the reply - will wait for update

walterwhite81 commented 4 years ago

works like a charm! thanks @eNeRGy164

Ralf7 commented 4 years ago

Good to read that there is a solution. I informed GoodWe about it and all they replied was that the API is only for business customers ...... I’m looking forward to an update of the script from Mark Ruys. @markruys

markruys commented 4 years ago

I've release 1.3.0 which incorporates the fix from #42.

pspsspeed commented 4 years ago

Thank you so much - working 100%

On Sat, 27 Jun 2020 at 21:49, Mark Ruys notifications@github.com wrote:

Closed #45 https://github.com/markruys/gw2pvo/issues/45.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/markruys/gw2pvo/issues/45#event-3489318298, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALH747TC6DUEAM65ENZAWP3RYZEMPANCNFSM4OJJ2TPA .

-- P Spickett

CoenWhite commented 4 years ago

Thanks for the update, it's working again!

I'm having some trouble updating the old data though... it gives a "ERROR Failed to call GoodWe API" error, but if I turn on DEBUG info I see information getting through:

DEBUG    Starting new HTTPS connection (1): eu.semsportal.com:443
DEBUG    https://eu.semsportal.com:443 "POST /api/PowerStationMonitor/GetPowerStationPowerAndIncomeByDay HTTP/1.1" 200 444
DEBUG    {'hasError': False, 'code': 0, 'msg': 'Success', 'components': {'msgSocketAdr': '', 'api': 'http://eu.semsportal.com:82/api/PowerStationMonitor/GetPowerStationPowerAndIncomeByDay', 'para': None, 'timeSpan': 0, 'langVer': 73}, 'data': [{'i': 6.384, 'p': 30.4, 'd': '06/26/2020'}, {'i': 4.767, 'p': 22.7, 'd': '06/27/2020'}]}
DEBUG    Starting new HTTPS connection (1): semsportal.com:443
DEBUG    https://semsportal.com:443 "POST /api/v2/Common/CrossLogin HTTP/1.1" 200 527
ERROR    Failed to call GoodWe API
WARNING  2020-06-27 - Received bad data {}

Is this a related problem?

OK, I dug in and found out that this is probably again due to issue #23 / #34 if msg.lower() == 'success'

I had updated the code to include this snippet and with the update it got removed again. Could you please include this in the master? -EDIT your replied 30 seconds before I found out myself @eNeRGy164

eNeRGy164 commented 4 years ago

Seems related to #23 and #34