Giter VIP home page Giter VIP logo

weconnect-cli's People

Contributors

dependabot[bot] avatar tillsteinbach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

weconnect-cli's Issues

no right feedback by maxChargeCurrentAC value

i have test the in/output from maxChargeCurrentAC via CLI.
is set in App 5A the variable give me = reduced - back
is set in App to 10A or 13A it gives = invalid - back
is set via App to 16A it gives = maximum - back

there an Error or givs VW no more feedback to load?

regards
simon

error 4112, capability is missing info

When running the example for getting the parking position, I get an error message instead:

$cat /vehicles/WVWZZZE1ZMP00xxxx/status/parkingPosition
...
[parkingPosition]
Error: Error 4112: The capability for the requested operation is missing info: Internal error, please try again later. If the problem persists, please contact our support.

What exactly is missing there?

Import Fehler

Ich bekomme beim ausführen immer Import Fehler:

PS C:\Users\frank\Downloads\WeConnect-cli-main\WeConnect-cli-main> & C:/Users/frank/AppData/Local/Programs/Python/Python39/python.exe c:/Users/frank/Downloads/WeConnect-cli-main/WeConnect-cli-main/weconnect_cli/weconnect_cli.py --help
Traceback (most recent call last):
File "c:\Users\frank\Downloads\WeConnect-cli-main\WeConnect-cli-main\weconnect_cli\weconnect_cli.py", line 17, in
from .__version import version
ImportError: attempted relative import with no known parent package
PS C:\Users\frank\Downloads\WeConnect-cli-main\WeConnect-cli-main>

is it possilbe to set climatisation with an temperatur as parameter

i have the problem, i get no targetTemperature_C from VW Server.
so i start the climatisation via CLI and it starts, about with 20,5 °C.
is it possible to send the target Temperatur as parameter, or can i change it in the sorce of yout files to my value i want.

regards
simon

PassatGTE range status not showing

Login works well, but get status after query range is not showing:
"weconnect-cli --verbose --username foobar --password foobar get /vehicles/WVWDEADBEEF/status"

....working "well" ....
[rangeStatus]
Error: Error 4003: The performed call is unauthorized info: Something went wrong. Please try to re-login. If the problem persists, please contact our support.
[parkingPosition] (last captured 2021-08-23T05:04:09+00:00)
... working well...

--verbose setting does not work......

Error message: No credentials form found

Command:
weconnect-cli --username [email protected] --password VerySecret list

Give error message:
2022-02-11T12:54:47+0200:CRITICAL:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: No credentials form found

recurringTimer is None

hey folks,

i get the following exception when running the cli:

Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\Scripts\weconnect-cli.exe\__main__.py", line 7, in <module>
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect_cli\weconnect_cli.py", line 142, in main
    weConnect.update()
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\weconnect.py", line 411, in update
    vehicle = Vehicle(weConnect=self, vin=vin, parent=self.__vehicles, fromDict=vehicleDict,
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 46, in __init__
    self.update(fromDict)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 117, in update
    self.updateStatus(updateCapabilities=updateCapabilities, force=force)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 157, in updateStatus
    self.statuses[key] = className(vehicle=self, parent=self.statuses, statusId=key,
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 1586, in __init__
    super().__init__(vehicle=vehicle, parent=parent, statusId=statusId, fromDict=fromDict, fixAPI=fixAPI)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 312, in __init__
    self.update(fromDict=fromDict)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 1598, in update
    self.timers[climatizationTimerDict['id']] = ClimatizationTimer.Timer(
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 1636, in __init__
    self.update(fromDict)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 1660, in update
    self.recurringTimer.enabled = False
AttributeError: 'NoneType' object has no attribute 'enabled'

It doesn't make any difference wether i run it with list argument or without.
Would be glad to get some help here!

Username and password

Hi,
during my log-in problems yesterday I found out that neither the rigth username nor the right password is necessary to get access via weconnect-cli to the myvolkswagen API. Only a placeholder for both ist necessary. A single random character for username and password is sufficient. Modifying the vehicle number denies the access.
What is the reason behind it? I tested it with a commandline interpreter with the following command:

weconnect-cli --username [email protected] --password YYYYYYYYYY get /vehicles/WVWZZZZZZZZZZZZZZ/domains/charging/batteryStatus/currentSOC_pct

no function to set maxChargeCurrentAC

weconnect-cli --username xxxxxxxxx --password xxxxxxxxx set /vehicles/WVWZZZAUZLW916270/domains/charging/chargingSettings/maxChargeCurrentAC maximum id /vehicles/WVWZZZAUZLW916270/domains/charging/chargingSettings/maxChargeCurrentAC cannot be set: Could not set value (Resource could not be found - Internal error, please try again later. If the problem persists, please contact our support. - Please retry in a moment)

via WeConnect App i can set the maxChargeCurrentAC to 5/10/13 and MAX without problems.

Issue with login, HTLM error 302

Hello
I have used this code for the last 6 months, on daily basis, without any problems, now have started to get
API warnings - "Access file not found"
Nothing has been changed in my code. My last successful execution was yesterday (28. January 2022 12.05)

I have no change in user id or password.
Can access the account with my Weconnect app, Weconnect ID app and from the myvolkswagen.net homepage

I can see in the log file some kind of redirection there is going wrong: Error 302.

Any suggestion on how to solve it?

Thanks

Here is some data from the log
[29/01/2022 10:57:53] [API::WARNING] Access file not found
[29/01/2022 10:57:53] [API::INFO] logger
[29/01/2022 10:57:53] [API::DEBUG] Checking tokens
[29/01/2022 10:57:53] [API::DEBUG] Token checking failed
[29/01/2022 10:57:53] [API::WARNING] Forcing login
[29/01/2022 10:57:53] [API::INFO] Attempting to login
[29/01/2022 10:57:53] [API::DEBUG] Login parameters: {'prompt': 'login', 'state': '6bkhsihwuAxLGOCqQxuNcCaJpXI06Lg30vY9BpAoby6', 'response_type': 'code id_token token', 'code_challenge_method': 's256', 'scope': 'openid profile mbb cars birthdate nickname address phone', 'code_challenge': 'jvAGJOSrWk20-PY48nlDya6RiibpE_heYcaxT2nmmdM', 'redirect_uri': 'carnet://identity-kit/login', 'client_id': '9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com', 'nonce': '6wVdu4W0Fdn0AuBUYH2FWPXKW7Rme7S49BQpY3PpQw3'}
[29/01/2022 10:57:54] [API::INFO] Sending GET request to https://identity.vwgroup.io/signin-service/v1/signin/9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com?relayState=2e6ac3f995f8ff3a2ae3f00f88d7068ea7e8cb86
[29/01/2022 10:57:54] [API::DEBUG] Parameters: https://identity.vwgroup.io/signin-service/v1/signin/9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com?relayState=2e6ac3f995f8ff3a2ae3f00f88d7068ea7e8cb86
[29/01/2022 10:57:54] [API::DEBUG] Headers: {'User-Agent': 'python-requests/2.25.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'Connection': 'keep-alive', 'Cookie': 'SESSION=NGY5YjllZmEtZDYyYS00ZWNlLWFiZjYtNDFhMDMyNDUxOWQx; vcap_journey=0739660b-afe5-43bb-baf2-52928b1c8e76'}
[29/01/2022 10:57:54] [API::INFO] Response with code: 200
[29/01/2022 10:57:54] [API::DEBUG] Headers: {'Date': 'Sat, 29 Jan 2022 09:57:54 GMT', 'Content-Type': 'text/html;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Content-Language': 'en', 'Expires': '0', 'Pragma': 'no-cache', 'Set-Cookie': 'SESSION=MWE0ZTI3NDAtMWUyZi00MDViLWEzMzgtYmVlNWJjMjQ4NWMw; Path=/signin-service/v1/; Secure; HttpOnly; SameSite=Lax', 'Strict-Transport-Security': 'max-age=31536000 ; includeSubDomains', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'DENY', 'X-Vcap-Request-Id': '070adde6-5e60-422c-6518-88bd850e0d63', 'X-Xss-Protection': '1; mode=block'}
[29/01/2022 10:57:54] [API::DEBUG] History: [<Response [302]>]
[29/01/2022 10:57:54] [API::INFO] Found email login url: /signin-service/v1/9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com/login/identifier
[29/01/2022 10:57:54] [API::INFO] Sending GET request to https://identity.vwgroup.io/signin-service/v1/9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com/login/authenticate?relayState=2e6ac3f995f8ff3a2ae3f00f88d7068ea7e8cb86
[29/01/2022 10:57:54] [API::DEBUG] Parameters: https://identity.vwgroup.io/signin-service/v1/9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com/login/authenticate?relayState=2e6ac3f995f8ff3a2ae3f00f88d7068ea7e8cb86
[29/01/2022 10:57:54] [API::DEBUG] Headers: {'User-Agent': 'python-requests/2.25.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'Connection': 'keep-alive', 'Cookie': 'SESSION=MWE0ZTI3NDAtMWUyZi00MDViLWEzMzgtYmVlNWJjMjQ4NWMw; vcap_journey=0739660b-afe5-43bb-baf2-52928b1c8e76'}
[29/01/2022 10:57:54] [API::INFO] Response with code: 200
[29/01/2022 10:57:54] [API::DEBUG] Headers: {'Date': 'Sat, 29 Jan 2022 09:57:54 GMT', 'Content-Type': 'text/html;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Content-Language': 'en', 'Expires': '0', 'Pragma': 'no-cache', 'Strict-Transport-Security': 'max-age=31536000 ; includeSubDomains', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'DENY', 'X-Vcap-Request-Id': 'b52b87eb-c1b4-4d04-55c9-06c822ad0314', 'X-Xss-Protection': '1; mode=block'}
[29/01/2022 10:57:54] [API::DEBUG] History: [<Response [303]>]
[29/01/2022 10:57:54] [API::CRITICAL] Raising error msg: This account does not exist
Traceback (most recent call last):
File "/volume1/web/volkswagen/weconnect/weNew.py", line 34, in
vwc.login()
File "/volume1/web/volkswagen/weconnect/NativeAPI.py", line 278, in login
return self.__force_login()
File "/volume1/web/volkswagen/weconnect/NativeAPI.py", line 333, in __force_login
raise VWError('This account does not exist')
NativeAPI.VWError: This account does not exist

Temporarily no response from command line

I really appreciate your work. Unfortunately there is strange problem with WeConnect-cli: It works fine from morning to afternoon and informs about battery status, range, odometer, door status and lock status as expected, every 5 minutes.
In the afternoon of the day, only battery status and range is reported correctly, all other commands do not give back the expected value, but (for odometer for instance) "id /vehicles/WVWXXXXXXXXXX/domains/measurements/odometerStatus/odometer not found".
This continues until the next morning, then the correct value ist shown again (till afternoon)
What could be the reason for this strange behaviour?
Thanks for your reply
Gerhard

CLI returns "None" for every request

Whenever using the CLI interface, the response (including JSON responses) contains the string "None" at the very beginning. This leads to non interpretable JSON format.

Reproduce like this:
$ weconnect-cli --username= --password=

Leads to:
None
Welcome! Type ? to list commands

Start and stop charging not working in 0.25.0

Hello,
I get the following error when starting and stopping charging in 0.25.0. Climatisation still works.

weconnect-cli --username [email protected] --password  yyy set /vehicles/WVWZZZE1ZMPxxxxxx/controls/charging start     
Traceback (most recent call last):
  File "/Users/preventlow/Library/Python/3.8/bin/weconnect-cli", line 8, in <module>
    sys.exit(main())
  File "/Users/preventlow/Library/Python/3.8/lib/python/site-packages/weconnect_cli/weconnect_cli_base.py", line 236, in main
    element.value = args.value
  File "/Users/preventlow/Library/Python/3.8/lib/python/site-packages/weconnect/addressable.py", line 368, in value
    elif issubclass(valType, Enum):
TypeError: issubclass() arg 1 must be a class

Using macOS 12.2.1
Rolled back to 0.24.2 and charging works again.

Regards Peter

Set the temperature

Does anyone know how to set the temperature before starting the climatization?
/vehicles/{myvin}/controls/climatisation start
just starts the climatization.

No credentials form found

when I start the script on a raspberry pi I get the following error:
CRITICAL:weconnect-cli:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: No credentials form found
The same comman line on a MAC is working.

Form does not contain postAction

When trying to login using

weconnect-cli --username [email protected] --password "s3cret" list

it returns: 2022-03-21T22:06:36+0100:CRITICAL:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: Form does not contain postAction

Climatisation does not start

Hi dev,

Thanks for all the work on the CLI!

I'm trying to start the climatisation from the command line for my ID.4, but it does not start and i dont get any feedback why not:
weconnect-cli --username XXXXX --password XXXXXX set /vehicles/WVGZZZE2ZMXXXXX/controls/climatisation start

I do get a message when i use the wrong command (not stop or start).

Crash after logging in

I just installed the WeConnect CLI and get the following error when I try to logon with:
weconnect-cli --username xxxx --password yyyyy
I am running Ubuntu 18.04 and have python 3.6.9 installed.

file "/home/stephan/.local/lib/python3.6/site-packages/weconnect/util.py", line 11, in robustTimeParse
    return datetime.fromisoformat(timestring)
AttributeError: type object 'datetime.datetime' has no attribute 'fromisoformat'

how to set climatisationTimer?

I want to change the climatisationTimer of my ID.4 as the same is possible in the WeConnect ID App.
But the path /vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers is read only.
Any idea how to change the climatisationTimer ?

Window heating not starting (4104 Bad Gateway)

Thank you for this package, it's really awesome. I got it up and running in a few minutes.
I can start and stop climatisation without issues. However, when I try the window heating I get the following error:
# weconnect-cli set /vehicles/XXX/controls/windowheating start
id /vehicles/XXX/controls/windowheating cannot be set: Could not control windowheating (Bad Gateway - Looks like your service has expired. Please update your service subscription. - No retry possible)
The window heating function is working smoothly in the app. The car is a Passat GTE 2021.

If I run:
#weconnect-cli get /
then I see the same error in several places, all related to battery and charging:

[chargingProfiles] Elements: 1 items
        [chargingProfilesStatus]
                Error:  Error 4104: Bad Gateway
                        info: Looks like your service has expired. Please update your service subscription.
                        timestamp: 2022-09-07 13:43:13+00:00
                        Profiles: 0 items

Thanks for your help!

Climatisation not working

Hi Till,

great job in creating this. I am not an expert in coding, but I did manage to get it running thanks to your good instructions :-).

I started looking for this kind of code because I want to be able to trigger the auxiliary heating (Standheizung) from outside the app. Ideally I would like to be able to us an iOS shortcut action to trigger this, but for now I am happy if I get it up and running using my computer.

I have a Tiguan from 2019 (Model 2020).

When I want to start the climatisation I get the following error:

python3 weconnect-cli --username [email protected] --password ................ -s **** set /vehicles/WVGZZZ5NZLW......./controls/climatisation start
id /vehicles/WVGZZZ5NZLW....../controls/climatisation cannot be set: Could not control climatisation (Not Found - Upstream service responded with an unexpected status. If the problem persists, please contact our support. - Please retry in a moment)

Using the Volkswagen App I am able to start the auxiliary heating.

Is there anything you can do to make this work or am I doing something wrong?

Thank you in advance.

All car capabilities lost today

Hello,
Since this morning, after having to reconnect my car to my main profile, a lot of features are not available anymore.
I can get only static information like the vehicle model or the vehicle vin but all the informations I was getting from /vehicles/VIN/domains/[...] are not found, for example:

id /vehicles/VIN/domains/charging/batteryStatus/currentSOC_pct not found

I tried weconnect-mqtt and I can see that I'm missing some useful topics for my vehicle.

Are you experimenting the same thing from your side?

KeyError: 'car_birdview'

Traceback (most recent call last):
File "/usr/local/bin/wc-cli", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/weconnect_cli/weconnect_cli.py", line 185, in main
weConnect.update(updateCapabilities=(not args.noCapabilities), updatePictures=(not args.noPictures))
File "/usr/local/lib/python3.8/site-packages/weconnect/weconnect.py", line 419, in update
self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force)
File "/usr/local/lib/python3.8/site-packages/weconnect/weconnect.py", line 457, in updateVehicles
vehicle = Vehicle(weConnect=self, vin=vin, parent=self.__vehicles, fromDict=vehicleDict,
File "/usr/local/lib/python3.8/site-packages/weconnect/elements/vehicle.py", line 67, in init
self.update(fromDict, updateCapabilities=updateCapabilities, updatePictures=updatePictures)
File "/usr/local/lib/python3.8/site-packages/weconnect/elements/vehicle.py", line 167, in update
self.updatePictures()
File "/usr/local/lib/python3.8/site-packages/weconnect/elements/vehicle.py", line 389, in updatePictures
self.updateStatusPicture()
File "/usr/local/lib/python3.8/site-packages/weconnect/elements/vehicle.py", line 392, in updateStatusPicture
img = self.__carImages['car_birdview']
KeyError: 'car_birdview'

Seems to be not working since 2 or 3 days...

I get this error when trying to connect, no problem with Trinity or the wechargeid app
weconnect-cli --username xxxxxx --password xxxxx list
CRITICAL:weconnect-cli:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: No credentials form found

Best

Philippe

cannot "cd" to a node with numeric name

Nice tool, but I have a small problem:
My ID.4 has numeric nodes in the climatisationTimer tree:

I can list the nodes with find:

user@domain@weconnect-sh:/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers$find
/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers
/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers/1
/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers/1/enabled
/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers/1/singleTimer
/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers/1/singleTimer/startDateTime
/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers/2
/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers/2/enabled
/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers/2/singleTimer
/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers/2/singleTimer/startDateTime

But I cannot "cd" into it:
user@domain@weconnect-sh:/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers$cd 1
*** 1 does not exist
user@domain@weconnect-sh:/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers$pwd
/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers

reading the whole tree content with cat does work:
user@domain@weconnect-sh:/vehicles/WVGZZZE2ZXXXXXXX/status/climatisationTimer/timers$cat
[1: Enabled: False at 2021-11-14T07:25:00+00:00 , 2: Enabled: True at 2021-11-19T16:35:00+00:00 ]

Error message: No credentials form found

Command:
weconnect-cli --username [email protected] --password VerySecret

Give error message:
2023-01-05:CRITICAL:weconnect-cli:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: No credentials form found

The email is a @t-online.de (--> is the "-" a problem?) and the password includes a "!" and a "?" (--> seems to be no problem, a change led to the same error message).

Running Python 3.6.3; car is ID3, access both for IOS and Android weconnect Apps run fine.

Exception ObserverPriority

I had the cli running with the events command and got the following exception:

Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\Scripts\weconnect-cli.exe\__main__.py", line 7, in <module>
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect_cli\weconnect_cli.py", line 208, in main
    weConnect.update()
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\weconnect.py", line 415, in update
    self.__vehicles[vin].update(fromDict=vehicleDict, updateCapabilities=updateCapabilities)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 117, in update
    self.updateStatus(updateCapabilities=updateCapabilities, force=force)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 154, in updateStatus
    self.statuses[key].update(fromDict=data['data'][key])
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 1148, in update
    self.targetTemperature_K.setValueWithCarTime(
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\addressable.py", line 174, in setValueWithCarTime
    self.notify(flags)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\addressable.py", line 49, in notify
    observers = self.getObservers(flags)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\addressable.py", line 34, in getObservers
    return [observerEntry[0] for observerEntry in self.getObserverEntries(flags)]
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\addressable.py", line 46, in getObserverEntries
    return sorted(observers, key=lambda entry: entry[2])
TypeError: '<' not supported between instances of 'ObserverPriority' and 'ObserverPriority'

isActive flag disappeared

The isActive entry disappeared from the readynessStatus --> ConnectionState . Is this information available somewhere else now?

Does this not work for Cupra Born?

I try to log in with the valid credentials that work fine with the mycupra app. But I get this response:

CRITICAL:There was a problem when authenticating with WeConnect: Error during login, account [email protected]  does not exist

(where the x's are my actual email address used for login).

Output format JSON

Hi Till
Thanks for the great tool! Would it be possible to add an option to retrieve the output in JSON format? Especially for status information this would be really great.
BR
Markus

Problems with CLI after install

I have installed the WeConnect-cli package using the command

pip3 install weconnect-cli

The installation appeared to be successful but when I issue the command I get:
pi@raspberrypi:~ $ weconnect-cli
bash: weconnect-cli: command not found

Am I missing something?

Does the WeConnect API support MBB platform vehicles ?

Hi,
I have two VW cars, one e-Golf and one ID.4
VW has lately abandoned the old We-Connect App and Renamed the We-Connect ID app to Volkswagen. This app now handles both cars. I thus wondered if your API could now also handle both car types.
This is interesting because it seems that the HomeAssistant custom integration also use your Python API.

I tried weconnect-cli, and it finds both cars.
However, when listing tags for the e-Golf, 'capabilities', 'domains' and 'controls' are missing.
I only get this:

xx.xx@gmail.com@weconnect-sh:/vehicles/WVWZZZAU.....$ls tags
..
vin
role
enrollmentStatus
userRoleStatus
model
devicePlatform
nickname
brandCode
images
tags
pictures

When using the "cat" command I only get this:

Vehicle: WVWZZZ.........
VIN: WVWZZZ...........
Model: e-Golf
Device Platform: MBB
Nickname: e-GOLF COMFO 100 E1F
Brand Code: V
Role: PRIMARY_USER
Enrollment Status: COMPLETED
User Role Status: ENABLED

Is this caused my missing support for MBB platforms in the library?
Or is there something in the the VW server implementation that causes this?

Thanks.
Jon

Can't login

Hello,

I'm getting the following error messages when trying to get info about my ID.3 using latest version of WeConnect-Cli. I've run the update which installed WeConnect 0.54, but that didn't help. Running macOS 12.6.3.

Traceback (most recent call last):
File "/Users/zzz/Library/Python/3.9/bin/weconnect-cli", line 8, in
sys.exit(main())
File "/Users/zzz/Library/Python/3.9/lib/python/site-packages/weconnect_cli/weconnect_cli_base.py", line 209, in main
weConnect.login()
File "/Users/zzz/Library/Python/3.9/lib/python/site-packages/weconnect/weconnect.py", line 182, in login
self.__session.login()
File "/Users/zzz/Library/Python/3.9/lib/python/site-packages/weconnect/auth/we_connect_session.py", line 75, in login
authorizationUrl = self.authorizationUrl(url='https://identity.vwgroup.io/oidc/v1/authorize')
File "/Users/zzz/Library/Python/3.9/lib/python/site-packages/weconnect/auth/we_connect_session.py", line 96, in authorizationUrl
redirect = tryLoginResponse.headers['Location']
File "/Users/zzz/Library/Python/3.9/lib/python/site-packages/requests/structures.py", line 52, in getitem
return self._store[key.lower()][1]
KeyError: 'location'

Getting data fails

This is what I just got:

Traceback (most recent call last):
File "/usr/local/bin/wc-cli", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/weconnect_cli/weconnect_cli.py", line 158, in main
weConnect.update()
File "/usr/local/lib/python3.8/site-packages/weconnect/weconnect.py", line 414, in update
vehicle = Vehicle(weConnect=self, vin=vin, parent=self.__vehicles, fromDict=vehicleDict,
File "/usr/local/lib/python3.8/site-packages/weconnect/elements.py", line 49, in init
self.update(fromDict)
File "/usr/local/lib/python3.8/site-packages/weconnect/elements.py", line 146, in update
self.updateStatus(updateCapabilities=updateCapabilities, force=force)
File "/usr/local/lib/python3.8/site-packages/weconnect/elements.py", line 214, in updateStatus
self.statuses[status] = keyClassMap[status](vehicle=self, parent=self.statuses, statusId=status,
KeyError: 'chargeMode'
Traceback (most recent call last):
File "/usr/local/bin/wc-cli", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/weconnect_cli/weconnect_cli.py", line 158, in main
weConnect.update()
File "/usr/local/lib/python3.8/site-packages/weconnect/weconnect.py", line 414, in update
vehicle = Vehicle(weConnect=self, vin=vin, parent=self.__vehicles, fromDict=vehicleDict,
File "/usr/local/lib/python3.8/site-packages/weconnect/elements.py", line 49, in init
self.update(fromDict)
File "/usr/local/lib/python3.8/site-packages/weconnect/elements.py", line 146, in update
self.updateStatus(updateCapabilities=updateCapabilities, force=force)
File "/usr/local/lib/python3.8/site-packages/weconnect/elements.py", line 214, in updateStatus
self.statuses[status] = keyClassMap[status](vehicle=self, parent=self.statuses, statusId=status,
KeyError: 'chargeMode'

Any ideas?

Aufruf der CLI funktioniert nicht mehr

Zuerst dachte ich, der Fehler hängt mit dem aktuellen Update der CLI zusammen. Allerdings tritt das neuerdings auch mit 0.38.2 auf. Kann keinen Befehl mehr ausführen – weder list, noch set auf eine Ressource.

 p-j58p0z @  [a-vwxfmm]  ~/files  weconnect-cli --username [email protected] --password secure list
Traceback (most recent call last):
  File "/files/.mwsoftware/python/pip/bin/weconnect-cli", line 8, in <module>
    sys.exit(main())
  File "/files/.mwsoftware/python/pip/weconnect_cli/weconnect_cli_base.py", line 223, in main
    weConnect.update(updateCapabilities=(not args.noCapabilities), updatePictures=(not args.noPictures), selective=args.selective)
  File "/files/.mwsoftware/python/pip/weconnect/weconnect.py", line 194, in update
    self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective)
  File "/files/.mwsoftware/python/pip/weconnect/weconnect.py", line 216, in updateVehicles
    vehicle = Vehicle(weConnect=self, vin=vin, parent=self.__vehicles, fromDict=vehicleDict, fixAPI=self.fixAPI,
  File "/files/.mwsoftware/python/pip/weconnect/elements/vehicle.py", line 133, in __init__
    self.update(fromDict, updateCapabilities=updateCapabilities, updatePictures=updatePictures, selective=selective)
  File "/files/.mwsoftware/python/pip/weconnect/elements/vehicle.py", line 227, in update
    self.updateStatus(updateCapabilities=updateCapabilities, force=force, selective=selective)
  File "/files/.mwsoftware/python/pip/weconnect/elements/vehicle.py", line 355, in updateStatus
    self.domains[domain.value][key] = className(vehicle=self, parent=self.domains[domain.value], statusId=key,
  File "/files/.mwsoftware/python/pip/weconnect/elements/charging_profiles.py", line 24, in __init__
    super().__init__(vehicle=vehicle, parent=parent, statusId=statusId, fromDict=fromDict, fixAPI=fixAPI)
  File "/files/.mwsoftware/python/pip/weconnect/elements/generic_status.py", line 38, in __init__
    self.update(fromDict=fromDict)
  File "/files/.mwsoftware/python/pip/weconnect/elements/charging_profiles.py", line 47, in update
    self.nextChargingTimer = ChargingProfiles.NextChargingTimer(parent=self, fromDict=fromDict['value']['nextChargingTimer'])
  File "/files/.mwsoftware/python/pip/weconnect/elements/charging_profiles.py", line 242, in __init__
    self.update(fromDict)
  File "/files/.mwsoftware/python/pip/weconnect/elements/charging_profiles.py", line 248, in update
    self.timer = self.parent.profiles[fromDict['id']]
KeyError: 0

Offline car in "my cars" break the access

Hello,

I have a old "offline" car added to my Volkswagen. Than the access with weconnect-cli to my new "online" car does not work. I get this message:
~$ weconnect-cli --netrc .netrc -v list 2023-12-11T23:34:15+0100:WARNING:/vehicles/WVWZ*******52: Vehicle data for WVWZ*******52 is empty, this can happen when there are too many requests 2023-12-11T23:34:16+0100:ERROR:Failed to retrieve data for VIN WVWZ*******52: Could not fetch data. Status Code was: 400 2023-12-11T23:34:19+0100:CRITICAL:There was a problem when communicating with WeConnect: Could not fetch data. Status Code was: 400
And no information about my online car.
This VIN WVWZ*******52 is from my offline car.
After I deleted this offline car I can access also to my new car...

only 3 changes possible

what i have tested, it is only possilbe to make 3 changes via CLI or MQTT, then the VW-Servers says: ->
ignition must be switched on to protect the battery

i think that is new, again 1 week or so.
can you confirm it?

regards
simon

Error message: No credentials form found

Command:
weconnect-cli --username [email protected] --password VerySecret

Gives error message:
2022-01-28T13:18:24+0200:CRITICAL:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: No credentials form found

Tested version:
weconnect-cli --version
weconnect-cli 0.23.1 (using WeConnect-python 0.35.0)

Possibility to get service information

Hi,

In we connect app for Golf GTE (not we connect ID), we can get the "service" information.
Any way to have this information on your plugin ?

Thanks in advance !

Accepting terms and conditions

I get the following message when trying to read status data:
CRITICAL:weconnect-cli:There was a problem when authenticating with WeConnect: You have to login at myvolkswagen.de and accept the terms and conditions
Is it possible to catch this condition and accept the terms through the CLI as well?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.