commit
674dd32926
@ -1,113 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# CONTROL.sh
|
||||
# A Control Script for SkywarnPlus v0.1.0
|
||||
# by Mason Nelson (N5LSN/WRKF394)
|
||||
#
|
||||
#
|
||||
# This script allows you to change the value of specific keys in the SkywarnPlus config.ini file.
|
||||
# It's designed to enable or disable certain features of SkywarnPlus from the command line.
|
||||
# It is case-insensitive, accepting both upper and lower case parameters.
|
||||
#
|
||||
# Usage: ./CONTROL.sh <key> <value>
|
||||
# Example: ./CONTROL.sh sayalert false
|
||||
# This will set 'SayAlert' to 'False' in the config.ini file.
|
||||
#
|
||||
# Supported keys:
|
||||
# - enable: Enable or disable SkywarnPlus entirely. (Section: SKYWARNPLUS)
|
||||
# - sayalert: Enable or disable instant alerting when weather alerts change. (Section: Alerting)
|
||||
# - sayallclear: Enable or disable instant alerting when weather alerts are cleared. (Section: Alerting)
|
||||
# - tailmessage: Enable or disable building of tail message. (Section: Tailmessage)
|
||||
# - courtesytone: Enable or disable automatic courtesy tones. (Section: CourtesyTones)
|
||||
#
|
||||
# Supported values:
|
||||
# - true: Enable the feature.
|
||||
# - false: Disable the feature.
|
||||
# - toggle: Toggle the feature.
|
||||
#
|
||||
# All changes will be made in the config.ini file located in the same directory as the script.
|
||||
|
||||
# First, we need to check if the correct number of arguments are passed
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Incorrect number of arguments. Please provide the key and the new value."
|
||||
echo "Usage: $0 <key> <value>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the directory of the script
|
||||
SCRIPT_DIR=$(dirname $(readlink -f $0))
|
||||
CONFIG_FILE="${SCRIPT_DIR}/config.ini"
|
||||
|
||||
# Convert the input key into lowercase
|
||||
KEY=$(echo "$1" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# Convert the first character of the value to uppercase
|
||||
VALUE=$(echo "$2" | awk '{for(i=1;i<=NF;i++)sub(/./,toupper(substr($i,1,1)),$i)}1')
|
||||
|
||||
# Make sure the provided value is either 'True' or 'False' or 'Toggle'
|
||||
if [[ "${VALUE^^}" != "TRUE" && "${VALUE^^}" != "FALSE" && "${VALUE^^}" != "TOGGLE" ]]; then
|
||||
echo "Invalid value. Please provide either 'true' or 'false' or 'toggle'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Define the command-line arguments and their corresponding keys in the configuration file
|
||||
declare -A ARGUMENTS=( ["enable"]="Enable" ["sayalert"]="SayAlert" ["sayallclear"]="SayAllClear" ["tailmessage"]="Enable" ["courtesytone"]="Enable")
|
||||
|
||||
# Define the sections in the configuration file that each key belongs to
|
||||
declare -A SECTIONS=( ["enable"]="SKYWARNPLUS" ["sayalert"]="Alerting" ["sayallclear"]="Alerting" ["tailmessage"]="Tailmessage" ["courtesytone"]="CourtesyTones")
|
||||
|
||||
# Define the audio files associated with each key
|
||||
declare -A AUDIO_FILES_ENABLED=( ["enable"]="SWP85.wav" ["sayalert"]="SWP87.wav" ["sayallclear"]="SWP89.wav" ["tailmessage"]="SWP91.wav" ["courtesytone"]="SWP93.wav")
|
||||
|
||||
declare -A AUDIO_FILES_DISABLED=( ["enable"]="SWP86.wav" ["sayalert"]="SWP88.wav" ["sayallclear"]="SWP90.wav" ["tailmessage"]="SWP92.wav" ["courtesytone"]="SWP94.wav")
|
||||
|
||||
# Read the node number and path to SOUNDS directory from the config.ini
|
||||
NODES=$(awk -F " = " '/^Nodes/ {print $2}' "${SCRIPT_DIR}/config.ini" | tr -d ' ' | tr ',' '\n')
|
||||
|
||||
# Check if the input key is valid
|
||||
if [[ ${ARGUMENTS[$KEY]+_} ]]; then
|
||||
# Get the corresponding key in the configuration file
|
||||
CONFIG_KEY=${ARGUMENTS[$KEY]}
|
||||
|
||||
# Get the section that the key belongs to
|
||||
SECTION=${SECTIONS[$KEY]}
|
||||
|
||||
if [[ "${VALUE^^}" = "TOGGLE" ]]; then
|
||||
CONFIG_VALUE=$(awk -F "=" -v section="$SECTION" -v key="$KEY" '
|
||||
BEGIN {RS=";"; FS="="}
|
||||
$0 ~ "\\[" section "\\]" {flag=1}
|
||||
flag && $1 ~ key {gsub(/ /, "", $2); print toupper($2); exit}
|
||||
$0 ~ "\\[" && $0 !~ "\\[" section "\\]" {flag=0}' "$CONFIG_FILE")
|
||||
|
||||
# Remove leading and trailing whitespace
|
||||
CURRENT_VALUE=$(echo $CONFIG_VALUE | xargs)
|
||||
|
||||
if [ "$CURRENT_VALUE" == "TRUE" ]; then
|
||||
NEW_VALUE="False"
|
||||
elif [ "$CURRENT_VALUE" == "FALSE" ]; then
|
||||
NEW_VALUE="True"
|
||||
else
|
||||
echo "Could not determine current value. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
VALUE=$NEW_VALUE
|
||||
fi
|
||||
|
||||
# Update the value of the key in the configuration file
|
||||
sed -i "/^\[${SECTION}\]/,/^\[/{s/^${CONFIG_KEY} = .*/${CONFIG_KEY} = ${VALUE}/}" "${SCRIPT_DIR}/config.ini"
|
||||
|
||||
# Get the correct audio file based on the new value
|
||||
if [ "$VALUE" = "True" ]; then
|
||||
AUDIO_FILE=${AUDIO_FILES_ENABLED[$KEY]}
|
||||
else
|
||||
AUDIO_FILE=${AUDIO_FILES_DISABLED[$KEY]}
|
||||
fi
|
||||
|
||||
# Play the corresponding audio message on all nodes
|
||||
for NODE in $NODES; do
|
||||
/usr/sbin/asterisk -rx "rpt localplay ${NODE} ${SCRIPT_DIR}/SOUNDS/ALERTS/${AUDIO_FILE%.*}"
|
||||
done
|
||||
else
|
||||
echo "The provided key does not match any configurable item."
|
||||
exit 1
|
||||
fi
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,81 @@
|
||||
#!/usr/bin/python3
|
||||
# SkyControl.py
|
||||
# A Control Script for SkywarnPlus v0.2.0
|
||||
# by Mason Nelson (N5LSN/WRKF394)
|
||||
#
|
||||
# This script allows you to change the value of specific keys in the SkywarnPlus config.yaml file.
|
||||
# It's designed to enable or disable certain features of SkywarnPlus from the command line.
|
||||
# It is case-insensitive, accepting both upper and lower case parameters.
|
||||
#
|
||||
# Usage: python3 SkyControl.py <key> <value>
|
||||
# Example: python3 SkyControl.py sayalert false
|
||||
# This will set 'SayAlert' to 'False' in the config.yaml file.
|
||||
|
||||
import sys
|
||||
import yaml
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
# Define valid keys and corresponding audio files
|
||||
VALID_KEYS = {
|
||||
"enable": {"key": "Enable", "section": "SKYWARNPLUS", "true_file": "SWP85.wav", "false_file": "SWP86.wav"},
|
||||
"sayalert": {"key": "SayAlert", "section": "Alerting", "true_file": "SWP87.wav", "false_file": "SWP88.wav"},
|
||||
"sayallclear": {"key": "SayAllClear", "section": "Alerting", "true_file": "SWP89.wav", "false_file": "SWP90.wav"},
|
||||
"tailmessage": {"key": "Enable", "section": "Tailmessage", "true_file": "SWP91.wav", "false_file": "SWP92.wav"},
|
||||
"courtesytone": {"key": "Enable", "section": "CourtesyTones", "true_file": "SWP93.wav", "false_file": "SWP94.wav"},
|
||||
"alertscript": {"key": "Enable", "section": "AlertScript", "true_file": "SWP81.wav", "false_file": "SWP82.wav"},
|
||||
"idchange": {"key": "Enable", "section": "IDChange", "true_file": "SWP83.wav", "false_file": "SWP84.wav"},
|
||||
}
|
||||
|
||||
# Get the directory of the script
|
||||
SCRIPT_DIR = Path(__file__).parent.absolute()
|
||||
|
||||
# Get the configuration file
|
||||
CONFIG_FILE = SCRIPT_DIR / "config.yaml"
|
||||
|
||||
# Check if the correct number of arguments are passed
|
||||
if len(sys.argv) != 3:
|
||||
print("Incorrect number of arguments. Please provide the key and the new value.")
|
||||
print("Usage: python3 {} <key> <value>".format(sys.argv[0]))
|
||||
sys.exit(1)
|
||||
|
||||
# The input key and value
|
||||
key, value = sys.argv[1:3]
|
||||
|
||||
# Make sure the provided key is valid
|
||||
if key not in VALID_KEYS:
|
||||
print("The provided key does not match any configurable item.")
|
||||
sys.exit(1)
|
||||
|
||||
# Make sure the provided value is either 'true', 'false' or 'toggle'
|
||||
if value not in ['true', 'false', 'toggle']:
|
||||
print("Invalid value. Please provide either 'true' or 'false' or 'toggle'.")
|
||||
sys.exit(1)
|
||||
|
||||
# Convert the input value to boolean if not 'toggle'
|
||||
if value != 'toggle':
|
||||
value = value.lower() == 'true'
|
||||
|
||||
# Load the config file
|
||||
with open(str(CONFIG_FILE), 'r') as f:
|
||||
config = yaml.safe_load(f)
|
||||
|
||||
# Check if toggle is required
|
||||
if value == 'toggle':
|
||||
current_value = config[VALID_KEYS[key]['section']][VALID_KEYS[key]['key']]
|
||||
value = not current_value
|
||||
|
||||
# Update the key in the config
|
||||
config[VALID_KEYS[key]['section']][VALID_KEYS[key]['key']] = value
|
||||
|
||||
# Save the updated config back to the file
|
||||
with open(str(CONFIG_FILE), 'w') as f:
|
||||
yaml.dump(config, f)
|
||||
|
||||
# Get the correct audio file based on the new value
|
||||
audio_file = VALID_KEYS[key]['true_file'] if value else VALID_KEYS[key]['false_file']
|
||||
|
||||
# Play the corresponding audio message on all nodes
|
||||
nodes = config['Asterisk']['Nodes']
|
||||
for node in nodes:
|
||||
subprocess.run(['/usr/sbin/asterisk', '-rx', 'rpt localplay {} {}/SOUNDS/ALERTS/{}'.format(node, SCRIPT_DIR, audio_file.rsplit(".", 1)[0])])
|
||||
@ -1,176 +0,0 @@
|
||||
; SkywarnPlus v0.1.0 Configuration File
|
||||
; by Mason Nelson (N5LSN/WRKF394)
|
||||
; Please update this file according to your setup and preferences
|
||||
[SKYWARNPLUS]
|
||||
; Completely enable/disable SkywarnPlus
|
||||
Enable = True
|
||||
|
||||
; Asterisk Settings
|
||||
[Asterisk]
|
||||
; Comma separated list of node numbers to broadcast alerts on
|
||||
; Example: Nodes = 1998, 1999
|
||||
Nodes =
|
||||
|
||||
; Alerting settings
|
||||
[Alerting]
|
||||
; List of county codes to pull data for.
|
||||
; FIND YOUR COUNTY CODE(S) at https://alerts.weather.gov/
|
||||
; DO NOT USE ZONE CODES OR YOU WILL MISS ALERTS
|
||||
; See README.md for more information
|
||||
; Example: CountyCodes = ARC121,ARC021,ARC139,ARC027
|
||||
CountyCodes =
|
||||
|
||||
; Enable instant alerting when weather alerts change
|
||||
; Either True or False
|
||||
SayAlert = True
|
||||
|
||||
; Enable instant alerting when weather alerts are cleared
|
||||
; Either True or False
|
||||
SayAllClear = True
|
||||
|
||||
; Specify an optional maximum number of alerts to be processed.
|
||||
; SkywarnPlus will retrieve all local alerts from the NWS API
|
||||
; and order them by level of severity. This setting will cause
|
||||
; SkywarnPlus to only process the N most severe alerts.
|
||||
; e.g. If the alerts in your area are...
|
||||
; [Tornado Warning, Severe Thunderstorm Warning, Flood Watch, Special Weather Statement],
|
||||
; and MaxAlerts = 2, then SkywarnPlus will only process the Tornado Warning and Severe Thunderstorm Warning.
|
||||
; Example: MaxAlerts = 3
|
||||
;MaxAlerts =
|
||||
|
||||
; Optional alternate path to the directory where sound files are stored
|
||||
; Default is SkywarnPlus/SOUNDS
|
||||
; Example: SoundsPath = /home/repeater/
|
||||
;SoundsPath =
|
||||
|
||||
; Blocking settings
|
||||
[Blocking]
|
||||
; GLOBAL BLOCKING - These alerts will be completely ignored and filtered out of the entire SkywarnPlus workflow
|
||||
; CASE SENSITIVE list of events to ignore, comma separated. Wildcards can be used, e.g. *Statement, *Advisory
|
||||
; Example: GlobalBlockedEvents = *Statement, *Advisory
|
||||
GlobalBlockedEvents =
|
||||
|
||||
; SayAlert Blocking
|
||||
; These alerts will be blocked from being spoken when they are received
|
||||
; These alerts will still be added to the tailmessage
|
||||
; CASE SENSITIVE list of events to ignore, comma separated.
|
||||
; Example: SayAlertBlockedEvents = *Statement, *Advisory
|
||||
SayAlertBlockedEvents =
|
||||
|
||||
; Tailmessage Blocking
|
||||
; These alerts will be blocked from being added to the tailmessage
|
||||
; These alerts will still be spoken when they are received
|
||||
; CASE SENSITIVE list of events to ignore, comma separated.
|
||||
; Example: TailmessageBlockedEvents = *Statement, *Advisory
|
||||
TailmessageBlockedEvents =
|
||||
|
||||
; Tail message settings
|
||||
[Tailmessage]
|
||||
; REQUIRES SETUP IN RPT.CONF FIRST
|
||||
; REFER TO README.MD FOR MORE INFO
|
||||
; Enable building of tail message
|
||||
; Either True or False
|
||||
Enable = False
|
||||
|
||||
; Optional alternate path & filename where tail message should be saved
|
||||
; Default is SkywarnPlus/SOUNDS/wx-tail.wav
|
||||
; Example: TailmessagePath = /home/repeater/wx-tail.wav
|
||||
;TailmessagePath =
|
||||
|
||||
; Courtesy tone settings
|
||||
[CourtesyTones]
|
||||
; REQUIRES SETUP IN RPT.CONF FIRST
|
||||
; REFER TO README.MD FOR MORE INFO
|
||||
; Enable Automatic Courtesy Tone changing
|
||||
; Either True or False
|
||||
Enable = False
|
||||
|
||||
; Optional alternate directory where tone files are located
|
||||
; Default is SkywarnPlus/SOUNDS/TONES
|
||||
; Example: ToneDir = /home/repeater/TONES
|
||||
;ToneDir =
|
||||
|
||||
; Sound file to use for normal local courtesy tone
|
||||
; Example: LocalCT = BOOP.ulaw
|
||||
LocalCT = BOOP.ulaw
|
||||
|
||||
; Sound file to use for normal link courtesy tone
|
||||
; Example: LinkCT = BEEP.ulaw
|
||||
LinkCT = BEEP.ulaw
|
||||
|
||||
; Sound file to use for weather courtesy tone (local and link)
|
||||
; Example: WXCT = WX-CT.ulaw
|
||||
WXCT = WX-CT.ulaw
|
||||
|
||||
; Sound file rpt.conf is looking for as local courtesy tone
|
||||
; Example: RptLocalCT = CT-LOCAL.ulaw
|
||||
RptLocalCT = CT-LOCAL.ulaw
|
||||
|
||||
; Sound file rpt.conf is looking for as link courtesy tone
|
||||
; Example: RptLinkCT = CT-LINK.ulaw
|
||||
RptLinkCT = CT-LINK.ulaw
|
||||
|
||||
; CASE SENSITIVE, comma & newline separated list of alerts that trigger the WX courtesy tone
|
||||
CTAlerts = Hurricane Force Wind Warning,
|
||||
Severe Thunderstorm Warning,
|
||||
Tropical Storm Warning,
|
||||
Coastal Flood Warning,
|
||||
Winter Storm Warning,
|
||||
Thunderstorm Warning,
|
||||
Extreme Wind Warning,
|
||||
Storm Surge Warning,
|
||||
Dust Storm Warning,
|
||||
Avalanche Warning,
|
||||
Ice Storm Warning,
|
||||
Hurricane Warning,
|
||||
Blizzard Warning,
|
||||
Tornado Warning,
|
||||
Tornado Watch
|
||||
|
||||
; Pushover settings
|
||||
; Pushover is a free notification service that SkywarnPlus can use to send alerts
|
||||
; to your phone or other devices. Visit https://pushover.net/ to sign up for free
|
||||
[Pushover]
|
||||
; Enable Pushover integration
|
||||
; Either True or False
|
||||
Enable = False
|
||||
|
||||
; Your Pushover User Key
|
||||
UserKey =
|
||||
|
||||
; Your Pushover API Token
|
||||
APIToken =
|
||||
|
||||
; Enable more verbose Pushover messaging
|
||||
; Either True or False
|
||||
Debug = False
|
||||
|
||||
; Logging Options
|
||||
[Logging]
|
||||
; Enable more verbose logging
|
||||
; Either True or False
|
||||
Debug = False
|
||||
|
||||
; Optional alternate log file path
|
||||
; Default is /tmp/Skywarnplus/SkywarnPlus.log
|
||||
; Example: LogPath = /path/to/log/file
|
||||
;LogPath =
|
||||
|
||||
; Developer options
|
||||
[DEV]
|
||||
; Delete cached data on startup
|
||||
; Either True or False
|
||||
CLEANSLATE = False
|
||||
|
||||
; Optional alternate TMP directory
|
||||
; Default is /tmp/SkywarnPlus
|
||||
; Example: TmpDir = /home/repeater/tmp/SkywarnPlus
|
||||
;TmpDir = /tmp/SkywarnPlus
|
||||
|
||||
; Enable to inject the below list of test alerts instead of calling the NWS API
|
||||
INJECT = False
|
||||
|
||||
; CASE SENSITIVE, comma & newline separated list of alerts to inject
|
||||
INJECTALERTS = Tornado Warning,
|
||||
Tornado Watch,
|
||||
Severe Thunderstorm Warning
|
||||
@ -0,0 +1,257 @@
|
||||
# SkywarnPlus v0.2.0 Configuration File
|
||||
# Author: Mason Nelson (N5LSN/WRKF394)
|
||||
# Please edit this file according to your specific requirements.
|
||||
#
|
||||
# This config file is structured YAML. Please be sure to maintain the structure when editing.
|
||||
# YAML is very picky about indentation. Use spaces, not tabs.
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
SKYWARNPLUS:
|
||||
# Toggle the entire SkywarnPlus operation.
|
||||
# Set to 'True' to activate or 'False' to disable.
|
||||
# Example: Enable: true
|
||||
Enable: true
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
Asterisk:
|
||||
# List of node numbers for broadcasting alerts. Multiple nodes are specified as a list.
|
||||
# Example:
|
||||
# Nodes:
|
||||
# - 1998
|
||||
# - 1999
|
||||
Nodes:
|
||||
- YOUR_NODE_NUMBER_HERE
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
Alerting:
|
||||
# Specify the county codes for which you want to pull weather data.
|
||||
# Find your county codes at https://alerts.weather.gov/.
|
||||
# Make sure to use county codes ONLY, NOT zone codes, otherwise you might miss out on alerts.
|
||||
# Example:
|
||||
# CountyCodes:
|
||||
# - ARC121
|
||||
# - ARC021
|
||||
CountyCodes:
|
||||
- YOUR_COUNTY_CODE_HERE
|
||||
# Enable instant voice announcement when new weather alerts are issued.
|
||||
# Set to 'True' for enabling or 'False' for disabling.
|
||||
# Example: SayAlert: true
|
||||
SayAlert: true
|
||||
# Enable instant voice announcement when weather alerts are cleared.
|
||||
# Set to 'True' for enabling or 'False' for disabling.
|
||||
# Example: SayAllClear: true
|
||||
SayAllClear: true
|
||||
# Limit the maximum number of alerts to process in case of multiple alerts.
|
||||
# SkywarnPlus fetches all alerts, orders them by severity, and processes only the 'n' most severe alerts, where 'n' is the MaxAlerts value.
|
||||
# MaxAlerts:
|
||||
# Specify an alternative path to the directory where sound files are located.
|
||||
# Default is SkywarnPlus/SOUNDS.
|
||||
# SoundsPath:
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
Blocking:
|
||||
# List of globally blocked events. These alerts are ignored across the entire SkywarnPlus operation.
|
||||
# Use a case-sensitive list. Wildcards can be used.
|
||||
# Example:
|
||||
# GlobalBlockedEvents:
|
||||
# - Flood Watch
|
||||
# - *Statement
|
||||
# - *Advisory
|
||||
GlobalBlockedEvents:
|
||||
# List of events blocked from being announced when received. These alerts will still be added to the tail message.
|
||||
# Use a case-sensitive list.
|
||||
SayAlertBlockedEvents:
|
||||
# List of events blocked from being added to the tail message. These alerts will still be announced when received.
|
||||
# Use a case-sensitive list.
|
||||
TailmessageBlockedEvents:
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
Tailmessage:
|
||||
# Configuration for the tail message functionality. Requires initial setup in RPT.CONF.
|
||||
# Set 'Enable' to 'True' for enabling or 'False' for disabling.
|
||||
Enable: false
|
||||
# Specify an alternative path and filename for saving the tail message.
|
||||
# Default is SkywarnPlus/SOUNDS/wx-tail.wav.
|
||||
# TailmessagePath:
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
CourtesyTones:
|
||||
# Configuration for the Courtesy Tones. Requires initial setup in RPT.CONF.
|
||||
# Set 'Enable' to 'True' for enabling or 'False' for disabling.
|
||||
Enable: false
|
||||
# Specify an alternative directory where tone files are located.
|
||||
# Default is SkywarnPlus/SOUNDS/TONES.
|
||||
# ToneDir:
|
||||
# Define the sound files for various types of courtesy tones.
|
||||
Tones:
|
||||
# Normal local courtesy tone.
|
||||
LocalCT: BOOP.ulaw
|
||||
# Normal link courtesy tone.
|
||||
LinkCT: BEEP.ulaw
|
||||
# Weather courtesy tone (both local and link).
|
||||
WXCT: WX-CT.ulaw
|
||||
# rpt.conf file's local courtesy tone.
|
||||
RptLocalCT: CT-LOCAL.ulaw
|
||||
# rpt.conf file's link courtesy tone.
|
||||
RptLinkCT: CT-LINK.ulaw
|
||||
# Define the alerts that trigger the weather courtesy tone.
|
||||
# Use a case-sensitive list. One alert per line for better readability.
|
||||
CTAlerts:
|
||||
- Hurricane Force Wind Warning
|
||||
- Severe Thunderstorm Warning
|
||||
- Tropical Storm Warning
|
||||
- Coastal Flood Warning
|
||||
- Winter Storm Warning
|
||||
- Thunderstorm Warning
|
||||
- Extreme Wind Warning
|
||||
- Storm Surge Warning
|
||||
- Dust Storm Warning
|
||||
- Avalanche Warning
|
||||
- Ice Storm Warning
|
||||
- Hurricane Warning
|
||||
- Blizzard Warning
|
||||
- Tornado Warning
|
||||
- Tornado Watch
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
IDChange:
|
||||
# Configuration for Automatic ID Changing. Requires initial setup in RPT.CONF and manual creation of audio files.
|
||||
Enable: false
|
||||
# Specify an alternative directory where ID files are located.
|
||||
# Default is SkywarnPlus/SOUNDS/ID.
|
||||
# IDDir:
|
||||
# Define the sound files for normal ID and weather ID.
|
||||
IDs:
|
||||
NormalID: ID.ulaw
|
||||
WXID: WXID.ulaw
|
||||
# Define the sound file rpt.conf is looking for as normal ID.
|
||||
RptID: RPTID.ulaw
|
||||
# Define the alerts that trigger the weather ID.
|
||||
# Use a case-sensitive list. One alert per line for better readability.
|
||||
IDAlerts:
|
||||
- Hurricane Force Wind Warning
|
||||
- Severe Thunderstorm Warning
|
||||
- Tropical Storm Warning
|
||||
- Coastal Flood Warning
|
||||
- Winter Storm Warning
|
||||
- Thunderstorm Warning
|
||||
- Extreme Wind Warning
|
||||
- Storm Surge Warning
|
||||
- Dust Storm Warning
|
||||
- Avalanche Warning
|
||||
- Ice Storm Warning
|
||||
- Hurricane Warning
|
||||
- Blizzard Warning
|
||||
- Tornado Warning
|
||||
- Tornado Watch
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
AlertScript:
|
||||
# Completely enable/disable AlertScript
|
||||
Enable: false
|
||||
Mappings:
|
||||
# Define the mapping of alerts to either DTMF commands or bash scripts here.
|
||||
# Wildcards (*) can be used in the ALERTS for broader matches.
|
||||
# Examples:
|
||||
#
|
||||
# This entry will execute the bash command 'asterisk -rx "rpt fun 1999 *123*456*789"'
|
||||
# when the alerts "Tornado Warning" AND "Tornado Watch" are detected.
|
||||
#
|
||||
# - Type: DTMF
|
||||
# Nodes:
|
||||
# - 1999
|
||||
# Commands:
|
||||
# - '*123*456*789'
|
||||
# Triggers:
|
||||
# - Tornado Warning
|
||||
# - Tornado Watch
|
||||
# Match: ALL
|
||||
#
|
||||
# This entry will execute the bash command '/home/repeater/testscript.sh'
|
||||
# and the bash command '/home/repeater/saytime.sh' when an alert whose
|
||||
# title ends with "Statement" is detected.
|
||||
#
|
||||
# - Type: BASH
|
||||
# Commands:
|
||||
# - '/home/repeater/testscript.sh'
|
||||
# - '/home/repeater/saytime.sh'
|
||||
# Triggers:
|
||||
# - *Statement
|
||||
#
|
||||
# This entry will execute the bash command 'asterisk -rx "rpt fun 1998 *123*456*789"'
|
||||
# and the bash command 'asterisk -rx "rpt fun 1999 *123*456*789"' when an alert
|
||||
# titled "Tornado Warning" OR "Tornado Watch" is detected.
|
||||
#
|
||||
# - Type: DTMF
|
||||
# Nodes:
|
||||
# - 1998
|
||||
# - 1999
|
||||
# Commands:
|
||||
# - '*123*456*789'
|
||||
# Triggers:
|
||||
# - Tornado Warning
|
||||
# - Tornado Watch
|
||||
#
|
||||
# This entry will execute the bash command 'asterisk -rx "rpt fun 1999 *123*456*789"'
|
||||
# and the bash command 'asterisk -rx "rpt fun 1999 *987*654*321"'
|
||||
# when an alert titled "Tornado Warning" OR "Tornado Watch" is detected.
|
||||
#
|
||||
# - Type: DTMF
|
||||
# Nodes:
|
||||
# - 1999
|
||||
# Commands:
|
||||
# - '*123*456*789'
|
||||
# - '*987*654*321'
|
||||
# Triggers:
|
||||
# - Tornado Warning
|
||||
# - Tornado Watch
|
||||
# Match: ANY
|
||||
#
|
||||
- Type: BASH
|
||||
Commands:
|
||||
- 'echo "Tornado Warning detected!"'
|
||||
Triggers:
|
||||
- Tornado Warning
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
Pushover:
|
||||
# Configuration for Pushover integration. Pushover is a free notification service. Register at https://pushover.net/.
|
||||
Enable: false
|
||||
# Provide your user key obtained from Pushover.
|
||||
UserKey:
|
||||
# Provide the API token obtained from Pushover.
|
||||
APIToken:
|
||||
# Enable verbose messaging
|
||||
Debug: false
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
Logging:
|
||||
# Enable verbose logging
|
||||
Debug: false
|
||||
# Specify an alternative log file path.
|
||||
# LogPath:
|
||||
|
||||
################################################################################################################################
|
||||
|
||||
DEV:
|
||||
# Delete cached data on startup
|
||||
CLEANSLATE: false
|
||||
# Specify the TMP directory.
|
||||
TmpDir: /tmp/SkywarnPlus
|
||||
# Enable test alert injection instead of calling the NWS API by setting 'INJECT' to 'True'.
|
||||
INJECT: false
|
||||
# List the test alerts to inject. Use a case-sensitive list. One alert per line for better readability.
|
||||
INJECTALERTS:
|
||||
- Tornado Warning
|
||||
- Tornado Watch
|
||||
- Severe Thunderstorm Warning
|
||||
Loading…
Reference in new issue