From d0608a99f11da7c5f85b22a269288c18cd0b83c8 Mon Sep 17 00:00:00 2001 From: Jigish Gohil Date: Wed, 27 Mar 2024 19:07:40 +0530 Subject: [PATCH] Update README.md --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d51d2a1..f2f721e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,46 @@ -# meshtastic2skylines -Forward position to skylines to live track your flying machine on skylines, flyxc.app, puretrack.io etc +# Meshtastic2skylines Node-RED Flow + +## Overview + +This Node-RED flow is designed to forward position data to [https://skylines.aero](https://skylines.aero) using data from an MQTT broker. It includes functionalities to ingest data from MQTT, decode the incoming packets, deduplicate packets, and send position measurements to Skylines via HTTP POST requests. + +## Subflows + +### Ingest from MQTT +This subflow handles the ingestion of data from MQTT. It subscribes to all topics ("#") with a quality of service (QoS) of 2. If you do not want to forward data to mqtt.meshtastic.org, disable the connection from the MQTT In node to the MQTT Out node. + +### Measurement: Position +This subflow is responsible for generating position measurements from the decoded packet data. It converts latitude, longitude, altitude, time, satellites in view, ground speed, and ground track into a structured payload suitable for storage or further processing. + +### Filtercrap (Function) +This function node filters out invalid messages and adds types to valid messages. It checks for valid latitude and longitude values in the payload. + +### Generate Position Measurement (Function) +This function node generates position measurements from the decoded packet payload. It calculates session IDs and prepares data for HTTP POST requests to Skylines. + +### HTTP Request (HTTP Request) +This node sends HTTP POST requests to https://skylines.aero with the position measurement data. + +### Debug Nodes +Debug nodes are included for debugging purposes. They can be activated or deactivated as needed. + +## Additional Information +- **mqtt in and out**: Modify to point to your mqtt server in Ingest subflow. Disable link to mqtt out if you do not wish to forward to mqtt.meshtastic.org. +- **Skylines Integration**: Ensure that the user mapping is correctly set in the "toskylines" function to map user IDs to session IDs for Skylines integration. Update the `userConfig` object with your own device IDs and Skylines tracking IDs. +```javascript +// Define a configuration object mapping user IDs to session IDs +var userConfig = { + "!YOURDEVICE1": "SLTRACKINGID1", + "!YOURDEVICE2": "SLTRACKINGID2" +}; +``` + +For more information about Skylines, visit [Skylines GitHub Repository](https://github.com/skylines/aero). + +**Dependencies**: This flow utilizes the Meshtastic Node-RED contrib nodes. For installation and usage instructions, refer to [Meshtastic Node-RED contrib](https://flows.nodered.org/node/@meshtastic/node-red-contrib-meshtastic) on Node-RED flows. + +**Based on**: This flow is based on the Meshtastic Node-RED contrib nodes. For more information and updates, see [Meshtastic Node-RED contrib GitHub repository](https://github.com/scruplelesswizard/meshtastic-node-red). + +Ensure all necessary dependencies are installed and configured properly in your Node-RED environment. + +**Acknowledgement**: Special thanks to ChatGPT for being fantastic!