[arm-allstar] no audio from the weather alert scripts

LaRoy McCann lmccann at dtisp.com
Mon Apr 20 21:28:33 EST 2015


Chris,
I think I found the problem. The value of WXVOL in wx_scripts.conf_NEW is
"_WXVOL_".

When I run wx_conf.sh and reconfigure, I change the Volume from _WXVOL_ to 3.
When it saves the config file back to wx_scripts.conf it is not saving the
value of 3 to the file.  It is keeping the "_WXVOL_".

In looking at wx_config.sh, the WXVOL is only written to the file if it sets
the Units, Pressure and Rain.  This is only done if the weather report is
setup in crontab.  I only have the wxalert configured in crontab, therefor
wx_config.sh never executes the lines that set the volume to the config file.

I moved the sed and mv lines for VOL up in the wx_config.sh script to make
sure wx_scripts.conf is updated.



 echo -n "Enter the volume setting for ulaw files [$CUR_VOL] :"
    read ANS
    if [ -z "$ANS" ]; then
        WXVOL=$CUR_VOL
    else
        WXVOL=$ANS
    fi

 #### Moved the following lines to make sure we set the VOL.
       # Vol
        sed "s/_WXVOL_/${WXVOL}/g" /tmp/wx_scripts.tmp > /tmp/wx_scripts.tmp1
        mv /tmp/wx_scripts.tmp1 /tmp/wx_scripts.tmp
 ######
 
   # Configure wx_config.conf file
    # (wxalert beacon, report output - metric or US units)



LaRoy McCann, K5TW
--
Open WebMail Project (http://openwebmail.org)


---------- Original Message -----------
From: Christopher Kovacs <w0anm73 at gmail.com>
To: BeagleBone Black ARM Allstar <arm-allstar at hamvoip.org>
Sent: Mon, 20 Apr 2015 18:48:34 -0500
Subject: Re: [arm-allstar] no audio from the weather alert scripts

> Hi LaRoy,
> 
> I have never seen this behavior before.
> 
> This value is defined in the wx_scripts.conf file (
> */usr/local/etc/wx/wx_scripts.conf*) as show below.
> 
> WXVOL="3"                           # Volume control to adjust ulaw
> output file                                    # integer 1-10, were 
> 10 is highest volume
> 
> This is set when running the *wx_config.sh*:
> 
> ----------------------------------------------------------------------
> Script Configuration
> 
>    The scripts have already been configured. If you choose, you can change
>    your weather configurations. this selection allows you to change the
>    audio volume, weather units of measure (metric/us), and email 
> (gmail)   support.
> 
> ----------------------------------------------------------------------
> Do you want to reconfigure the weather scripts ([n],y): ? y
> 
> Enter the volume setting for ulaw files [3] :3
> 
> The wx_scripts.conf file is sourced when executing the getWxAlert as
> well as other wx scripts.  Try re-executing
> 
> the configuration script and select re-configure after stepping
> through the other questions requesting to add Alert,
> 
> Reports, and  Forecast.
> 
> Send me the current copy of */usr/local/etc/wx/wx_scripts.conf* file
> that you have on your system.  This script and
> 
> definitions are correct.  You are running the the RPi2 release, correct?
> 
> Thanks,
> 
> Chris,  w0anm
> 
> On Mon, Apr 20, 2015 at 5:11 PM, LaRoy McCann <lmccann at dtisp.com> wrote:
> 
> >  Ok, just narrowed down the problem.  I believe it is with
> > /usr/local/bin/getWxAlert.
> >
> > In the "TextToSpeech" function, this variable is defined:
> > TTS_PROGRAM="/usr/local/bin/tts_audio.sh -v ${WXVOL} "
> >
> > The problem as I see it is WXVOL is not defined anywhere in getWxAlert, so
> > I assume it defaults to 0.
> > When getWxAlert calls tts_audio.sh it passes -v 0 which creates the audio
> > file with no volume.
> >
> > If I manually run "/usr/local/bin/tts_audio.sh -v 3
> > /tmp/wx/alert/ARC111/no_alerts.txt" it creates no_alerts.ul that has an
> > audio level.
> >
> > I confirmed this by changing the TTS_PROGRAM="/usr/local/bin/tts_audio.sh
> > ".  Now it uses the default value in tts_audio.sh.
> >
> > Not sure what the intent was here. Either getWxAlert needs to have WXVOL
> > defined within it or needs to have the -v ${WXVOL} option left off.
> >
> > Not sure why I am the only one having this issue?
> >
> >
> > LaRoy McCann, K5TW
> >
> >
> >
> >
> >
> >
> > On 4/20/2015 2:33 PM, LaRoy McCann wrote:
> >
> > Yes it was connected and I ran it several times again since the initial
> > setup, although I did not reconfigure the county,  just the last section
> > asking about the audio level, whether to play the scripts and the gmail
> > account.
> >
> > I'll try it again and configure the whole thing.
> >
> > LaRoy McCann, K5TW
> >
> > On 4/20/2015 2:20 PM, Robert Newberry wrote:
> >
> > When you ran the script was your RPI2 connected to the internet?  I had a
> > similar problem when I ran the first time script. Apparently when it went
> > to the internet to do whatever it's doing. I re-ran the script and
> > everything worked after I ran the script with a working internet
> > connection.
> >
> > N1XBM
> > Apparare Scientor
> > Paratus Communicare
> > Allstar Node # 27086, 41540, 41812
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by the *DTISP MailScanner* <http://www.dtisp.com/>, and
> > is
> > believed to be clean.
> >
> > _______________________________________________
> >
> > arm-allstar mailing
listarm-allstar at hamvoip.orghttp://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >
> > Visit the BBB web page -
http://www.crompton.com/hamradio/BeagleBoneBlackAllstar/
> >
> >
> >
> >
> > ------------------------------
> >    [image: Avast logo] <http://www.avast.com/>
> >
> > This email has been checked for viruses by Avast antivirus software.
> > www.avast.com
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by the *DTISP MailScanner* <http://www.dtisp.com/>, and
> > is
> > believed to be clean.
> >
> > _______________________________________________
> >
> > arm-allstar mailing
listarm-allstar at hamvoip.orghttp://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >
> > Visit the BBB web page -
http://www.crompton.com/hamradio/BeagleBoneBlackAllstar/
> >
> >
> >
> >
> > ------------------------------
> >   [image: Avast logo] <http://www.avast.com/>
> >
> > This email has been checked for viruses by Avast antivirus software.
> > www.avast.com
> >
> >
> > _______________________________________________
> >
> > arm-allstar mailing list
> > arm-allstar at hamvoip.org
> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >
> > Visit the BBB web page -
> > http://www.crompton.com/hamradio/BeagleBoneBlackAllstar/
> >
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by the DTISP MailScanner, and is
> believed to be clean.
------- End of Original Message -------


More information about the arm-allstar mailing list