Skip to content

Monitors ThinLine-Radio SQL Database for new talkgroups not seen in 72 hours and sends a webhook to n8n with information.

Notifications You must be signed in to change notification settings

hoosierscanner/TLR-Scripts

Repository files navigation

TLR Helper Suite (ThinLine Radio)

A collection of Python utilities for monitoring Trunk-Recorder and ThinLine Radio instances, designed for deployment on a Debian VPS.

Features

  • Usage Monitor: Tracks AssemblyAI transcription costs and hours against a customizable billing cycle (default: 20th of the month).

  • Activity Monitor: Queries PostgreSQL to detect new Talkgroups and Patches on the system that haven't been active in the last 48 hours.

  • Orchestrator: A master script that manages all timing logic, error handling, and Discord notifications for the suite.

Setup

  • Configure: Copy tlr_config.example.json to tlr_config.json.

  • Credentials: Update tlr_config.json with your PostgreSQL details, Discord Webhook URL, and n8n webhook paths.

  • Dependencies:

pip3 install requests psycopg2-binary

Automation

Instead of managing multiple cron jobs, add this single entry to your crontab -e to let the Orchestrator handle the schedule:

*/5 * * * * /usr/bin/python3 /home/brent/helper-scripts/talkgroup-monitor/tlr_orchestrator.py >> /home/brent/helper-scripts/talkgroup-monitor/orchestrator.log 2>&1

##Suite Components

  • tlr_usage_monitor.py: Handles transcription billing logic.

  • tlr_tg_monitor.py: Monitors for new/rare Talkgroups.

  • tlr_patch_monitor.py: Monitors for new multi-TG patches.

  • tlr_orchestrator.py: The master scheduler and error reporter.

About

Monitors ThinLine-Radio SQL Database for new talkgroups not seen in 72 hours and sends a webhook to n8n with information.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages