tonesto7 / fordpass-scriptable Goto Github PK
View Code? Open in Web Editor NEWFordPass Widget for Scriptable
License: GNU General Public License v3.0
FordPass Widget for Scriptable
License: GNU General Public License v3.0
Oil life shows correctly in FordPass app but the widget shows no data. Has been that way since I added the widget, no update.
I received this error after I copied down the latest script code ver1.2.3
Error log text
2021-12-17 19:54:41: Script Update Available: false
2021-12-17 19:54:41: missing: fpDeviceLanguage,fpLanguage,fpTz,fpPressureUnits,fpSpeedUnits
2021-12-17 19:54:43: (Config Menu) Done was pressed
2021-12-17 19:54:44: Error on line 1811:23: Expected value of type string but got value of type null.
Thank you,
Tim
When I run it (for the first time) for Mach-E:
Exception Occurred
Error on line 1428:49: TypeError: null is not an object (evaluating 'vehicleStatus.fuel.distanceTo-Empty')
On my 2019 F150 at least, the window status was showing the red 'X' for all 4 windows. Looking at the debug info and comparing it to the script, it looks like the script is missing the underscore. So "Fully closed position" should be "Fully_closed_position". Likewise the "Undefined window position" should be "Undefined_window_position". Since the pre '21s don't have the ability to show the rear windows, can you make it hide those?
Create a parser to allow voice commands to the widget from the Siri shortcut.
Add support for all supported widget commands
Exception occurred: Error on line 1923:108 TypeError: null is not an object(evaluating ‘windows.driverWindowsPosition’)
I get this error after trying to tap on icon
I have a 4 Door Big Bend Bronco - not sure if the trim level effects the working of the app?
My FordPass app does not show windows on it
Hi,
Maybe it’s possible to integrate the Ford Wallbox also in the Script to get it locked and unlocked ?
I cleared my data using the debug menu. Then, I entered my username, password and vin when I tried to start again and now I get the error "Exception Occured, Error on line 2573:51: TypeError: undefined is not an object (evaluating 'vehicle.batterFillLevel').
I ran the Charles Proxy to see what was going on. Here are some interesting findings...
{
status: "COMPLETE",
method: "GET",
protocolVersion: "HTTP/1.1",
scheme: "https",
host: "usapi.cv.ford.com",
actualPort: 443,
path: "/api/vehicles/v4/MYVIN/status",
query: null,
tunnel: false,
keptAlive: false,
webSocket: false,
remoteAddress: "usapi.cv.ford.com/40.71.221.102",
clientAddress: "198.1...",
times: {
start: "2022-01-17T22:55:38.765-05:00",
requestBegin: "2022-01-17T22:55:38.775-05:00",
requestComplete: "2022-01-17T22:55:38.777-05:00",
responseBegin: "2022-01-17T22:55:38.837-05:00",
end: "2022-01-17T22:55:38.852-05:00"
},
durations: {
dns: 82,
connect: 27,
ssl: 151
},
totalSize: "1493",
ssl: {
protocol: "TLSv1.2",
cipherSuite: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
},
request: {
sizes: {
body: "0",
headers: 1278
},
mimeType: "application/json",
charset: null,
contentEncoding: null,
header: {
firstLine: "GET /api/vehicles/v4/MYVIN/status HTTP/1.1",
headers: [
{
name: "Host",
value: "usapi.cv.ford.com"
},
{
name: "Content-Type",
value: "application/json"
},
{
name: "Application-Id",
value: "71A3AD0A-CF46-4CCF-B473-FC7FE5BC4592"
},
{
name: "Cookie",
value: "_REDACteD"
},
{
name: "auth-token",
value: "eyJ0e...8Vg0w"
},
{
name: "Accept",
value: "*/*"
},
{
name: "User-Agent",
value: "FordPass/5 CFNetwork/1327.0.4 Darwin/21.2.0"
},
{
name: "Accept-Language",
value: "en-US,en;q=0.9"
},
{
name: "Accept-Encoding",
value: "gzip, deflate, br"
},
{
name: "Connection",
value: "keep-alive"
}
]
}
},
response: {
sizes: {
body: "42",
headers: 173
},
mimeType: "application/json",
charset: "utf-8",
contentEncoding: null,
header: {
firstLine: "HTTP/1.1 200 OK",
headers: [
{
name: "Content-Length",
value: "42"
},
{
name: "Content-Type",
value: "application/json; charset=utf-8"
},
{
name: "ActivityId",
value: "c9131f17-21cb-4772-ac30-41254cd4e69a"
},
{
name: "Date",
value: "Tue, 18 Jan 2022 03:55:38 GMT"
}
]
},
body: {
text: "{"$id":"1","status":401,"version":"1.0.0"}",
charset: "utf-8"
}
}
I updated to 1.3.0, and now every time I run the script, it comes up with a message saying Required Settings Missing. It has the screen to put in my Fordpass username and password and the vehicle VIN. All three are already filled out, but I have to click save every time. The widget doesn’t display. Instead, it says “Alerts are not supported in a widget.” I imagine it’s happening because it’s doesn’t think it has the Fordpass credentials.
v1.1.0
"Trail Light Check Control" brings up "SecuriAlert" functions
"Abort" brings up "Trailer Light Check" functions
Possible issue: "Abort" quits script, if it should go back to the main screen then it's an issue
Not sure if everyone is having that issue but I can’t get the check marks to show up on my 2 rear windows. They have an x showing they are down but they aren’t. 2020 F250
When viewing Vehicle Data Output the "vin" is scrubbed to remove personal data but it also appears in the messages returned from Ford's servers thereby exposing the users VIN number. The field is "relevantVin". If that can be scrubbed the same way as "vin" that would be great!
Example:
{
"id": "2",
"messageId": "xxxxxxxx",
"messageSubject": "Put Your FordPass™ Reward Points to Use.",
"messageBody": "Your Points can be used toward complimentary maintenance* — including your first oil change. You can even save them and use them towards the purchase of your next Ford vehicle!*Must be enrolled in FordPass Rewards to receive Points. See ",
"messageType": "EXTERNALNOTIFICATIONREQUEST",
"createdDate": "12/16/2021 09:52:57 PM",
"priority": 1,
"messageTypeId": 20001,
"highlighted": true,
"relevantVin": "3FTTW8E92NRXXXXXX",
"contentType": "Html",
"metadata": "{"DeliveryId":"1XXXXXXX|USA","PegaInteractionId":"XXXXXXX"}",
"isRead": true
},
Exception Occurred Error on line 2208:108 TypeError: null is not an object (evaluating 'windows.driverWindowPosition')
This is with v1.3.2 and a Ford Maverick.
Fuel displays -6% and no indicators in fuel gauge
This will allow the updater to maintain the id when updating.
iOS 15.3.1 iPhone 13 Pro Max
Tried resetting everything, tried using the update script, followed the video exactly again. Widget only shows default scriptable screen. Simple, detailed, medium, large. None work. Wifi or cellular.
Edit:
Ok suddenly simple / medium has showed up! Large detailed does not. I will continue to try variations.
First, you did a great work!!!
The Issue:
I use your script in Spain, in order to use it I have to change manually line 2048 (ver 1.2.1) because of the "countryCode".
From:
let req = new Request(https://www.digitalservices.ford.com/fs/api/v2/vehicles/image/full?vin=${vin}&year=${modelYear}&countryCode=USA&angle=4
);
To:
let req = new Request(https://www.digitalservices.ford.com/fs/api/v2/vehicles/image/full?vin=${vin}&year=${modelYear}&countryCode=ESP&angle=4
);
I think there are almost 2/3 URL that use country or countryCode, the main problem in order to be able to run your script is on line 2048
I do not know if Fordpass API info give you the "customer country", but would be a great feature in order to make it multi country without change it manually.
Another issue is with Tire Pressure:
Here in spain we use Bar and we use Metric system.
Bar = kPa / 100
I have to change line 2075 (ver 1.2.1):
from: //if (!(await usePsiUnit()) && !(await useMetricUnits())) {
to: if (!(await usePsiUnit())) {
In order to see kPA value, because with Metric and kPA selected, the script always shows psi values.
Best regards and keep the great work
On the Beta version 1.1.0, for the Mach-E, I am receiving the following error:
Error on line 893:82: TypeError: undefined if not an object (evaluating 'vehicleData.statusDoors['leftFront']')
Haven't commented out to go further, but I this is the first door in the code - I am assuming that all of the doors are sowing undefined for the Mach-E.
Looks like this is coded for LHD cars. When my right hand front door is open, it warns me the left front door is open. Perhaps because mine is a right hand drive car, and the code looking at ‘drivers door open’?
With the latest 1.3.3 version, my widget doesn’t refresh at the default 5 min window. It’s showing many hours instead between refreshes. I’ve wiped it and redid the whole widget and still not refreshing. Anyway to down grade to 1.3.2 or 1.3.1?
Probably another "small screen" issue, but the tire pressure show up as:
33.2 | 32.1...
With no second line for the rear tires.
After v1.3.0 the timestamp is not flush with the bottom of the widget.
Sorry it doesn‘t work with an Mild Hybrid car
But is a Great Tool
Could we save our preferred widget size in the settings?
It looks like the Apple Keychain settings are being overlapped when trying to setup a second Ford Pass Vehicle. Changing those keychains to be named something different was easy enough, but I can't seem to get the Vehicle Image to stick per widget/car. One of them will default to the other after a few minutes, even after clearing the keychain settings and entering again.
Just updated to the newest version of the script. The app is also up to date. Trying to change the tire pressure from kPa to PSI. Tried going to the widget settings prompt and clicking Pressure Units to change as it did on the previous version, this doesn’t change that issue.. still repeatedly shows only kPa, PSI does not show.
Error on line 15:70: iCloud is not supported. Make sure you are logged into iCloud in the device settings.
I checked and verified that is am logged in my iCloud. I have tried installing other widget from the app gallery and those install and run just fine. I just installed scriptable this evening, so it’s the newest version.
Thank you for your help.
"Fordpass" app shows proper value of "25%" but the widget shows "No Data". All other widget data appears correct.
Bronco user here trying to use the large widget. The medium and small ones work, but none of the large format's work. There are others reporting this on some of the bronco forums.
I've started to receive the error below, unsure how to fix?
2022-01-15 08:05:03: FP: Token expired. Fetching new token and fetch raw data again
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.