jrester / tesla_powerwall

Python API for Tesla Powerwall
MIT License
73 stars 24 forks source link

Error: tesla_powerwall.error.PowerwallUnreachableError #47

Closed pietervanderwesthuizen closed 11 months ago

pietervanderwesthuizen commented 1 year ago

I get Powerwall is unreachable error with below code:

from tesla_powerwall import Powerwall, User, API

password='xxx' email='xxx' ip = "xxx" # Address of your Powerwall Gateway

powerwall = Powerwall(ip)

powerwall.login(password, email)

Console:

reticulate::source_python('C:/Users/piete/OneDrive/Documents/R/Powerwall 2.py') Error: tesla_powerwall.error.PowerwallUnreachableError: Powerwall is unreachable: HTTPSConnectionPool(host='192.168.1.109', port=443): Max retries exceeded with url: /api/login/Basic (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)')))

pietervanderwesthuizen commented 1 year ago

Powerwall Gateway Firmware: 23.12.0 2f804982

jrester commented 1 year ago

Hi, this error seems to come from the self-signed certificate provided by the powerwall. Although this powerwall lib skips the certificate verification, it does not seem to work in your case. For further investigation could you please test the following short code snippet and report if it also throws the same error or returns a <Response [200]>:

import requests
print(requests.get("https://<insert your powerwall ip>", verify=False))
pietervanderwesthuizen commented 1 year ago

<Response [200]>

From: jrester @.> Sent: Thursday, June 8, 2023 11:18 AM To: jrester/tesla_powerwall @.> Cc: Pieter van der Westhuizen @.>; Author @.> Subject: Re: [jrester/tesla_powerwall] Error: tesla_powerwall.error.PowerwallUnreachableError (Issue #47)

Hi, this error seems to come from the self-signed certificate provided by the powerwall. Although this powerwall lib skips the certificate verification, it does not seem to work in your case. For further investigation could you please test the following short code snippet and report if it also throws the same error or returns a <Response [200]>:

import requests print(requests.get("https:// https://%3cinsert%20your%20powerwall%20ip%3e ", verify=False))

— Reply to this email directly, view it on GitHub https://github.com/jrester/tesla_powerwall/issues/47#issuecomment-1582202248 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALONIBPJU5Q4NLAXHELKUOTXKGKGBANCNFSM6AAAAAAY4QO4UM . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ALONIBLGLN4Q642OVB3MUO3XKGKGBA5CNFSM6AAAAAAY4QO4UOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS6JZ6YQ.gif Message ID: @. @.> >

ezorzin commented 1 year ago

Hi, on my system I have exactly the same behavior: <Response [200]>. Any news?

jrester commented 1 year ago

@pietervanderwesthuizen and @ezorzin, sorry for my late reply. Does the error still occur?

jrester commented 11 months ago

Closing this because of inactivity