You must enable JavaScript
                                                                              

Dashboard Extras 1

Dashboard files

TGID_URL  =  talkgroup_ids.json  by Mark.
https://freedmr.cymru/talkgroups/talkgroup_ids_json.php

This is the FLAG version.
https://freedmr.cymru/talkgroups/talkgroup_ids_flags_json.php

local_subscriber_ids.json      (Not required now, as replaced by user.json below)
local subscribers are only used for additional things for the sysop to add in to FreeDMR dashboards.

*SUBSCRIBER_URL  =  users.json  Updates daily at midnight GMT by Mark. (Users first name, FreeDMR Bridges and Repeaters added)
https://freedmr.cymru/talkgroups/users.json

PEER_URL = https://freedmr.cymru/talkgroups/rptrs.json
This is a dummy file for dashboards that require a download.

Example

# Files and stuff for loading alias files for mapping numbers to names
FILES_PATH = ./
# This files will auto-download
PEER_FILE = rptrs.json
SUBSCRIBER_FILE = subscriber_ids.json
TGID_FILE = talkgroup_ids.json
RELOAD_TIME = 7
PEER_URL = 'https://freedmr.cymru/talkgroups/rptrs.json'
SUBSCRIBER_URL = 'https://freedmr.cymru/talkgroups/users.json'
TGID_URL = 'https://freedmr.cymru/talkgroups/talkgroup_ids_json.php'

*SUBSCRIBER_FILE = subscriber_ids.csv
If your dashboard is by Christian and needs a CSV file, use this one.
SUBSCRIBER_URL = http://freedmr.cymru/talkgroups/local_subscriber_ids.csv

or files by Simon

JSON FILES by Simon

Just a heads-up about the latest update to how JSON files work.

I would recommend this as the most recent ALIAS section:

[ALIASES]
TRY_DOWNLOAD: True
PATH: ./
PEER_FILE: peer_ids.json
SUBSCRIBER_FILE: subscriber_ids.json
TGID_FILE: talkgroup_ids.json
PEER_URL: https://freedmr-lh.gb7fr.org.uk/json/peer_ids.json
SUBSCRIBER_URL: https://freedmr-lh.gb7fr.org.uk/json/subscriber_ids.json
TGID_URL: https://freedmr-lh.gb7fr.org.uk/json/talkgroup_ids.json
LOCAL_SUBSCRIBER_FILE: local_subcriber_ids.json
STALE_DAYS: 1
SUB_MAP_FILE:
SERVER_ID_URL: https://freedmr-lh.gb7fr.org.uk/json/server_ids.tsv
SERVER_ID_FILE: server_ids.tsv
CHECKSUM_URL: https://freedmr-lh.gb7fr.org.uk/file_checksums.json
CHECKSUM_FILE: file_checksums.json




Notice the section about Checksum. 
I added a checksum to ensure file integrity, but the side effect of this is 
that you must download the files from a mirror that actually generates the checksums.

In addition, your docker-compose.yml file should now map the directory for JSON 
files rather than the individual files, like this:

#Write JSON files outside of container
- '/etc/freedmr/json/:/opt/freedmr/json/'

 


Auto update your dashboards.

To create the talkgroup_ids.json and local_subscriber_ids.json  file in your updateTGIDs.sh scripts in HBMon

Version 1

By Jared https://gitlab.hacknix.net/-/snippets/2

Version 2

By Jay, [11/05/2022 23:06] who supplied the updated code below.

#!/bin/bash

# Update Talkgroup ID's

cd /opt/HBMonv2
FILE_NAME1="talkgroup_ids.json"
FETCH_URL1="https://freedmr.cymru/talkgroups/talkgroup_ids_json.php"

OLD_MD51=`md5sum ${FILE_NAME1}`
wget -O ${FILE_NAME1} ${FETCH_URL1}
NEW_MD51=`md5sum ${FILE_NAME1}`

if [ "$NEW_MD51" != "$OLD_MD51" ]
then
echo "TalkGroup ID Update Available!" | mail -s "Subject: DMR TalkGroup IDs" you@xyz.com
fi

# Update Helper Subscriber ID's

cd /opt/HBMonv2
FILE_NAME2="local_subscriber_ids.json"
FETCH_URL2="https://freedmr.cymru/talkgroups/users.json"

OLD_MD52=`md5sum ${FILE_NAME2}`
wget -O ${FILE_NAME2} ${FETCH_URL2}
NEW_MD52=`md5sum ${FILE_NAME2}`

if [ "$NEW_MD52" != "$OLD_MD52" ]
then
echo "Helper ID Update Available!" | mail -s "Subject: DMR Helper IDs" you@xyz.com
fi

# Restart HBMON if conditions apply.

if [ "$NEW_MD51" != "$OLD_MD51" ] || [ "$NEW_MD52" != "$OLD_MD52" ]
then
echo "Applying Updates and restarting HBMon"
#systemctl restart hbmon
fi
echo "Updating Complete!"

 


 

Share this post with your friends.

                           

© 2023 FreeDMR UK         Information and T&C         Site Map



Free counters!