Git Product home page Git Product logo

ffpass's Introduction

Forget Fordpass

The Fordpass App requires you to put in a pin and tell it you are not driving and takes forever to issue commands to your vehicle. This little nugget of code talks to the APIs and makes starting/stoping the engine and locking/unlocking the doors super easy.

If you find this useful let me know on Twitter. @d4v3y0rk
An awesome developer has forked this and made a version for using with AWS Lambda. Find it here: https://github.com/swamplynx/ffpass-lambda

TL:DR

UPDATE: I have moved the majority of the backend code to an NPM Module ffpass

The code requires several environment variables to set for it to work:

export FORD_USERNAME="<your fordpass username>"
export FORD_PASSWORD="<your fordpass password>"
export VIN="<your vehicle VIN number>"
export GEOCODE_PROVIDER="<a geocode provider>" // this is optional, see https://www.npmjs.com/package/node-geocoder#geocoder-providers-in-alphabetical-order for provider options
export GEOCODE_API_KEY="<a geocode provider api key>" // this is optional

Once you have those thing setup you can issue commands and check the status of your vehicle like this:

node index.js --command=status // returns vehicle status information

node index.js --command=status --locate // returns vehicle status information with address from Geocodio

node index.js --command=start // issues engine start command to the vehicle

node index.js --command=stop // issues engine stop command to the vehicle

node index.js --command=lock // issues door lock command to the vehicle

node index.js --command=unlock // issues door unlock command to the vehicle

Purpose

I created this to enable interoperability between my computer and my car. As is allowed by U.S., Section 103(f) of the Digital Millennium Copyright Act.

ffpass's People

Contributors

avgp avatar d4v3y0rk avatar dependabot[bot] avatar skylerwshaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffpass's Issues

Python version

Hi,

Just wanted to let you know about a simple Python port of this package I've built. It's pretty much a straight port of this package so wanted to thank you for all your efforts, it was super helpful! ๐ŸŽ‰

https://github.com/clarkd/fordpass-python

I'm planning on integrating it with Home Assistant eventually so can track and automate various things, e.g. notify me (or perhaps automatically lock) if I've left the car unlocked for longer than X minutes, or let me know my windows have been left open etc. ๐Ÿ‘

Cheers,

Dave

Handle failed start

The command status api returns several different codes depending on what is going on with the command.

  • 552 - This code is returned when the command is in progress
  • 411 - this code is returned when the command has failed to execute on the vehicle (for example if the vehicle does not have cell service)
  • 200 - this is the success code (it might actually be 202 I can't remember off the top of my head)

Need to handle the failure case.

Getting started help

Thanks so much for developing this. It would be great if you could enhance the readme to help us n00bs get started running this on AWS Lambda and querying with a Siri shortcut. Thanks!

EDIT: For anyone else looking, I was able to get this running in AWS and can make Siri requests. Took some legwork though, and is probably sloppy, but works for what I need it. I'll try to publish a writeup when I get some time.

Error.

/home/user/ffpass/node_modules/node-geocoder/lib/geocoder/geocodiogeocoder.js:14
throw new Error(this.constructor.name + ' needs an apiKey');
^

Error: GeocodioGeocoder needs an apiKey
at new GeocodioGeocoder (/home/user/ffpass/node_modules/node-geocoder/lib/geocoder/geocodiogeocoder.js:14:11)
at Object._getGeocoder (/home/user/ffpass/node_modules/node-geocoder/lib/geocoderfactory.js:132:14)
at Object.getGeocoder (/home/user/ffpass/node_modules/node-geocoder/lib/geocoderfactory.js:218:30)
at Object. (/home/user/ffpass/index.js:14:16)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

getting an api key

Need to log out of the app and record and parse the login to see if getting an api key from the backend is possible with a username and password for the app login.

Handling Request Error

Is it possible to test if the credentials are right?

The function car.auth() throw an Error if the credentials are not right and stop the script. (UnhandledPromiseRejectionWarning: Error: Request failed with status code 400)

Battery SoC?

Hi, does ffpass allow reading the battery soc for Ford EVs?

Force refresh from vehicle

The Fordpass app has a command that forces an immediate refresh of the vehicle data. Otherwise the API simply returns the data from the last time the vehicle was active or was issued a command, which can be hours old. For things like polling whether or not the doors are currently locked, it is necessary to get the latest info from the vehicle.

Can you determine the Ford API for refreshing, and either add it to the library or provide it here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.