-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Hi
I’m encountering an issue while using weconnect-cli. When trying to retrieve the current target SOC (State of Charge) for a vehicle, I receive the following error:
PC192-168-10-10:~ eduard$ weconnect-cli --username ...... --password ...... get /vehicles/WV2.../domains/charging/chargingSettings/targetSOC_pct
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.13/bin/weconnect-cli", line 8, in
sys.exit(main())
~~~~^^
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/weconnect_cli/weconnect_cli_base.py", line 205, in main
weConnect.login()
~~~~~~~~~~~~~~~^^
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/weconnect/weconnect.py", line 184, in login
self.__session.login()
~~~~~~~~~~~~~~~~~~~~^^
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/weconnect/auth/we_connect_session.py", line 76, in login
response = self.doWebAuth(authorizationUrl)
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/weconnect/auth/we_connect_session.py", line 253, in doWebAuth
afterLoginResponse = self.get(afterLoginUrl, allow_redirects=False, access_type=AccessType.NONE)
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/weconnect/auth/we_connect_session.py", line 69, in request
return super(WeConnectSession, self).request(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
method, url, headers=headers, data=data, withhold_token=withhold_token, access_type=access_type, token=token, timeout=timeout, **kwargs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/weconnect/auth/openid_session.py", line 188, in request
raise InsecureTransportError()
oauthlib.oauth2.rfc6749.errors.InsecureTransportError: (insecure_transport) OAuth 2 MUST utilize https.
PC192-168-10-10:~ eduard$ python3 --version
Python 3.13.1
PC192-168-10-10:~ eduard$ weconnect-cli --version
weconnect-cli 0.38.7 (using WeConnect-python 0.60.5)
PC192-168-10-10:~ eduard$
The versions I’m using are:
• Python: 3.13.1
• weconnect-cli: 0.38.7
• WeConnect-python: 0.60.5
The error suggests that OAuth 2 requires an HTTPS connection, but I’m unsure whether this is a configuration issue or if I’m missing something.