Dymerz / SMA-SunnyBoy

A simple data retrieving from SMA SunnyBoy
https://sma-sunnyboy.readthedocs.io/en/latest/sma_sunnyboy.html
MIT License
39 stars 9 forks source link

[BUG] Unable to login-Resolved #21

Closed frankusb closed 2 years ago

frankusb commented 2 years ago

While trying to run getValue.py, after setting address and password, I get repeated: /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1015: InsecureRequestWarning: Unverified HTTPS request is being made to host '192.168.1.158'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings warnings.warn(

I added: from urllib3.exceptions import InsecureRequestWarning from urllib3 import disable_warnings disable_warnings(InsecureRequestWarning)

This suppresses the warning but it seems to hang. Control C shows: File "getkwh.py", line 16, in client.auth() File "/home/frankbanul/.local/lib/python3.9/site-packages/sma_sunnyboy/sma.py", line 101, in auth time.sleep(5) KeyboardInterrupt

To Reproduce python3 getkwh.py

Expected behavior Total and current power would be printed

Actual behavior No output

Hardware (please complete the following information):

Additional context Debian 11.4, Linux 5.10.0-17-amd64 #1 SMP Debian 5.10.136-1 (2022-08-13) x86_64 GNU/Linux

frankusb commented 2 years ago

I also tried on an up to date Macbook Pro, same result.

frankusb commented 2 years ago

Resolved. It required setting the port and useSSL.

# create object client = WebConnect(address, right, password, 443, True)