Author Topic: NOAA WEATHER RADIO  (Read 25371 times)

0 Members and 1 Guest are viewing this topic.

Offline Bunty

  • Forecaster
  • *****
  • Posts: 1829
  • Home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: NOAA WEATHER RADIO
« Reply #700 on: August 02, 2017, 02:04:09 AM »
Ok.. thanks to gwwilk for the Bootstrap fix and 92merc for the feature request.. I've updated the Saratoga template version to 1.01
It has a local of Bootstrap named bootstrap.3.3.7-mod.min.css. 
Added a $autoplaystartup flag to wxradio.php to control auto player start on page load (default =true; in distribution).
Changed files:
added bootstrap.3.3.7-mod.min.css
mod wxradio.php
mod include-wxradio.php
mod NWS-radios.js

Download the wxradio-template.zip and update those 4 files on your site from the script page.

NB.. I've not applied the changes to the Standalone version (still at V1.00).

Best regards,
Ken

Mine isn't working at http://stillwaterweather.com/wx/wxradio.php.   Below, I got some java console error details I'm not bright enough to use for a fix:

The resource from “http://stillwaterweather.com/wx/NWR-radios-data.php” was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff).  wxradio.php
The resource from “http://stillwaterweather.com/wx/NWR-radios-data.php” was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff).  wxradio.php

jQuery.Deferred exception: data is not defined loadInfo@http://stillwaterweather.com/wx/NWR-radios.js:125:2
@http://stillwaterweather.com/wx/NWR-radios.js:245:5
g/</j@https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:29946
g/</k<@https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js:2:30262
 undefined  jquery.min.js:2:31515

ReferenceError: data is not defined[Learn More]
« Last Edit: August 02, 2017, 02:06:29 AM by Bunty »

Also the 2nd home page using modified AltDashboard 6.81 at http://stillwaterweather.com/wx/2ndhome.php

Offline sacreyweather

  • Echo Valley Weather
  • Forecaster
  • *****
  • Posts: 1513
    • Echo Valley Weather
Re: NOAA WEATHER RADIO
« Reply #701 on: August 02, 2017, 08:34:14 AM »
Hi Bunty,

Page seems to be working fine for me here at work.

John
CWOP: D2073, GR2AE, GR3, Cumulus, PWSweather,  CoCoRaHS: AR-SL-23  

Saline Weather on Twitter
Blitzortung Station 1387

Offline Bunty

  • Forecaster
  • *****
  • Posts: 1829
  • Home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: NOAA WEATHER RADIO
« Reply #702 on: August 02, 2017, 02:38:01 PM »
Hi Bunty,

Page seems to be working fine for me here at work.

John

Thank you for some good news.  It occurred to be to check how it goes with other browsers.  So I bet you were using Chrome, since that is the only browser where it works for me.  It won't work in Edge, IE and Firefox.

Also the 2nd home page using modified AltDashboard 6.81 at http://stillwaterweather.com/wx/2ndhome.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6110
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA WEATHER RADIO
« Reply #703 on: August 02, 2017, 03:19:16 PM »
The problem seems to be in
Code: [Select]
<script src="NWR-radios-data.php"></script> on your page.
Running that script separately yields up the JSON file needed.  In the page, the http response is 'nil'.  Very odd.
The console shows
Quote
The resource from “http://stillwaterweather.com/wx/NWR-radios-data.php” was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)
so blocked the 'fetch' of the script, resulting in 'nil' data.

Looking at the no-sniff options, it appears that it doesn't like 'Content-type: text/html' for the script to be used.

Try changing NWR-radios-data.php from
Code: [Select]
if(strlen($content) > 100) {
$content = str_replace('http:\\/\\/noaaweatherradio.org\\/content\\/thumbnails\\/',$imagesDir,$content);
print $content;
to
Code: [Select]
if(strlen($content) > 100) {
$content = str_replace('http:\\/\\/noaaweatherradio.org\\/content\\/thumbnails\\/',$imagesDir,$content);
        header("Content-type: text/javascript,charset=UTF-8");
print $content;
and see if that works...
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Bunty

  • Forecaster
  • *****
  • Posts: 1829
  • Home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: NOAA WEATHER RADIO
« Reply #704 on: August 02, 2017, 05:04:37 PM »
Sorry, but got same result, which is it only works in Chrome browser.

Also the 2nd home page using modified AltDashboard 6.81 at http://stillwaterweather.com/wx/2ndhome.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6110
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA WEATHER RADIO
« Reply #705 on: August 02, 2017, 05:21:40 PM »
Ummm... running the script NWR-radios-data.php?sce=view still shows
Code: [Select]
if(strlen($content) > 100) {
$content = str_replace('http:\\/\\/noaaweatherradio.org\\/content\\/thumbnails\\/',$imagesDir,$content);
print $content;
which is the unchanged version.  Did you make the change to the script and upload it?  It should show
Code: [Select]
if(strlen($content) > 100) {
$content = str_replace('http:\\/\\/noaaweatherradio.org\\/content\\/thumbnails\\/',$imagesDir,$content);
        header("Content-type: text/javascript,charset=UTF-8");
print $content;
to work with the test for 'nosniff'.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline USAF_Pride

  • Member
  • *
  • Posts: 2
Re: NOAA WEATHER RADIO
« Reply #706 on: August 02, 2017, 06:42:39 PM »
Greetings everyone. I just discovered this thread and the need for NWR in my area (thus my first post).  I had a rPi3 feeding liveatc and flightaware information, so I thought I would throw a 3rd dongle on there and feed a NWR stream with a splitter off my airband antenna. I've read the entire thread and I did not see anyone using the same setup I have.  I'm using RTLSDR-Airband as my feeding software as you don't need to have any additional software installed to stream (darkice) (and was already using it for liveatc). 

You will need to compile it with the
Code: [Select]
PLATFORM=rpiv2 NFM=1 make to make it work with the NWR feed.  Once that is done, you can use the below sample config file to setup the feed (file located at /usr/local/etc/rtl_airband.conf). You will need to adjust the squelch and the gain for your site as the software has trouble with the AGC on constant transmissions using the -f flag (sudo rtl_airband -f).  If you have multiple dongles, you can use rtl_eeprom to set the serial number and then use the "unstable" version of Airband and change
Code: [Select]
index = 0; to
Code: [Select]
serial = "whateverserialyouset";
Hopefully this makes it easier for others to stream.


Code: [Select]
#Config for 1 dongle
syslog = 1

devices:
(
   {
   index = 0;
   gain = 35;
   correction = 50;
   mode = "scan";
   
  channels:
  (
      {
modulation = "nfm";
#change for your frequency
freqs = (162550000);
squelch = 50;
outputs: (
           {
disable = false;
type = "icecast";
server = "wxradio.dyndns.org";
             port = 8000;
mountpoint = "PickYourMountPoint.mp3";
name = "Description";
genre = "Weather"
username = "source";
password = "WxRadio2014";
},
{
#for recording locally, comment out disable or change to false
disable = true;
type = "file";
directory = "/home/pi/recordings";
filename_template = "NOAA";
continuous = true;
}
    );
  }
   );
  }
);
« Last Edit: August 02, 2017, 06:55:06 PM by USAF_Pride »

Offline Bunty

  • Forecaster
  • *****
  • Posts: 1829
  • Home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: NOAA WEATHER RADIO
« Reply #707 on: August 02, 2017, 11:57:43 PM »
Ummm... running the script NWR-radios-data.php?sce=view still shows
Code: [Select]
if(strlen($content) > 100) {
$content = str_replace('http:\\/\\/noaaweatherradio.org\\/content\\/thumbnails\\/',$imagesDir,$content);
print $content;
which is the unchanged version.  Did you make the change to the script and upload it?  It should show
Code: [Select]
if(strlen($content) > 100) {
$content = str_replace('http:\\/\\/noaaweatherradio.org\\/content\\/thumbnails\\/',$imagesDir,$content);
        header("Content-type: text/javascript,charset=UTF-8");
print $content;
to work with the test for 'nosniff'.

Oops, sorry about an oversight.  Modification now made and all is well.  Thank you!

Also the 2nd home page using modified AltDashboard 6.81 at http://stillwaterweather.com/wx/2ndhome.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6110
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA WEATHER RADIO
« Reply #708 on: August 03, 2017, 01:22:05 AM »
Glad it worked.  I've updated NWR-radios-data.php V1.01 with that fix and added it to the template and standalone versions.

Full downloads via the script page

Just the changed NWR-radios-data.php is available here.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tim273

  • Senior Member
  • **
  • Posts: 94
Re: NOAA WEATHER RADIO
« Reply #709 on: August 03, 2017, 09:09:54 AM »
Greetings everyone. I just discovered this thread and the need for NWR in my area (thus my first post).  I had a rPi3 feeding liveatc and flightaware information, so I thought I would throw a 3rd dongle on there and feed a NWR stream with a splitter off my airband antenna. I've read the entire thread and I did not see anyone using the same setup I have.  I'm using RTLSDR-Airband as my feeding software as you don't need to have any additional software installed to stream (darkice) (and was already using it for liveatc). 

You will need to compile it with the
Code: [Select]
PLATFORM=rpiv2 NFM=1 make to make it work with the NWR feed.  Once that is done, you can use the below sample config file to setup the feed (file located at /usr/local/etc/rtl_airband.conf). You will need to adjust the squelch and the gain for your site as the software has trouble with the AGC on constant transmissions using the -f flag (sudo rtl_airband -f).  If you have multiple dongles, you can use rtl_eeprom to set the serial number and then use the "unstable" version of Airband and change
Code: [Select]
index = 0; to
Code: [Select]
serial = "whateverserialyouset";
Hopefully this makes it easier for others to stream.


Code: [Select]
#Config for 1 dongle
syslog = 1

devices:
(
   {
   index = 0;
   gain = 35;
   correction = 50;
   mode = "scan";
   
  channels:
  (
      {
modulation = "nfm";
#change for your frequency
freqs = (162550000);
squelch = 50;
outputs: (
           {
disable = false;
type = "icecast";
server = "wxradio.dyndns.org";
             port = 8000;
mountpoint = "PickYourMountPoint.mp3";
name = "Description";
genre = "Weather"
username = "source";
password = "WxRadio2014";
},
{
#for recording locally, comment out disable or change to false
disable = true;
type = "file";
directory = "/home/pi/recordings";
filename_template = "NOAA";
continuous = true;
}
    );
  }
   );
  }
);

Welcome to the board!  Glad you got that working, it's just another option for those who wish to use the RPi to stream, so thanks for the post!

Offline Cutty Sark Sailor

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 2748
    • Frankfort Weather - TwinHollies WeatherCenter
Re: NOAA WEATHER RADIO
« Reply #710 on: August 04, 2017, 08:10:31 AM »
 :twisted:
OK... here comes some help =D&gt;
http://noaaweatherradio.org/quality/monitor.html


Thanks to Tony (Fox_Of_The_Wind) for the Pira Utility...

CoCoRaHS KY-FR-1  CWOP DW5536

       Blitzortung
       689
& 1439

sferics.us

 


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6110
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA WEATHER RADIO
« Reply #711 on: August 04, 2017, 01:15:52 PM »
I've been using the Pira silence detector for quite a while with my edcast feed..  Thanks for letting me know about the stream monitor app.. I now have it watching the icecast local/wxradio feeds for the two stations I stream  \:D/
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Fox_Of_The_Wind

  • Forecaster
  • *****
  • Posts: 368
  • Hi there!
    • http://www.desotowiwx.com
Re: NOAA WEATHER RADIO
« Reply #712 on: August 05, 2017, 08:33:06 AM »
:twisted:
OK... here comes some help =D&gt;
http://noaaweatherradio.org/quality/monitor.html


Thanks to Tony (Fox_Of_The_Wind) for the Pira Utility...

You are welcome. I am happy I am able to help out a little.  :grin:

My BloomSky Station
Blitzortung Station #1328
My 2nd weather site
Anthony

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 538
  • BismarckWeather.net
    • BismarckWeather.net
Re: NOAA WEATHER RADIO
« Reply #713 on: August 05, 2017, 11:24:46 AM »
One thing I noticed about MediaMon, it has a propensity to look like it closed when you minimize it.  It wont' appear in taskbar or system tray.

I was getting notices that my system was "still down", even though I opened the program and it showed all is well.  Opened task manager in details mode.  Had 5 copies running.  Every time I made a change, it looked like the program closed on me.  It was actually running in the background hidden.  I'm guessing some of those were still running on an old config.  Once I killed them all and started a new copy, it was fine.

Now that I have it configured, it won't be changed hardly at all.  So I shouldn't have any more issues.
http://www.BismarckWeather.net
Davis VP2, Cumulus, Blitzortung, Bloomsky, Saratoga Scripts

Offline Cutty Sark Sailor

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 2748
    • Frankfort Weather - TwinHollies WeatherCenter
Re: NOAA WEATHER RADIO
« Reply #714 on: August 05, 2017, 12:22:03 PM »
One thing I noticed about MediaMon, it has a propensity to look like it closed when you minimize it.  It wont' appear in taskbar or system tray.

I was getting notices that my system was "still down", even though I opened the program and it showed all is well.  Opened task manager in details mode.  Had 5 copies running.  Every time I made a change, it looked like the program closed on me.  It was actually running in the background hidden.  I'm guessing some of those were still running on an old config.  Once I killed them all and started a new copy, it was fine.

Now that I have it configured, it won't be changed hardly at all.  So I shouldn't have any more issues.
Try, if running windows 10, running the Compatibility thing, and see if it does better as WIN 8 or Win 7... I set mine for Win 7, on the one machine...
Yes, if you "X" or Exit the program, it should 'kill.... to get to system tray, use the Minimize (-) I guess that's only way right now...
Maybe they'll catch some of this if they get out of "Beta" Stage...

CoCoRaHS KY-FR-1  CWOP DW5536

       Blitzortung
       689
& 1439

sferics.us

 


Offline Cutty Sark Sailor

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 2748
    • Frankfort Weather - TwinHollies WeatherCenter
Re: NOAA WEATHER RADIO
« Reply #715 on: August 05, 2017, 12:33:37 PM »
Oh, one other 'bug' I found while checking 92merc's report... , while running as win 10, I'd experimented with checking both "Start monitor on app launch, and 'minimize to tray on monitor exit"....  Well, I couldn't get the app in a position to 'stop' monitoring, or be able to change config after that... she'd start, go to tray, stay alive, and not let you touch her...
Ok...
If this happens to you, in "Users" APP Data.. (mine's under 'roaming') Find mediaMON folder, inside "Config XML"... find the part that says
"StartibStart="true"  and change that to "false".. save...
That allowed me to open and change those settings back to just the checklmark on the 'start on app lauch"... That was when was running as WIN10 compatible... I've not checked on the sysd tray issue since compatible win7 change... apparently checking both in config made it 'llock in' in win 10 .... not sure I even understand this post... but..
« Last Edit: August 05, 2017, 12:35:17 PM by Cutty Sark Sailor »

CoCoRaHS KY-FR-1  CWOP DW5536

       Blitzortung
       689
& 1439

sferics.us

 


Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 538
  • BismarckWeather.net
    • BismarckWeather.net
Re: NOAA WEATHER RADIO
« Reply #716 on: August 05, 2017, 12:38:52 PM »
I hadn't looked at mine since yesterday afternoon.  After reading your posts, I checked again.  Somehow since using it yesterday, I had 2 copies running again.  Neither of them were bitching with emails, so I didn't notice.

I'm guessing it was my StartWatch that may have fired up a second copy.  I took it out of there for now.

But I changed my compatibility to Win7 and run as admin for further testing.
http://www.BismarckWeather.net
Davis VP2, Cumulus, Blitzortung, Bloomsky, Saratoga Scripts

Offline Cutty Sark Sailor

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 2748
    • Frankfort Weather - TwinHollies WeatherCenter
Re: NOAA WEATHER RADIO
« Reply #717 on: August 07, 2017, 05:41:09 PM »
 :(
Removed a bunch of 'dead feeds' today....
... if you were affected, you'll need to resubmit after you restore the feed.
http://noaaweatherradio.org/addstream/addstream.html

...don't forget, we added a couple of monitoring tools for your audio/mountpoint:
http://noaaweatherradio.org/quality/monitor.html

CoCoRaHS KY-FR-1  CWOP DW5536

       Blitzortung
       689
& 1439

sferics.us

 


Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 538
  • BismarckWeather.net
    • BismarckWeather.net
Re: NOAA WEATHER RADIO
« Reply #718 on: August 10, 2017, 10:43:31 AM »
Firefox updated to V55 yesterday.  I noticed my volume slider is now back.

On a side note, I found out yesterday my 2015 BMW R1200RT motorcycle has the weather radio built in!  I had no idea.  Since I am partially deaf, I don't listen to the radio.  Was working on the wife's bike and discovered it.  Sweet!
http://www.BismarckWeather.net
Davis VP2, Cumulus, Blitzortung, Bloomsky, Saratoga Scripts