pycupra 0.1.4__tar.gz → 0.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pycupra-0.1.4/pycupra.egg-info → pycupra-0.1.6}/PKG-INFO +1 -1
- {pycupra-0.1.4 → pycupra-0.1.6}/example/PyCupra.py +32 -19
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/__version__.py +1 -1
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/connection.py +1858 -1799
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/dashboard.py +2 -0
- pycupra-0.1.6/pycupra/firebase.py +90 -0
- pycupra-0.1.6/pycupra/firebase_messaging/android_checkin.proto +96 -0
- pycupra-0.1.6/pycupra/firebase_messaging/checkin.proto +155 -0
- pycupra-0.1.6/pycupra/firebase_messaging/mcs.proto +328 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/utilities.py +116 -116
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/vehicle.py +96 -15
- {pycupra-0.1.4 → pycupra-0.1.6/pycupra.egg-info}/PKG-INFO +1 -1
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra.egg-info/SOURCES.txt +3 -0
- pycupra-0.1.4/pycupra/firebase.py +0 -73
- {pycupra-0.1.4 → pycupra-0.1.6}/.gitignore +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/LICENSE +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/README.md +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/__init__.py +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/const.py +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/exceptions.py +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/__init__.py +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/android_checkin_pb2.py +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/android_checkin_pb2.pyi +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/checkin_pb2.py +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/checkin_pb2.pyi +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/const.py +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/fcmpushclient.py +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/fcmregister.py +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/mcs_pb2.py +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/mcs_pb2.pyi +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra/firebase_messaging/py.typed +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra.egg-info/dependency_links.txt +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra.egg-info/requires.txt +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra.egg-info/top_level.txt +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/pycupra_credentials.json.demo +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/requirements.txt +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/setup.cfg +0 -0
- {pycupra-0.1.4 → pycupra-0.1.6}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pycupra
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.6
|
4
4
|
Summary: A library to read and send vehicle data via Cupra/Seat portal using the same API calls as the MyCupra/MySeat mobile app.
|
5
5
|
Home-page: https://github.com/WulfgarW/pycupra
|
6
6
|
Author: WulfgarW
|
@@ -177,7 +177,18 @@ async def demo_set_charger_current(vehicle, value="reduced"):
|
|
177
177
|
print('########################################')
|
178
178
|
print('# Change charging current #')
|
179
179
|
print('########################################')
|
180
|
-
success= await vehicle.set_charger_current(value)
|
180
|
+
success= await vehicle.set_charger_current(value)
|
181
|
+
if success:
|
182
|
+
print(" Request completed successfully.")
|
183
|
+
else:
|
184
|
+
print(" Request failed.")
|
185
|
+
return success
|
186
|
+
|
187
|
+
async def demo_set_charger_target_soc(vehicle, value=80):
|
188
|
+
print('########################################')
|
189
|
+
print('# Change target state of charge #')
|
190
|
+
print('########################################')
|
191
|
+
success= await vehicle.set_charger_target_soc(value)
|
181
192
|
if success:
|
182
193
|
print(" Request completed successfully.")
|
183
194
|
else:
|
@@ -373,11 +384,11 @@ async def main():
|
|
373
384
|
raise
|
374
385
|
async with ClientSession(headers={'Connection': 'keep-alive'}) as session:
|
375
386
|
print('')
|
376
|
-
print('
|
377
|
-
print('# Logging on to seat.cloud.vwgroup.com #')
|
378
|
-
print('
|
379
|
-
print(f"Initiating new session to Seat Cloud with {credentials.get('username')} as username")
|
380
|
-
connection = Connection(session, BRAND, credentials.get('username'), credentials.get('password'), PRINTRESPONSE, nightlyUpdateReduction=False)
|
387
|
+
print('######################################################')
|
388
|
+
print('# Logging on to ola.prod.code.seat.cloud.vwgroup.com #')
|
389
|
+
print('######################################################')
|
390
|
+
print(f"Initiating new session to Cupra/Seat Cloud with {credentials.get('username')} as username")
|
391
|
+
connection = Connection(session, BRAND, credentials.get('username'), credentials.get('password'), PRINTRESPONSE, nightlyUpdateReduction=False, anonymise=True)
|
381
392
|
print("Attempting to login to the Seat Cloud service")
|
382
393
|
print(datetime.now())
|
383
394
|
if await connection.doLogin(tokenFile=TOKEN_FILE_NAME_AND_PATH, apiKey=credentials.get('apiKey',None)):
|
@@ -474,6 +485,7 @@ async def main():
|
|
474
485
|
#print(f"Sleeping for {INTERVAL} seconds")
|
475
486
|
#await asyncio.sleep(INTERVAL)
|
476
487
|
|
488
|
+
await connection.terminate()
|
477
489
|
for vehicle in connection.vehicles:
|
478
490
|
"""print('')
|
479
491
|
print(datetime.now())
|
@@ -532,35 +544,36 @@ async def main():
|
|
532
544
|
|
533
545
|
# Examples for using set functions:
|
534
546
|
|
535
|
-
#await demo_set_charger(vehicle, action = "start")
|
536
|
-
#await demo_set_charger_current(vehicle, value='reduced')
|
547
|
+
#await demo_set_charger(vehicle, action = "start") # action = "start" or "stop"
|
548
|
+
#await demo_set_charger_current(vehicle, value='reduced') # value = 1-255/Maximum/Reduced (PHEV: 252 for reduced and 254 for max, EV: Maximum/Reduced)
|
549
|
+
#await demo_set_charger_target_soc(vehicle, value=70) # value = 1-100
|
537
550
|
|
538
|
-
#await demo_set_climatisation(vehicle, action = "start", temp=18.0)
|
539
|
-
#await demo_set_climatisation_temp(vehicle, temp = 18.0)
|
551
|
+
#await demo_set_climatisation(vehicle, action = "start", temp=18.0) # action = "auxilliary", "electric" or "off". spin is S-PIN and only needed for aux heating
|
552
|
+
#await demo_set_climatisation_temp(vehicle, temp = 18.0) # temp = integer from 16 to 30
|
540
553
|
#await demo_set_battery_climatisation(vehicle, mode=False) # mode = False or True
|
541
|
-
#await demo_set_windowheating(vehicle, action = "stop")
|
554
|
+
#await demo_set_windowheating(vehicle, action = "stop") # action = "start" or "stop"
|
542
555
|
|
543
|
-
#await demo_set_timer_schedule(vehicle)
|
544
|
-
#await demo_set_timer_active(vehicle, id=3, action="off")
|
545
|
-
#await demo_set_charge_limit(vehicle, 30)
|
556
|
+
#await demo_set_timer_schedule(vehicle) # arguments id and schedule can be found in the demo function
|
557
|
+
#await demo_set_timer_active(vehicle, id=3, action="off") # id = 1, 2, 3, action = "on" or "off".
|
558
|
+
#await demo_set_charge_limit(vehicle, 30) # limit = PHEV: 0/10/20/30/40/50, EV: 50/60/70/80/90/100
|
546
559
|
|
547
|
-
#await demo_set_departure_profile_schedule(vehicle)
|
560
|
+
#await demo_set_departure_profile_schedule(vehicle) # arguments id and schedule can be found in the demo function
|
548
561
|
#await demo_set_departure_profile_active(vehicle, id=3, action="off") # id = 1, 2, 3, action = "on" or "off".
|
549
562
|
|
550
563
|
#await demo_set_lock(vehicle,action = "lock",
|
551
564
|
# spin = credentials.get('spin','')) # action = "unlock" or "lock". spin = SPIN, needed for both
|
552
565
|
|
553
|
-
#await vehicle.set_pheater(mode = "heating", spin = "1234")
|
566
|
+
#await vehicle.set_pheater(mode = "heating", spin = "1234") # action = "heating", "ventilation" or "off". spin = SPIN, not needed for off
|
554
567
|
|
555
|
-
#await demo_set_honkandflash(vehicle, action="flash")
|
568
|
+
#await demo_set_honkandflash(vehicle, action="flash") # action = "honkandflash" or "flash"
|
556
569
|
|
557
|
-
#await vehicle.set_refresh()
|
570
|
+
#await vehicle.set_refresh() # Takes no arguments, will trigger forced update
|
558
571
|
|
559
572
|
#print(f"Sleeping for {2*INTERVAL} seconds")
|
560
573
|
#await asyncio.sleep(2*INTERVAL)
|
561
574
|
#await demo_show_last_honkandflash_info(vehicle) # Returns the info of the last honkandflash_action
|
562
575
|
|
563
|
-
#await demo_send_destination(vehicle)
|
576
|
+
#await demo_send_destination(vehicle) # arguments can be found in the demo function
|
564
577
|
|
565
578
|
print('########################################')
|
566
579
|
print('# Export all attributes to file #')
|