[arm-allstar] Feature request
Doug Crompton
wa3dsp at gmail.com
Thu Nov 15 23:03:11 EST 2018
Justin,
Here is a script that will basically do it. We now have an
/usr/local/sbin/example_scripts directory that we add to occasionally.
These are scripts that users can use as is or modify to their liking.
Please move them elsewhere if you are modifying. Here is a script that sets
a FOB bit based on AutoSky alert status. This will be in the
example_scripts directory probably on the next update as file name
test_alert.sh
#!/bin/bash
# alert_test.sh <node>
# Uses first node if not defined.
# Example script
# D. Crompton - 11/2018
# Check every 30 seconds running in
# background
# Example Script to turn on
# FOB GPIO bit when an AutoSky Alert is
# Active. You must set GPIO bit as follows
# in simpleusb.conf for the FOB (node) you
# want to send the alert to
# gpiox = out,0
# where x equals the bit number. The default is
# bit 4 which would be -
# gpioi5 = out,0
# This sets the CM1xx chip bit 5 to output with an
# initial state of 0
# Note must use bits 1,2,4 on CM108x
# CM119x can use 1,2,4,5,6,7,8
# The node is optional if left out it uses the first
# node on the server.
# FOB Bit to use. Must be configured in simpleusb.conf
# as shown above. Default is bit 5.
FOB_BIT=5
# Set node to operate on
if [ -z $1 ]
then
node=$NODE1
else
node=$2
fi
while :
do
if [ -s /tmp/AUTOSKY/warnings.txt ]
then
echo "Alert Active - sending 1 to FOB GPIO$FOB_BIT"
/bin/asterisk -rx "rpt cmd $node cop 62 GPIO$FOB_BIT=1"
else
echo "No Active Alert - sending 0 to FOB GPIO$FOB_BIT"
/bin/asterisk -rx "rpt cmd $node cop 62 GPIO$FOB_BIT=0"
fi
sleep 30
done
On Thu, Nov 15, 2018 at 6:14 PM "Justin Reed via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:
> Doug & David,
>
> I know you guys are busy with other areas of Allstar, but there is
> something I thought of that would benefit my installation and possibly
> others.
>
> Is there a way to automatically assert one of the URI's logic outputs
> when there is an active Autosky alert, and un-assert that output when
> there are no current alerts?
>
> The particular application I have in mind is to use that to signal to my
> 7330 controller to change some parameters based on normal usage vs. when
> there is weather in the area.
>
> I'd prefer using an output on the URI rather than a GPIO on the Pi
> because the URI resides in the repeater cabinet and the Pi is in another
> cabinet, and the DB-25 connector on the URI is already connected to the
> 7330 with that output already wired. It's ready for the software change ;)
>
> Thanks,
> Justin
>
>
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>
More information about the ARM-allstar
mailing list