LightningCanuckNB
Well-known member
- Joined
- Jan 19, 2023
- Threads
- 8
- Messages
- 79
- Reaction score
- 67
- Location
- NB, Canada
- Vehicles
- F150 Lightning
- Thread starter
- #1
I have remarked on here previously how annoying I found it that the Lightning does not have walk-away lock, so I set about making it work myself. I have had this setup working for about a week now, and it is pretty flawless.
Requirements
- An Android phone set up for PAAK - I am 99% sure this is impossible with iPhone. The phone does not need to be rooted.
- Tasker (https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&hl=en_CA&gl=US)
- You also need the app 'Termux' and 'termux-tasker' (https://github.com/termux/termux-tasker) - I recommend installing the F-Droid store (https://f-droid.org/en/) for both of those, as F-Droid is now where all the new releases of Termux are.
This post is not going to be a tutorial on how to use the above apps! Plenty of those online already.
Tasker has a State Change event for "BT Near", and it is simple to use the F150 BTLE passive lock bluetooth module for this state change. The next trick though was to figure out how I would get Tasker to unlock the doors - this is where Termux comes in.
I found this node project that is still maintained, that exports the FordPass API (https://github.com/d4v3y0rk/ffpass).
Install that inside Termux ('pip install ffpass')
Then, I made this small script
I suggest writing this script on your PC, testing it, and then pushing it to the phone.
Now in Tasker, all you need to do is create a task for State 'BT Near' the car, then add an exit task to call this script.
If you find it behaving too sensitively (this happened to me at home), you can add some additional variable checks so that the script will only be called once per exit task, then reset the variable next time 'Sync' Bluetooth is actually connected.
That is pretty much it - now the car locks itself when I walk away from it, and when I walk back, it unlocks when I touch the handle. A change I plan to make in the future is to have this NodeJS process run in the background (with a persistent, auth'ed session) and call 'lock' via a local call - this will cut down on authentications to the Ford API, because I do not want my account to get blocked.
If you have questions I will try to answer.
Requirements
- An Android phone set up for PAAK - I am 99% sure this is impossible with iPhone. The phone does not need to be rooted.
- Tasker (https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&hl=en_CA&gl=US)
- You also need the app 'Termux' and 'termux-tasker' (https://github.com/termux/termux-tasker) - I recommend installing the F-Droid store (https://f-droid.org/en/) for both of those, as F-Droid is now where all the new releases of Termux are.
This post is not going to be a tutorial on how to use the above apps! Plenty of those online already.
Tasker has a State Change event for "BT Near", and it is simple to use the F150 BTLE passive lock bluetooth module for this state change. The next trick though was to figure out how I would get Tasker to unlock the doors - this is where Termux comes in.
I found this node project that is still maintained, that exports the FordPass API (https://github.com/d4v3y0rk/ffpass).
Install that inside Termux ('pip install ffpass')
Then, I made this small script
JavaScript:
const fordApi = require('ffpass')
const car = new fordApi.vehicle("<EMAIL HERE>", "<PASSWORD HERE>", "<VIN HERE>")
async function main() {
await car.auth()
var vehicleData = await car.issueCommand("lock")
console.log(JSON.stringify(vehicleData))
}
main()
Now in Tasker, all you need to do is create a task for State 'BT Near' the car, then add an exit task to call this script.
If you find it behaving too sensitively (this happened to me at home), you can add some additional variable checks so that the script will only be called once per exit task, then reset the variable next time 'Sync' Bluetooth is actually connected.
That is pretty much it - now the car locks itself when I walk away from it, and when I walk back, it unlocks when I touch the handle. A change I plan to make in the future is to have this NodeJS process run in the background (with a persistent, auth'ed session) and call 'lock' via a local call - this will cut down on authentications to the Ford API, because I do not want my account to get blocked.
If you have questions I will try to answer.
Sponsored
Last edited: