node-red-contrib-tfr2cot
v2.0.0
Published
If msg.payload or env.tfrStatesList is a json formatted array of 2 letter U.S. abbreviation for states as a text strings, this node returns a msg.payload as JSON cursor-on-target (CoT) message for use with node-red-contrib-tak node and tcp out node.
Maintainers
Readme
node-red-contrib-tfr2cot
Version 2.0.0 is compatible with the latest api endpoints for calling FAA TFRs (All prior versions are deprecated and will not work due to the changed endpoints)
Requests TFR List for a given state from https://tfr.faa.gov/ and creates cursor-on-target (CoT) polygon messages sent to a Team Awareness Kit (TAK) Server or network
ATAK Screenshots
FAA Website from url in Associated Link field in the TFR / CoT information menu:
SUMMARY
This Node RED sub-flow pulls a list of current Federal Aviation Administration (FAA) Temporary Flight Restrictions (TFRs), and if any exist for the desired / supplied state, it downloads the xml file for each TFR and creates a Team Awareness Kit cursor-on-target (CoT) polygon message and sends it to a TAK Server or TAK network using node-red-contrib-tak and tcp out nodes:
Pre-Requisites
- Node RED installed and continuously running (See Greg Albrecht's video on how to install Node-Red on Windows.
- TAK Network, TAK Server, or WinTAK EUD if running Node-RED on windows.
If using a TAK Server (Optional)
- An open port on your TAK Server using an
x509authorization if you plan to usetls(most secure) - A certificates generated by the TAK Server and the TCP node (See Greg Albrecht's video) or here
If sending to DataSync (Optional)
- You must use the
dataSyncSubscriptionnode with all fields either completed (except for recipientID) and/or configure use the correctmissionApiPortfor your TAK Server (default is8442) - You must add a
http requestnodes to output #2 for both thedataSyncSubscriptionandtfr2cotnodes and ONLY configure the following node properties:Method: select " - set by msg.method"- Check
Enable secure (SSL/TLS) connection, and use exactly the sametlsconfiguration you created or use for yourtcp Outnode that directly follows yournode-red-contrib-taknode output.
- The
propertiesfor thetfr2cotanddataSyncSubscriptionnodes must match (i.e. be identical where they are common to both nodes)
Example tfr2cot / dataSyncSubscribe nodes diagram:
Example http request node configuration:
LIMITATIONS AND SPECIAL CONSIDERATIONS:
- TFRs with multiple areas may only pick one area. Future updates will correct this.
- DATASYNC CONSIDERATIONS:
- Leaving the
Save to DataSyncproperty in thetfr2cotnode unchecked withDataSync / TAK Mission,Sender ID,TAK Server URL,TAK Server API Portconfigured correctly will allow TAK clients / Users that are connected to the TAK Server and currently subscribed to the DataSync mission listed in theDataSync / TAK Missionproperty to receive the CoT messages, however, the CoT messages will NOT be saved to the DataSync Mission. - If the
Save to DataSyncproperty in the tfr2cot node is checked with the other properties correctly filled in, the CoT Message will be saved to the DataSync mission
NOTE: Saving the CoT messages to DataSync may present some challenges:
- The CoT message will currently not be removed when the TFR is no longer active, which will require someone to manually delete old/stale TFRs from the DataSync mission. Future updates may include a TFR check and send an
http putmessage via the TAK Server Mission API to remove TFRs no longer listed at the FAA TFR website. - Updates and changes over time to the DataSync mission will create a log that may be significantly large and present performance issues.
- Leaving the
It is recommended to either:
- set your
TCP Outnode to stream to a port created on a TAK Server with anstcpprotocol and withfiltergroup(s) set to that port to create a TAKChannel, and users may access the feed if by setting theOutGroup in the TAK Server'sAdministrative->Manage Userspage, OR - Stream to a port created on a TAK Server with an
stcpprotocol with the DataSync-related properties in thetfr2cotanddataSyncSubscribenodes correctly configured with theSave to DataSyncproperty in thetfr2cotnode left UNCHECKED.
Either option will require modifying your TAK Server's
/opt/tak/CoreConfig.xmlfile to create anstcpport with or without a tag.
REQUIRED NODES
- INJECT: The
msg.payloadshould be set to a US state abbreviation (e.g. AZ, CA, NY, etc). - node-red-contrib-tak: This node is required to pass the CoT message from this subflow to a TAK Server or EUDs on a network.
- TCP OUT:
- TAK Server: If using TLS, check on the SSL / TLS option and create or edit your TLS Configuration, as needed.
- UDP: This would need to be configured to your vpn settings and requires your Node Red instance to be on the same vpn to multicast to TAK end-user-devices.
- dataSyncSubscription: (only if sending the CoT messages to a DataSync mission is desired).
For more information on how to set up the network and node-red-contrib-tak nodes, see https://node-red-contrib-tak.readthedocs.io/en/latest/
INSTALLATION:
- Node RED Import (3 ways)
- Paste the
./examples/node-red-contrib-tfr2cot_subflow.jsonfile into to Node-RED into the import dialog. - Import by file using the
node-red-contrib-tfr2cot-latest.tgzfrom Releases
- Paste the
- Install using
npm:npm node-red-contrib-tfr2cot - Install in Node-RED admin site using the
Manage Palettemenu option, click on theInstalltab, and search fornode-red-contrib-tfr2cotin the search field, then click on the "Install" button. - Install in Node-RED
License & Copyright
Copyright 2023 CLP Development, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

