Node-RED flow for processing OBDII data from Torque Pro.
Node-RED flow for processing OBDII data from Torque Pro.

Decoding OBDII Torque Data with Node-RED

Torque Pro, a popular OBDII diagnostic app, provides a wealth of real-time vehicle data. Leveraging this data for analysis or integration with smart home systems like OpenHAB requires a bridge. This article outlines how to use Node-RED, a powerful visual programming tool, to receive and process Obdii Torque data, enabling customized logging and visualization.

Setting Up the Torque Pro and Node-RED Connection

The core of this process involves configuring Torque Pro to send data to a Node-RED server. Within Torque Pro, navigate to Settings > Data Logging and Upload. Enable Upload to web server and enter your Node-RED server address in the Webserver URL field. The URL should follow this format: http://your.nodered.server:1880/torque/. Replace your.nodered.server with the actual IP address or hostname of your Node-RED instance.

Crucially, specify the PIDs (Parameter IDs) you want to track under Select what to log. Choosing “All” will transmit every available PID, while selecting specific PIDs allows for targeted data acquisition. This customization helps manage data volume and processing requirements.

Handling OBDII Torque Data in Node-RED

Node-RED simplifies receiving and parsing Torque Pro’s data. An HTTP input node, configured to listen for GET requests at the /torque/ endpoint, acts as the receiver. This node automatically parses the incoming data, making it readily available for processing. A corresponding HTTP response node sends an “OK!” signal back to Torque Pro, confirming successful data transmission.

The received data, typically in JSON format, can be further manipulated using Node-RED’s diverse nodes. Change nodes allow for restructuring and renaming data fields. For example, you can extract specific PIDs like engine speed (RPM), coolant temperature, or throttle position and assign them meaningful topics for easier organization.

Node-RED flow for processing OBDII data from Torque Pro.Node-RED flow for processing OBDII data from Torque Pro.

Visualizing and Storing OBDII Data

Node-RED’s flexibility extends to data visualization and storage. Dashboard nodes provide various gauges, charts, and displays to present OBDII data in a user-friendly format. This enables real-time monitoring of vehicle parameters.

For persistent storage, a database node, such as one for MySQL, can be incorporated into the flow. This allows for logging historical OBDII data for trend analysis or other applications. Alternatively, you can leverage OpenHAB’s logging capabilities if you are integrating with a smart home ecosystem.

Function nodes offer the ability to perform custom calculations or data transformations using JavaScript. For instance, you could convert Celsius temperatures to Fahrenheit or calculate fuel efficiency based on received OBDII parameters. This unlocks deeper insights into vehicle performance.

Conclusion

Using Node-RED as an intermediary for OBDII torque data unlocks powerful possibilities. From simple real-time monitoring to complex data analysis and integration with external systems, Node-RED empowers users to leverage valuable vehicle information. Its visual programming environment simplifies the process, making it accessible even to those without extensive coding experience. By configuring Torque Pro to send data and constructing a tailored Node-RED flow, you can gain valuable insights into your vehicle’s performance.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *