GithubHelp home page GithubHelp logo

d-rickyy-b / node-red-contrib-ffpass Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 44 KB

Node-RED module that enables you to control your Ford car via the FordPass API.

License: MIT License

HTML 48.58% JavaScript 51.42%
nodejs node-red node-red-contrib javascript smartcar smarthome nodered

node-red-contrib-ffpass's Introduction

node-red-contrib-ffpass

npm

Important

Due to several changes in the Ford API and the fact that I don't own a Ford car, I can't maintain this module any longer. If you want to maintain this project, feel free to contact me.

This module enables you to control your Ford car via the FordPass API within Node-RED. You can find the module in the Node-RED library.

Nodes

ffpass_config

You can configure your FordPass login details within this node. It's created automatically in the background as soon as you add one of the following nodes. You configure it by double clicking any of said nodes and editing the "config" parameter. There you can also create new configurations.

ffpass-status

Doesn't take any input. Fetches the status of the given car via the API and outputs it as msg.payload. The status received by the FordPass API is a big json object that contains a lot of data. This could be split into multiple individual nodes in the future to provide easy access to certain fields.

ffpass-command

This node reads a command from the msg.payload dynamically and executes it. The command must be any of lock, unlock, start, stop. The output of the command will be written back to msg.payload. Not everyone is happy with providing the command dynamically, so there are also individual nodes for each command.

ffpass-lock

Doesn't take any input. Runs the lock command and hence locks the car. The output of the command will be written back to msg.payload.

ffpass-unlock

Doesn't take any input. Runs the unlock command and hence unlocks the car. The output of the command will be written back to msg.payload.

ffpass-start

Doesn't take any input. Runs the start command and hence starts the engine. The output of the command will be written back to msg.payload.

ffpass-stop

Doesn't take any input. Runs the lock command and hence stops the engine. The output of the command will be written back to msg.payload.

โš  Important note

This module needs at least Node 14.x to run. Make sure your Node-Red is up to date and runs on a node version >=14.

node-red-contrib-ffpass's People

Contributors

d-rickyy-b avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

node-red-contrib-ffpass's Issues

feature request: command nodes to output success/failure

it would be nice if the command nodes would output a command success/fail response for the command in addition to the status code of the command api request.

My current solution was to create a flow that will make up to 6 status request at 5 second intervals (for 30 second timeout) after the command was issued successfully.
Then check the the status response(s) to verify that the vehicle has responded to the command.

Adapt to new access method

Ford has changed the login method for its API. Since then the contrib has been unusable and only receives the "401" in response to the request.

error 400 and 404

Screenshot 2022-06-24 at 20 15 17

Getting these errors suddenly.. Auth checked in other app on same ip.. working. do you (developer) experience same problems? not sure if i can find some sort of log?

Refactoring: Extract common code into methods

Some code is used several times - might be better to extract it.

try {
var result = await car.issueCommand("unlock")
} catch (err) {
node.warn(err);
this.status({ fill: "red", shape: "ring", text: "Command failed" });
// TODO: Add support for node < 1.0
done(err)
}
this.status({ fill: "green", shape: "dot", text: "'unlock' issued!" });
node.send(JSON.stringify(result));

Still getting 401 and 429 errors

Hi!

I installed the node set directly from github for v 0.1.4. I'm still getting a 429 and 401 errors on status.

Am I doing anything wrong?

Auth says secessfully but..

In the flow the auth says successful but nothing happens. I have debug output but nothing shows
Was there any changes?

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.