Citizen to CoT
A PyTAK application that pulls incidents from Citizen's API and pushes it to TAK as a CoT Event.
Installation
- Install
pipenvusingpython -m pip install pipenv - Run
python -m pipenv installto install the prerequisites. - Create a
config.iniand adjust the settings to your use-case.
Usage/Setup
Running (as a standalone application)
Run python -m pipenv run python main.py to start the application.
Running (as a service)
- Modify
citizentocot.serviceto the correct working directory, user, and shell script directory. - Copy it to the right directory using
cp citizentocot.service /etc/systemd/system/ - Run
sudo systemctl daemon-reload - Run
sudo systemctl enable citizentocot(if you want to run it at boot, otherwise skip this step) - Run
sudo systemctl start citizentocotto start the service
Example Config
This config connects to a TAK server instance via TLS (using a self-signed cert), pulls data and pushes CoT events every 30 minutes.
config.ini
[citizentocot]
COT_URL = tls://XX.XX.XX.XX:8089
PYTAK_TLS_CLIENT_CERT = private_key.pem
PYTAK_TLS_CLIENT_KEY = private_key.pem
PYTAK_TLS_DONT_VERIFY = true
CITIZEN_API_URL = https://citizen.com/api/incident/trending?lowerLatitude=XX&lowerLongitude=XX&upperLatitude=XX&upperLongitude=XX&fullResponse=true&limit=200
POLL_INTERVAL = 1800On this page
Languages
Python99.3%Shell0.7%
Contributors
Apache License 2.0
Created February 18, 2023
Updated July 3, 2024