Compare commits

...

15 Commits

Author SHA1 Message Date
M0VUB 71c285d50d
Update docker-compose.yml
Fix port ranges ahh!
2023-08-07 01:01:23 +01:00
M0VUB ab94a12e70
Update docker-compose.yml
Map ports for masters outside the container!
2023-08-07 00:57:43 +01:00
M0VUB 7b9fd4bab1
Update playback.cfg
Set parrot logging to console only
2023-08-07 00:25:24 +01:00
M0VUB 2e0e044f2c
Update hblink-SAMPLE.cfg
Set parrot to False by default
2023-08-07 00:23:48 +01:00
M0VUB fd51df90b1
Update playback.cfg
Fix logging paths and add to console
2023-08-06 23:52:23 +01:00
M0VUB c7ebc030f3
Update hblink-SAMPLE.cfg
Update config and fix logging paths
2023-08-06 23:50:29 +01:00
M0VUB 3c4f3b453e
Rename playback-SAMPLE.cfg to playback.cfg
Bring playback cfg into play ;)
2023-08-06 23:00:58 +01:00
M0VUB 37d5a4adc9
Update entrypoint
Typo
2023-08-06 22:42:27 +01:00
M0VUB ee789c8846
Update entrypoint
Change entrypoint to include playback enviroment variable
2023-08-06 22:40:28 +01:00
M0VUB 4cad03f2f5
Update docker-compose.yml
Disable by default =0 enable =1
2023-08-06 22:31:34 +01:00
M0VUB 34e1d3827b
Update docker-compose.yml
Add variable for enabling parrot (if needed)
2023-08-06 22:26:49 +01:00
M0VUB 9ba9de80a1
Update rules_SAMPLE.py
Add playback parrot example stanzas into rules
2023-08-06 22:00:10 +01:00
M0VUB 0f492ac076
Update .gitignore 2023-08-06 21:43:21 +01:00
M0VUB d09273e230
Update hblink-SAMPLE.cfg
Add parrot into configuration stanza & update version
2023-08-06 21:42:03 +01:00
M0VUB 1ae31ab950
Create playback-SAMPLE.cfg
Add sample playback config for the parrot system
2023-08-06 21:36:23 +01:00
6 changed files with 109 additions and 8 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@ __pycache__/
*.so
# Distribution / packaging
.github
.Python
env/
build/

View File

@ -8,8 +8,13 @@ services:
- '/etc/hblink3/rules.py:/opt/hblink3/rules.py'
- '/etc/hblink3/json/:/opt/hblink3/json/'
ports:
# Master Ports (99 Masters)
- '54000-54099:54000-54099/udp'
# MMDVM & OBP Ports
- '62030-62050:62030-62050/udp'
# TCP Port for HBmonitor
- '4321:4321/tcp'
image: 'shaymez/hblink3:latest'
restart: "unless-stopped"
environment:
- 'PARROT_ENABLE=1'

View File

@ -1,4 +1,12 @@
#!/bin/sh
cd /opt/hblink3
python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py
if [ "$PARROT_ENABLE" == 1 ]
then
echo 'Starting HBlink with Parrot.....'
python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py &
python /opt/hblink3/playback.py -c playback.cfg
else
echo 'Starting HBlink.....'
python /opt/hblink3/bridge.py -c hblink.cfg -r rules.py
fi

View File

@ -1,3 +1,4 @@
# HBlink Configuration Version 20230806
# PROGRAM-WIDE PARAMETERS GO HERE
# PATH - working path for files, leave it alone unless you NEED to change it
# PING_TIME - the interval that peers will ping the master, and re-try registraion
@ -64,7 +65,7 @@ TGID_TS2_ACL: PERMIT:ALL
REPORT: True
REPORT_INTERVAL: 60
REPORT_PORT: 4321
REPORT_CLIENTS: 127.0.0.1
REPORT_CLIENTS: *
# SYSTEM LOGGER CONFIGURAITON
@ -84,9 +85,9 @@ REPORT_CLIENTS: 127.0.0.1
# used.
#
[LOGGER]
LOG_FILE: /tmp/hblink.log
LOG_FILE: hblink.log
LOG_HANDLERS: console-timed
LOG_LEVEL: DEBUG
LOG_LEVEL: INFO
LOG_NAME: HBlink
# DOWNLOAD AND IMPORT SUBSCRIBER, PEER and TGID ALIASES
@ -103,7 +104,7 @@ SUBSCRIBER_FILE: subscriber_ids.json
TGID_FILE: talkgroup_ids.json
PEER_URL: https://www.radioid.net/static/rptrs.json
SUBSCRIBER_URL: https://www.radioid.net/static/users.json
STALE_DAYS: 7
STALE_DAYS: 14
# OPENBRIDGE INSTANCES - DUPLICATE SECTION FOR MULTIPLE CONNECTIONS
# OpenBridge is a protocol originall created by DMR+ for connection between an
@ -179,6 +180,38 @@ TGID_TS2_ACL: PERMIT:ALL
#
# ACLs:
# See comments in the GLOBAL stanza
[Parrot]
MODE: PEER
ENABLED: False
LOOSE: True
EXPORT_AMBE: False
IP: 127.0.0.1
PORT: 54098
MASTER_IP: 127.0.0.1
MASTER_PORT: 54100
PASSPHRASE: passw0rd
CALLSIGN: ECHO
RADIO_ID: 9999
RX_FREQ: 434000000
TX_FREQ: 434000000
TX_POWER: 10
COLORCODE: 1
SLOTS: 2
LATITUDE: 33.0000
LONGITUDE: -84.0000
HEIGHT: 75
LOCATION:
DESCRIPTION:
URL:
SOFTWARE_ID: 20230806
PACKAGE_ID: MMDVM_HBlink
GROUP_HANGTIME: 5
OPTIONS:
USE_ACL: False
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL
[REPEATER-1]
MODE: PEER
ENABLED: True
@ -202,7 +235,7 @@ HEIGHT: 75
LOCATION: Anywhere, USA
DESCRIPTION: This is a cool repeater
URL: www.w1abc.org
SOFTWARE_ID: 20170620
SOFTWARE_ID: 20230806
PACKAGE_ID: MMDVM_HBlink
GROUP_HANGTIME: 5
OPTIONS:
@ -234,7 +267,7 @@ HEIGHT: 75
LOCATION: Anywhere, USA
DESCRIPTION: This is a cool repeater
URL: www.w1abc.org
SOFTWARE_ID: 20170620
SOFTWARE_ID: 20230806
PACKAGE_ID: MMDVM_HBlink
GROUP_HANGTIME: 5
XLXMODULE: 4004

47
playback.cfg Normal file
View File

@ -0,0 +1,47 @@
[GLOBAL]
PATH: ./
PING_TIME: 10
MAX_MISSED: 5
USE_ACL: True
REG_ACL: PERMIT:ALL
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL
[REPORTS]
REPORT: False
REPORT_INTERVAL: 10
REPORT_PORT: 4323
REPORT_CLIENTS: *
[LOGGER]
LOG_FILE: parrot.log
LOG_HANDLERS: console-timed
LOG_LEVEL: INFO
LOG_NAME: Parrot
[ALIASES]
TRY_DOWNLOAD: False
PATH: ./
PEER_FILE: peer_ids.json
SUBSCRIBER_FILE: subscriber_ids.json
TGID_FILE: talkgroup_ids.json
PEER_URL: https://www.radioid.net/static/rptrs.json
SUBSCRIBER_URL: https://www.radioid.net/static/users.json
STALE_DAYS: 14
[PARROT]
MODE: MASTER
ENABLED: True
REPEAT: True
MAX_PEERS: 10
EXPORT_AMBE: False
IP: 127.0.0.1
PORT: 54100
PASSPHRASE: passw0rd
GROUP_HANGTIME: 5
USE_ACL: True
REG_ACL: DENY:1
SUB_ACL: DENY:1
TGID_TS1_ACL: DENY:ALL
TGID_TS2_ACL: PERMIT:9999

View File

@ -11,6 +11,7 @@ The first level (e.g. "WORLDWIDE" or "STATEWIDE" in the examples) is the name of
bridge. This is any arbitrary ASCII text string you want to use. Under each conference bridge
definition are the following items -- one line for each HBSystem as defined in the main HBlink
configuration file.
"Parrot" has been added on TG 9999 and an example subset demonstrating playback parrot feature (if enabled)
* SYSTEM - The name of the sytem as listed in the main hblink configuration file (e.g. hblink.cfg)
This MUST be the exact same name as in the main config file!!!
@ -33,6 +34,12 @@ configuration file.
'''
BRIDGES = {
'9999 Parrot': [
{'SYSTEM': 'Hotspot-1', 'TS': 2, 'TGID': 9999, 'ACTIVE': True, 'TIMEOUT': 0, 'TO_TYPE': 'NONE', 'ON': [9999], 'OFF': [], 'RESET': []},
{'SYSTEM': 'Hotspot-2', 'TS': 2, 'TGID': 9999, 'ACTIVE': True, 'TIMEOUT': 0, 'TO_TYPE': 'NONE', 'ON': [9999], 'OFF': [], 'RESET': []},
{'SYSTEM': 'Parrot', 'TS': 2, 'TGID': 9999, 'ACTIVE': True, 'TIMEOUT': 0, 'TO_TYPE': 'NONE', 'ON': [], 'OFF': [], 'RESET': []},
],
'WORLDWIDE': [
{'SYSTEM': 'MASTER-1', 'TS': 1, 'TGID': 1, 'ACTIVE': True, 'TIMEOUT': 2, 'TO_TYPE': 'ON', 'ON': [2,], 'OFF': [9,10], 'RESET': []},
{'SYSTEM': 'CLIENT-1', 'TS': 1, 'TGID': 3100, 'ACTIVE': True, 'TIMEOUT': 2, 'TO_TYPE': 'ON', 'ON': [2,], 'OFF': [9,10], 'RESET': []},