-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL Certificate Verification failed - Firmware 1.19.0 #5
Comments
What O/S do you get this error on? |
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l |
I've seen the error firsthand on another O/S. Have you tried sudo apt-get update && sudo apt-get install ca-certificates |
The issue really isn't a big one, as you said PYTHONHTTPSVERIFY=0 does work, however it's a bit of a hack and would rather sort this out properly. It's not really an issue with this code, rather an issue with ensuring the correct certificates are installed. |
True, it's not an issue with the code. I just wanted to let you know it was encountered and a there's a workaround. The "fix" would be to add the self-signed certificate used by the gateway to the OS trusted datastore. I may do that, but since it's working, I'm ok with leaving as is. Another option might be adding a "no verify" option to the config to ignore the certificate; similar to the environment variable workaround. |
Thanks for your help h0lyc0w will leave this issue open |
Argh! My Powerwall firmware was updated to 1.2 last night and now the download of data is failing. I'm not a Python programmer and am struggling to see where I can set the PYTHONHTTPSVERIFY=0 setting. Is this part of the Linux environment variables? Is this something that can be set when the Python script is invoked as part of the command line? Thanks in advance for any help. |
Success! I tried the environment variable method and could not get it to work. But I was able to add the following code to the data logger script which does work! Thanks to http://blog.pengyifan.com/how-to-fix-python-ssl-certificate_verify_failed/ for the solution. import os, ssl |
Spoke too soon. Still not working. I had one successful read and now it's failing again. |
I'm cautiously optimistic that it is working again. I rebooted my Raspberry Pi and the scripts seem to be working and uploading data to PVOutput. There is a lot of discussion on https://teslamotorsclub.com/tmc/threads/firmware-1-20-0.121634/ regarding the latest Powerwall 2 v1.20 firmware update. Many users have been complaining that Tesla is disabling API access for some owners. |
I just got 1.20 and its requiring SSL, is there any update to the logger etc? |
In PW_Helper, change your http references to https Then change the way you are calling the python script by inserting "PYTHONHTTPSVERIFY=0". e.g. PYTHONHTTPSVERIFY=0 python your_script |
I edited the URL's already and also tried that... root@piaware-dayna:~/Powerwall2PVOutput-master# PYTHONHTTPSVERIFY=0 python /root/Powerwall2PVOutput-master/PW_Datalogger.py root@piaware-dayna: |
have you tried the other work around above? In the datalogger file: import os, ssl |
Yeah i did :/ just looking what else i can do now :( |
Can you hit the web interface? |
Yup and i can use curl -sk and get results fine too |
@zzatihz1 did you get this running on 1.20, I don't have access to that specific firmware to debug. I have 1.19 working with PYTHONHTTPSVERIFY=0. |
Can you private message me (don't know how lol) and i can provide a temporary pinhole to my power wall if you wish |
@ekul135 The modification I made was to the datalogger script based on what I shared from http://blog.pengyifan.com/how-to-fix-python-ssl-certificate_verify_failed/ . Setting PYTHONHTTPSVERIFY=0 did not work for me. I have confirmed that my Powerwall is on v1.20.0. As of this morning, the script continues to work well posting to the database and uploading to PVOutput as designed. |
My powerwalls were updated to 1.20 and I am using the PYTHONHTTPSVERIFY=0 in crontab without issues. ������������������������������������������������������������������������������������������������������* * * * * sudo PYTHONHTTPSVERIFY=0 /usr/bin/python /home/pi/path/script.py >/home/pi/path/script.txt 2>&1� |
My powerwall2 was recently upgraded to firmware 1.19.0. After the upgrade, Powerwall2PVOutput could no longer export data from my PW2 due to SSL issues. Here's the error message:
2018-06-19 23:15:42,334 - getPowerwallData: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
I managed to get it working again by using the following environment variable to disable the HTTPS verification check before running PW_DataLogger and PW_PVOExport:
PYTHONHTTPSVERIFY=0
It's a work around for now.
The text was updated successfully, but these errors were encountered: