• Welcome to F150Lightningforum.com everyone!

    If you're joining us from F150gen14.com, then you may already have an account here!

    If you were registered on F150gen14.com as of April 16, 2022 or earlier, then you can simply login here with the same username and password!

Sponsored

Sapphire

Well-known member
Joined
May 20, 2021
Threads
2
Messages
157
Reaction score
115
Location
Chicago
Vehicles
2021 F-150 Powerboost Platinum
That's interesting... I bet it's because of the URL encoding when sending the data to ford for the token.

I might need to pre-escape the text
Probably needs Java escaping. Will was getting Error 500: java.lang.IllegalArgumentException back from the server, causing the widget script error. I had him test with raw curl commands to cut out the script as a factor. If I de-laze myself into changing my password to include % and $ and try putting \s in front of them, I could just test it myself. It might work. Haha. URL encoding would just put more %s in there (but, maybe it was the $ being rejected). Apologies for all the nerd talk for everyone reading this!

So it was the complicated password causing the issue that @WillB17 and I are having?
Not because it’s complicated, just because of the symbols. I’m using a complicated password too, but only letters and numbers.
Sponsored

 
Last edited:

Plattypuss

Well-known member
Joined
Nov 14, 2021
Threads
0
Messages
65
Reaction score
14
Location
PA
Vehicles
2021 F150 Platinum PowerBoost Rapid red
Probably needs Java escaping. Will was getting Error 500: java.lang.IllegalArgumentException, causing the widget script error. If I de-laze myself into changing my password to include % and $ and try putting \s in front of them, I could just test it myself. It might work. Haha. URL encoding would just put more %s in there (but, maybe it was the $ being rejected).


Not because it’s complicated, just because of the symbols. I’m using a complicated password too, but only letters and numbers.
Thanks for figuring it out!
 
OP
OP
tonesto7

tonesto7

Well-known member
First Name
Anthony
Joined
Mar 7, 2021
Threads
5
Messages
313
Reaction score
387
Location
Michigan
Vehicles
2021 Lariat 502A | 3.5L EB
Occupation
IT Admin | Software Developer
So it was the complicated password causing the issue that @WillB17 and I are having?
It’s very possible. I will get you a version to test with asap.
Please bear with me. I have another update I'm working on releasing. I'm trying to roll all the fixes into my existing work.
I’m trying to also build a script whose sole purpose is to download and update the ford pass widget script. So no more copy-paste :)
 
Last edited:

Sapphire

Well-known member
Joined
May 20, 2021
Threads
2
Messages
157
Reaction score
115
Location
Chicago
Vehicles
2021 F-150 Powerboost Platinum
Ok, never mind, I had a dumb. @tonesto7 I just successfully tested it, you were right. The password needs to be URL encoded when you put it in the POST payload. (I didn't pay attention close enough that it does have the application/x-www-form-urlencoded in there). Just needs an encodeURI slapped in there.
 

Plattypuss

Well-known member
Joined
Nov 14, 2021
Threads
0
Messages
65
Reaction score
14
Location
PA
Vehicles
2021 F150 Platinum PowerBoost Rapid red
It’s very possible. I will get you a version to test with asap.
Please bear with me. I have another update I'm working on releasing. I'm trying to roll all the fixes into my existing work.
I’m trying to also build a script whose sole purpose is to download and update the ford pass widget script. So no more copy-paste :)
My friend. I appreciate your efforts. No worries about me. I can change my password and if that doesn’t work I can wait longer.
 

Sponsored

Sapphire

Well-known member
Joined
May 20, 2021
Threads
2
Messages
157
Reaction score
115
Location
Chicago
Vehicles
2021 F-150 Powerboost Platinum
My friend. I appreciate your efforts. No worries about me. I can change my password and if that doesn’t work I can wait longer.
Well, if you want your symbols back (and for the others still having issues and also have ants in their pants waiting until @tonesto7 puts this into an upcoming version), replace line 1152 from the 1.1.1 version of the script with this:

req.body = encodeURI(`client_id=9fb503e0-715b-47e8-adfd-ad4b7770f73b&grant_type=password&username=${username}&password=${password}`);

and you should be all good.
 
OP
OP
tonesto7

tonesto7

Well-known member
First Name
Anthony
Joined
Mar 7, 2021
Threads
5
Messages
313
Reaction score
387
Location
Michigan
Vehicles
2021 Lariat 502A | 3.5L EB
Occupation
IT Admin | Software Developer
I just keep finding new ideas. Basically, I can share an iOS shortcut that you can add to your device to basically dictate commands to the widget. This means Siri voice commands. And they can be as advanced as we want.
hey Siri , ford widget start my truck
 

WillB17

Well-known member
First Name
Will
Joined
Oct 18, 2021
Threads
2
Messages
97
Reaction score
90
Location
Michigan
Vehicles
2021 F-150 Lariat Powerboost
That's interesting... I bet it's because of the URL encoding when sending the data to ford for the token.

I might need to pre-escape the text
If you figure out how to do this please let us know, would like to have my more secure password back! Even though I accidentally leaked it to @Sapphire :LOL:
 
OP
OP
tonesto7

tonesto7

Well-known member
First Name
Anthony
Joined
Mar 7, 2021
Threads
5
Messages
313
Reaction score
387
Location
Michigan
Vehicles
2021 Lariat 502A | 3.5L EB
Occupation
IT Admin | Software Developer
V1.2.1 Release
  • Refactored the entire authentication mechanism to get the newer token required for advanced commands and API data calls.
  • Added support for advanced commands like SecuriAlert, and likely any future commands.
  • Fixes for passwords with special characters (hopefully)
  • Updated menu navigation labels and menus so that you can go back to previous menus instead of exiting each time.
  • Added a debug menu under the widget settings menu. It will allow you to save all vehicle data to your device clipboard for easy sharing with me or others.
  • Added an OTA API page under the debug menu as well. (it's just the output in JSON)
  • Added a Vehicle Data page under the debug menu as well.
  • Fixed the way that door status is captured and hopefully fixes errors and will accommodate 2-door vehicles better.
  • Lots of other little fixes.

https://raw.githubusercontent.com/tonesto7/fordpass-scriptable/main/Fordpass Widget.js
 
Last edited:

Sponsored
OP
OP
tonesto7

tonesto7

Well-known member
First Name
Anthony
Joined
Mar 7, 2021
Threads
5
Messages
313
Reaction score
387
Location
Michigan
Vehicles
2021 Lariat 502A | 3.5L EB
Occupation
IT Admin | Software Developer
I made a last-minute push and added a vehicle data output to the debug page. So please update if again if you wish to see it.
 

JediNut

Well-known member
First Name
Emmett
Joined
Aug 4, 2021
Threads
14
Messages
163
Reaction score
81
Location
Rocklin, CA
Vehicles
'21 Ford F-150, '05 Harley Davidson Softail Deuce
@tonesto7 ... I just want to say "THANK YOU!" for all your hard work on this.

To the rest of us who are reaping the rewards of his work... might I point out that there is a "Donate" button on the Github page for the project:

Ford F-150 Lightning FordPass - Scriptable Widget (iOS, iPad, MacOS) 1639631477888


We could at least send him enough to take his wife out for a second anniversary dinner!

Just a thought.
 

WillB17

Well-known member
First Name
Will
Joined
Oct 18, 2021
Threads
2
Messages
97
Reaction score
90
Location
Michigan
Vehicles
2021 F-150 Lariat Powerboost
Few small things! Tested this on the IPad Pro 12.9” for fun, but in the Medium(?) sized widget, part of the text gets cut off, however the largest widget will show all info without anything being sliced off. Also, my TPMS sensors are not in this set of wheels and is disabled from alerting me on my screen and FordPass via forscan and the truck currently reads dashes (-) on all 4 corners however the widget is reporting a value still.

Ford F-150 Lightning FordPass - Scriptable Widget (iOS, iPad, MacOS) FB046E05-3E71-48E4-A38E-7724AF316089
 
OP
OP
tonesto7

tonesto7

Well-known member
First Name
Anthony
Joined
Mar 7, 2021
Threads
5
Messages
313
Reaction score
387
Location
Michigan
Vehicles
2021 Lariat 502A | 3.5L EB
Occupation
IT Admin | Software Developer
Few small things! Tested this on the IPad Pro 12.9” for fun, but in the Medium(?) sized widget, part of the text gets cut off, however the largest widget will show all info without anything being sliced off. Also, my TPMS sensors are not in this set of wheels and is disabled from alerting me on my screen and FordPass via forscan and the truck currently reads dashes (-) on all 4 corners however the widget is reporting a value still.

FB046E05-3E71-48E4-A38E-7724AF316089.jpeg
It's a glitch in the widget itself. I have the same iPad and it eventually lines up correctly.
Ford F-150 Lightning FordPass - Scriptable Widget (iOS, iPad, MacOS) 1639688883865

That's from my iPad Pro 12.9"
No need to use the large widget.

As far as the tire pressure I can only go on what fordpass API shows
 

Pepito113

Member
First Name
Eloy
Joined
Nov 2, 2021
Threads
0
Messages
10
Reaction score
0
Location
Miami
Vehicles
2021 Ford F-150
Very interesting. Going to read this again
Sponsored

 
 





Top