clarkd / fordpass-python Goto Github PK
View Code? Open in Web Editor NEWPython wrapper for the FordPass API for Ford vehicle information and control: start, stop, lock, unlock.
License: MIT License
Python wrapper for the FordPass API for Ford vehicle information and control: start, stop, lock, unlock.
License: MIT License
Using the provided demo.py script, I receive this error in response:
Traceback (most recent call last):
File "/home/nic/Scrivania/./demo.py", line 17, in <module>
print(r.status()) # Print the status of the car
File "/home/nic/Scrivania/venv/lib/python3.10/site-packages/fordpass/fordpass.py", line 86, in status
r.raise_for_status()
File "/home/nic/Scrivania/venv/lib/python3.10/site-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://usapi.cv.ford.com/api/vehicles/v4/###########/status?lrdt=01-01-1970+00%3A00%3A00
I'm thinking you should add a timeout to requests so that commands don't attempt to run forever in the event they can't be completed. See snip from log below. I think the vehicle was driving which is why the command wasn't received.
2020-10-29 17:38:55 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:38:55 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:01 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:01 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:39:06 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:06 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:39:12 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:12 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:39:17 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:17 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:39:22 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:22 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:39:28 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:39:28 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:33 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:39:33 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:38 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:39:38 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:44 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:39:44 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:49 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:39:49 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:54 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:39:54 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:00 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:00 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:05 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:05 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:10 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:10 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:16 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:16 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:21 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:21 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:26 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:26 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:32 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:32 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:37 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:37 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:42 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:42 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:48 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:48 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:53 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:53 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:40:58 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:40:58 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:41:04 INFO (SyncWorker_29) [root] Command is pending
2020-10-29 17:41:04 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:41:09 INFO (SyncWorker_34) [root] Command is pending
2020-10-29 17:41:09 INFO (SyncWorker_29) [root] Command is pending
Traceback (most recent call last):
File "demo.py", line 8, in
from fordpass import Vehicle
File "/usr/local/lib/python3.4/dist-packages/fordpass/init.py", line 1, in
from .fordpass import Vehicle
File "/usr/local/lib/python3.4/dist-packages/fordpass/fordpass.py", line 13
**defaultHeaders,
^
SyntaxError: invalid syntax
It would be very helpful if you could tag releases as well. This would enable distributions to use the GitHub release tarballs.
Thanks
Is there a way to store the password in a Wu that is not in plaintext ?
It looks like the Authentication doesn't work anymore.
Does anyone have the same Problem?
Traceback (most recent call last):
File "/Users/manuel/temp/fordpass-python/fordpass/demo.py", line 17, in <module>
print(r.status()) # Print the status of the car
File "/Users/manuel/temp/fordpass-python/fordpass/fordpass.py", line 69, in status
self.__acquireToken()
File "/Users/manuel/temp/fordpass-python/fordpass/fordpass.py", line 61, in __acquireToken
self.auth()
File "/Users/manuel/temp/fordpass-python/fordpass/fordpass.py", line 54, in auth
r.raise_for_status()
File "/Users/manuel/opt/anaconda3/lib/python3.9/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://fcis.ice.ibmcloud.com/v1.0/endpoint/default/token
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.