npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tally/fordconnect-node-red

v1.1.2

Published

Using official FordConnect API to get vehicle details

Downloads

10

Readme

The FordConnect API allows developers to integrate FordConnect features into their applications. With the API, you can access vehicle data, control vehicle functions. This instructions will guide you through the process of using the FordConnect API in your node-red flows. Let's get started!

Prerequisites

  • Ford developer account. Generate clientId/clientSecret pair. More on: https://developer.ford.com/
  • FordPass account. Be sure to complete your account setup before attempting to account link.

Account Link

  • Go to https://fordconnect.cv.ford.com/common/login/?make=F&application_id=AFDC085B-377A-4351-B23E-5E1D35FB3700&client_id=30990062-9618-40e1-a27b-7c6bcb23658a&response_type=code&state=123&redirect_uri=https%3A%2F%2Flocalhost%3A3000&scope=access Make sure that the Client ID in this URL matches the Client ID you received from developer.ford.com
  • Using your account credentials, sign in to FordPass or Lincoln Way
  • On the following screen, select the authorized vehicle in the vehicle list that you want to account link. This account linking process will enable you to retrieve vehicle data and execute remote vehicle commands.
  • After you authorize the data sharing, you will be redirected to the redirect_uri from the above url with the authorization code
  • You will need the value after code= for the generate-tokens node

Obtaining tokens

Generate tokens using auth code and clientId, clientSecret generate tokens flow

Using the API

After tokens are generated and saved to context you can start making requests to the API get vehicles list

Access token is valid for 20 minutes, so if the request is failed with 401 status the token is probably expired. Failed requests with 401 status code will trigger output on the second output (to which get new tokens node can be hooked up). Other errors will be forwarded to the third output get vehicle details

By default the car should send update on ignition status change. Sometimes vehicle info can be outdated, because server will return cached last values. To fetch the relevant data vehicle status request can be made. The request is non-blocking, so to delay output until refresh is completed "Wait for result check box" can be enabled in node config. There's also poll interval and max retry settings. refresh vehicle status

To get relevant data from the car the flow might look like this get updated vehicle data

[!CAUTION] Ford advises to be mindful of how often the vehicle is polled, because it has impact on battery life.